ARM instruction "srs" wrong behaviour

Bug #1079080 reported by vcesson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

Quote from ARM Architecture Reference Manual ARMv7-A and ARMv7-R :
"Store Return State stores the LR and SPSR of the current mode to the stack of a specified mode"

Problem:
When executing this instruction, the register stored is CPSR instead of SPSR.

Context:
Using QEMU 1.2.0 to simulate a Zynq application (processor Cortex-a9 mpcore) with the following command line:
qemu-system-arm -M xilinx-zynq-a9 -m 512 -serial null -serial mon:stdio -dtb /home/vcesson/workspace/xilinx_zynq.dtb -kernel install/tests/io/serial/current/tests/serial2 -S -s -nographic

Revision history for this message
Peter Maydell (pmaydell) wrote :

It looks like this is only a problem in Thumb mode; the equivalent bug in ARM mode was fixed in commit c67b6b71 back in 2009.

Can you make the test case dtb and image available? That would help in testing...

Changed in qemu:
status: New → Confirmed
Revision history for this message
vcesson (vcesson) wrote :
Revision history for this message
vcesson (vcesson) wrote :
Revision history for this message
Peter Maydell (pmaydell) wrote :

Thanks -- I've submitted a patch which fixes this: http://patchwork.ozlabs.org/patch/220748/

If you'd like to give me a name/email [format "Full Name <email address hidden>"] I can credit you in a Reported-by: tag in the commit message...

Revision history for this message
vcesson (vcesson) wrote :

You are welcome.
Credit info you need: Cesson Vincent <email address hidden>
Thank you for fixing it!

Peter Maydell (pmaydell)
Changed in qemu:
status: Confirmed → Fix Committed
Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.