msr instruction dont change cpsr bits

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

msr instruction dont change cpsr bits

David Gaydou
Hi,
i've just discover this fantastic tool and i'm playing around with it to lern a
bit.
I've started with

 configrun-sid --cpu=arm --gdb=2004 -EL --save-temps --no-run control.elf

where control.elf was built using arm-elf-gcc and tested with arm-elf-gdb
target=sim. When i simulate on sid, gdb i r show that the instruction msr dont
change the bits on cpsr register:
.
.
.
r11            0x0 0
r12            0x0 0
sp             0x0 0
lr             0x0 0
pc             0x60 96
fps            0x0 0
cpsr           0xd3 211
(gdb) s
stacks_init () at head.s:78
78 msr CPSR_c, #FIQ_MODE|IRQ_DISABLE|FIQ_DISABLE
(gdb) i r
r0             0x40004000 1073758208
r1             0xaa 170
r2             0x55 85
r3             0x3 3
r4             0x0 0
r5             0x0 0
r6             0x0 0
r7             0x0 0
r8             0x0 0
r9             0x0 0
r10            0x0 0
r11            0x0 0
r12            0x0 0
sp             0x0 0
lr             0x0 0
pc             0x64 100
fps            0x0 0
cpsr           0xd3 211
(gdb)
 
The value of cpsr after msr instruction should be 0xd1 (arm-elf-gdb, target=sim
confirm this).
Apart from this, the rest of the instructions seem to be excecuted correctly.
Is there any solution for this problem, what im doing wrong?
Thanks for your help!