On 3/19/25 06:44, Philippe Mathieu-Daudé wrote:
To avoid including the huge "cpu.h" for a simple definition,
move TARGET_INSN_START_EXTRA_WORDS to "cpu-param.h".
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
target/arm/cpu-param.h | 14 ++++++++++++++
target/arm/cpu.h | 14 --------------
target/hppa/cpu-param.h | 2 ++
target/hppa/cpu.h | 2 --
target/i386/cpu-param.h | 2 ++
target/i386/cpu.h | 2 --
target/m68k/cpu-param.h | 2 ++
target/m68k/cpu.h | 2 --
target/microblaze/cpu-param.h | 2 ++
target/microblaze/cpu.h | 2 --
target/mips/cpu-param.h | 2 ++
target/mips/cpu.h | 2 --
target/openrisc/cpu-param.h | 2 ++
target/openrisc/cpu.h | 2 --
target/riscv/cpu-param.h | 8 ++++++++
target/riscv/cpu.h | 6 ------
target/s390x/cpu-param.h | 2 ++
target/s390x/cpu.h | 2 --
target/sh4/cpu-param.h | 2 ++
target/sh4/cpu.h | 2 --
target/sparc/cpu-param.h | 2 ++
target/sparc/cpu.h | 1 -
22 files changed, 40 insertions(+), 37 deletions(-)
diff --git a/target/arm/cpu-param.h b/target/arm/cpu-param.h
index 896b35bd6d5..ed1f0b16e51 100644
--- a/target/arm/cpu-param.h
+++ b/target/arm/cpu-param.h
@@ -38,6 +38,20 @@
# define TARGET_PAGE_BITS_MIN 10
#endif /* !CONFIG_USER_ONLY */
+/* ARM-specific extra insn start words:
+ * 1: Conditional execution bits
+ * 2: Partial exception syndrome for data aborts
+ */
+#define TARGET_INSN_START_EXTRA_WORDS 2
+
+/* The 2nd extra word holding syndrome info for data aborts does not use
+ * the upper 6 bits nor the lower 13 bits. We mask and shift it down to
+ * help the sleb128 encoder do a better job.
+ * When restoring the CPU state, we shift it back up.
+ */
+#define ARM_INSN_START_WORD2_MASK ((1 << 26) - 1)
+#define ARM_INSN_START_WORD2_SHIFT 13
This does not belong in cpu-param.h. This is private to target/arm/, and should probably
be moved to internals.h or translate.h or some such.
Otherwise,
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
r~