On 3/24/25 10:39, Richard Henderson wrote:
On 3/24/25 03:21, Alex Bennée wrote:
+ #ifdef TARGET_BIG_ENDIAN
+ MemOp end = MO_BE;
+ #else
+ MemOp end = MO_LE;
+ #endif
+#endif
That's what MO_TE is for.
+/*
+ * Helpers copied from helpers.h just for handling target_ulong values
+ * from gdbstub's GByteArray based on what the build config is. This
+ * will need fixing for single-binary.
+ */
+
+#if TARGET_LONG_BITS == 64
+#define ldtul_p(addr) ldq_p(addr)
+#define gdb_get_regl_value(m, b, v) gdb_get_reg64_value(m, b, v)
+#else
+#define ldtul_p(addr) ldl_p(addr)
+#define gdb_get_regl_value(m, b, v) gdb_get_reg32_value(m, b, v)
+#endif
Surely you're not intending to replicate this in any target that can have
multiple sizes?
This is not an improvement.
If I'm correct (and from v1), ppc is the only architecture having
registers defined with target_long types.
So at the time I suggested to either move the macro definition in a
header (helpers-target.h) and deal with ppc later, or replace ppc
registers definition, which is surely more complicated to do at the moment.
Moving macro definition directly in this file (if it's really the only
one needing it) is ok for me as well.
r~