qemu-e2k/tcg/arm
Richard Henderson 76cff100be tcg/arm: Don't emit UNPREDICTABLE LDRD with Rm == Rt or Rt+1
The LDRD (register) instruction is UNPREDICTABLE if the Rm register
is the same as either Rt or Rt+1 (the two registers being loaded to).
We weren't making sure we avoided this, with the result that on some
host CPUs like the Cortex-A7 we would get a SIGILL because the CPU
chooses to UNDEF for this particular UNPREDICTABLE case.

Since we've already checked that datalo is aligned, we can simplify
the test vs the Rm operand by aligning it before comparison.  Check
for the two orderings before falling back to two ldr instructions.

We don't bother to do anything similar for tcg_out_ldrd_rwb(),
because it is only used in tcg_out_tlb_read() with a fixed set of
registers which don't overlap.

There is no equivalent UNPREDICTABLE case for STRD.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/896
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-03-14 10:31:51 -07:00
..
tcg-target-con-set.h tcg/arm: Implement TCG_TARGET_HAS_roti_vec 2021-06-04 11:50:11 -07:00
tcg-target-con-str.h tcg/arm: Implement minimal vector operations 2021-06-04 11:50:11 -07:00
tcg-target.c.inc tcg/arm: Don't emit UNPREDICTABLE LDRD with Rm == Rt or Rt+1 2022-03-14 10:31:51 -07:00
tcg-target.h tcg: Add opcodes for vector nand, nor, eqv 2022-03-04 08:50:41 -10:00
tcg-target.opc.h tcg/arm: Implement TCG_TARGET_HAS_roti_vec 2021-06-04 11:50:11 -07:00