unicorn/qemu/target-arm
Peter Maydell f48d1fe391
target-arm: Correctly handle 'sub pc, pc, 1' for ARMv6
In the ARM v6 architecture, 'sub pc, pc, 1' is not an interworking
branch, so the computed new value is written to r15 as a normal
value. The architecture says that in this case, bits [1:0] of
the value written must be ignored if we are in ARM mode (or
bit [0] ignored if in Thumb mode); this is a change from the
ARMv4/v5 specification that behaviour is UNPREDICTABLE.
Use the correct mask on the PC value when doing a non-interworking
store to PC.

A popular library used on RaspberryPi uses this instruction
as part of a trick to determine whether it is running on
ARMv6 or ARMv7, and we were mishandling the sequence.

Fixes bug: https://bugs.launchpad.net/bugs/1625295

Backports commit 9b6a3ea7a699594162ed3d11e4e04b98568dc5c0 from qemu
2018-02-26 05:02:32 -05:00
..
arm_ldst.h cpu: move exec-all.h inclusion out of cpu.h 2018-02-24 02:39:08 -05:00
cpu-qom.h target-arm: make cpu-qom.h not target specific 2018-02-24 00:48:59 -05:00
cpu.c arm: add Cortex A7 CPU parameters 2018-02-26 03:44:24 -05:00
cpu.h target-*: Clean up cpu.h header guards 2018-02-25 04:12:46 -05:00
cpu64.c target-arm: Get rid of unused variable warnings 2018-02-23 12:43:09 -05:00
crypto_helper.c
helper-a64.c softfloat: Implement run-time-configurable meaning of signaling NaN bit 2018-02-24 20:27:12 -05:00
helper-a64.h
helper.c tcg: Merge GETPC and GETRA 2018-02-26 02:54:44 -05:00
helper.h target-arm: Implement MRS (banked) and MSR (banked) instructions 2018-02-21 21:50:42 -05:00
internals.h Fix confusing argument names in some common functions 2018-02-25 03:58:27 -05:00
iwmmxt_helper.c
kvm-consts.h
Makefile.objs
neon_helper.c target-arm: Fix warn about implicit conversion 2018-02-25 22:44:43 -05:00
op_addsub.h
op_helper.c target-arm: Fix lpae bit in FSR on an alignment fault 2018-02-25 23:10:29 -05:00
psci.c Use #include "..." for our own headers, <...> for others 2018-02-25 04:10:33 -05:00
translate-a64.c target-arm: A64: Fix decoding of iss_sf in disas_ld_lit 2018-02-26 05:01:33 -05:00
translate.c target-arm: Correctly handle 'sub pc, pc, 1' for ARMv6 2018-02-26 05:02:32 -05:00
translate.h target-arm: A64: Create Instruction Syndromes for Data Aborts 2018-02-24 16:46:44 -05:00
unicorn.h
unicorn_aarch64.c qemu-common: push cpu.h inclusion out of qemu-common.h 2018-02-24 01:50:56 -05:00
unicorn_arm.c qemu-common: push cpu.h inclusion out of qemu-common.h 2018-02-24 01:50:56 -05:00