From: Daniel Jacobowitz <dan@codesourcery.com>
To: xingxing pan <forandom@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: In the NONSTOP implementation why dose gdb use register r0 and r1 as temp registers for rn and rd ?
Date: Mon, 03 May 2010 15:58:00 -0000 [thread overview]
Message-ID: <20100503155813.GA12698@caradoc.them.org> (raw)
In-Reply-To: <n2s77f815bd1005022227tc4c6422cj35ca8fd96df840f1@mail.gmail.com>
On Mon, May 03, 2010 at 01:27:53PM +0800, xingxing pan wrote:
> hey guys, I'm porting NONSTOP to an ARM similar architechure. I found
> the following comments in the source.
>
> Instruction is of form:
> <op><cond> rd, [rn,] #imm
> Rewrite as:
> Preparation:
> tmp1, tmp2 <- r0,r1
> r0,r1 <- rd,rn
> Insn: <op><cond> r0,r1 #imm
> Cleanup: rd <- r0; r0<-tmp1;r1<-tmp2
>
> why dose gdb use register r0 and r1? why not use rd and rn directly?
> Thank you!
It was simpler to always use the same registers. That way you don't
have to worry about, for instance, which registers to save and restore
or whether rd and rn overlap. You could do it either way.
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2010-05-03 15:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 5:28 xingxing pan
2010-05-03 14:16 ` xingxing pan
2010-05-03 15:58 ` Daniel Jacobowitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100503155813.GA12698@caradoc.them.org \
--to=dan@codesourcery.com \
--cc=forandom@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox