* In the NONSTOP implementation why dose gdb use register r0 and r1 as temp registers for rn and rd ?
@ 2010-05-03 5:28 xingxing pan
2010-05-03 14:16 ` xingxing pan
2010-05-03 15:58 ` Daniel Jacobowitz
0 siblings, 2 replies; 3+ messages in thread
From: xingxing pan @ 2010-05-03 5:28 UTC (permalink / raw)
To: gdb
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!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: In the NONSTOP implementation why dose gdb use register r0 and r1 as temp registers for rn and rd ?
2010-05-03 5:28 In the NONSTOP implementation why dose gdb use register r0 and r1 as temp registers for rn and rd ? xingxing pan
@ 2010-05-03 14:16 ` xingxing pan
2010-05-03 15:58 ` Daniel Jacobowitz
1 sibling, 0 replies; 3+ messages in thread
From: xingxing pan @ 2010-05-03 14:16 UTC (permalink / raw)
To: gdb
Can anyone help?
2010/5/3 xingxing pan <forandom@gmail.com>:
> 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!
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: In the NONSTOP implementation why dose gdb use register r0 and r1 as temp registers for rn and rd ?
2010-05-03 5:28 In the NONSTOP implementation why dose gdb use register r0 and r1 as temp registers for rn and rd ? xingxing pan
2010-05-03 14:16 ` xingxing pan
@ 2010-05-03 15:58 ` Daniel Jacobowitz
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2010-05-03 15:58 UTC (permalink / raw)
To: xingxing pan; +Cc: gdb
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-03 15:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-03 5:28 In the NONSTOP implementation why dose gdb use register r0 and r1 as temp registers for rn and rd ? xingxing pan
2010-05-03 14:16 ` xingxing pan
2010-05-03 15:58 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox