qemu/target-arm
Sebastian Ottlik f62cafd4c8 target-arm: fix ARMv7M stack alignment on reset
When the initial SP is loaded from the vector table on ARMv7M systems the two
least significant bits are ignored as the stack is always aligned at a four byte
boundary (see ARM DDI 0403C, B1.4.1 and B1.5.5). So far QEMU did not ignore
these bits leading to a stack alignment inconsitent with real hardware for
binaries that rely on this behaviour. This patch fixes this issue by masking the
two least significant bits when loading the SP.

Signed-off-by: Sebastian Ottlik <ottlik@fzi.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1378286595-27072-1-git-send-email-ottlik@fzi.de
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-09-10 19:09:32 +01:00
..
arm-semi.c exec: Change cpu_memory_rw_debug() argument to CPUState 2013-07-23 02:41:33 +02:00
cpu-qom.h target-arm: Implement the generic timer 2013-08-20 14:54:31 +01:00
cpu.c target-arm: fix ARMv7M stack alignment on reset 2013-09-10 19:09:32 +01:00
cpu.h target-arm: Avoid "1 << 31" undefined behaviour 2013-09-10 19:09:32 +01:00
gdbstub.c cpu: Introduce CPUClass::gdb_{read,write}_register() 2013-07-27 00:04:17 +02:00
helper.c target-arm: Avoid "1 << 31" undefined behaviour 2013-09-10 19:09:32 +01:00
helper.h target-arm: Implement sbc_cc inline 2013-02-23 17:25:29 +00:00
iwmmxt_helper.c exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
kvm-stub.c target-arm: Initialize cpreg list from KVM when using KVM 2013-06-25 18:16:10 +01:00
kvm.c memory: add ref/unref calls 2013-07-04 17:42:45 +02:00
kvm_arm.h target-arm: Initialize cpreg list from KVM when using KVM 2013-06-25 18:16:10 +01:00
machine.c target-arm: Implement the generic timer 2013-08-20 14:54:31 +01:00
Makefile.objs cpu: Introduce CPUClass::gdb_{read,write}_register() 2013-07-27 00:04:17 +02:00
neon_helper.c exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
op_addsub.h Correct spelling of licensed 2011-07-23 11:26:12 -05:00
op_helper.c cpu: Move halted and interrupt_request fields to CPUState 2013-03-12 10:35:55 +01:00
translate.c target-arm: Use sextract32() in branch decode 2013-09-10 19:09:32 +01:00