Skip to contentSkip to conversation

target/rx: Use explicit little-endian LD/ST API

PATCH Superseded Philippe Mathieu-Daudé 3 participants 12 messages Dec 24, 2025 – Jan 5

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover target/rx: Use explicit little-endian LD/ST API

Renesas RX is little-endian. Use the explicit 'little' endianness instead of the 'native' one. Remove some target_ulong uses. Forbid further uses of legacy APIs.

tag: https://gitlab.com/philmd/qemu/-/tags/endian_rx-v1
CI: https://gitlab.com/philmd/qemu/-/pipelines/2231223066

Philippe Mathieu-Daudé (4):
target/rx: Use little-endian variant of cpu_ld/st_data*() target/rx: Use explicit little-endian LD/ST API
target/rx: Inline translator_lduw() and translator_ldl() configs/targets: Forbid Renesas RX to use legacy native endianness API

 configs/targets/rx-softmmu.mak |  1 +
 target/rx/cpu.c                |  2 +-
 target/rx/gdbstub.c            | 24 ++++++++++++------------
 target/rx/helper.c             | 14 +++++++-------
 target/rx/op_helper.c          |  6 +++---
 target/rx/translate.c          |  9 +++++----
 6 files changed, 29 insertions(+), 27 deletions(-)
Signature · 1 line
2.52.0
#1 lore raw

PATCH 1/4 target/rx: Use little-endian variant of cpu_ld/st_data*()

We only build the RX target using little endianness order, therefore the cpu_ld/st_data*() definitions expand to the little endian declarations. Use the explicit little-endian variants.

Mechanical change running:

  $ tgt=rx; \
    end=le; \
    for op in data mmuidx_ra; do \
      for ac in uw sw l q; do \
        sed -i -e "s/cpu_ld${ac}_${op}/cpu_ld${ac}_${end}_${op}/" \
                  $(git grep -l cpu_ target/${tgt}/); \
      done;
      for ac in w l q; do \
        sed -i -e "s/cpu_st${ac}_${op}/cpu_st${ac}_${end}_${op}/" \
                  $(git grep -l cpu_ target/${tgt}/); \
      done;
    done
---
 target/rx/helper.c    | 14 +++++++-------
 target/rx/op_helper.c |  6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)
target/rx/helper.c +7 -7
index e9a7aaf610d..83cd491eb4a 100644
@@ -68,10 +68,10 @@ void rx_cpu_do_interrupt(CPUState *cs)
         qemu_log_mask(CPU_LOG_INT, "fast interrupt raised\n");
     } else if (cpu_test_interrupt(cs, CPU_INTERRUPT_HARD)) {
         env->isp -= 4;
-        cpu_stl_data(env, env->isp, save_psw);
+        cpu_stl_le_data(env, env->isp, save_psw);
         env->isp -= 4;
-        cpu_stl_data(env, env->isp, env->pc);
-        env->pc = cpu_ldl_data(env, env->intb + env->ack_irq * 4);
+        cpu_stl_le_data(env, env->isp, env->pc);
+        env->pc = cpu_ldl_le_data(env, env->intb + env->ack_irq * 4);
         env->psw_ipl = env->ack_ipl;
         cpu_reset_interrupt(cs, CPU_INTERRUPT_HARD);
         qemu_set_irq(env->ack, env->ack_irq);
@@ -82,14 +82,14 @@ void rx_cpu_do_interrupt(CPUState *cs)
         const char *expname = "unknown exception";
 
         env->isp -= 4;
-        cpu_stl_data(env, env->isp, save_psw);
+        cpu_stl_le_data(env, env->isp, save_psw);
         env->isp -= 4;
-        cpu_stl_data(env, env->isp, env->pc);
+        cpu_stl_le_data(env, env->isp, env->pc);
 
         if (vec < 0x100) {
-            env->pc = cpu_ldl_data(env, 0xffffff80 + vec * 4);
+            env->pc = cpu_ldl_le_data(env, 0xffffff80 + vec * 4);
         } else {
-            env->pc = cpu_ldl_data(env, env->intb + (vec & 0xff) * 4);
+            env->pc = cpu_ldl_le_data(env, env->intb + (vec & 0xff) * 4);
         }
 
         if (vec == 30) {
target/rx/op_helper.c +3 -3
index 2b190a4b2cf..ca3e9e85fc7 100644
@@ -217,20 +217,20 @@ void helper_scmpu(CPURXState *env)
 static uint32_t (* const cpu_ldufn[])(CPUArchState *env,
                                      abi_ptr ptr,
                                      uintptr_t retaddr) = {
-    cpu_ldub_data_ra, cpu_lduw_data_ra, cpu_ldl_data_ra,
+    cpu_ldub_data_ra, cpu_lduw_le_data_ra, cpu_ldl_le_data_ra,
 };
 
 static uint32_t (* const cpu_ldfn[])(CPUArchState *env,
                                      abi_ptr ptr,
                                      uintptr_t retaddr) = {
-    cpu_ldub_data_ra, cpu_lduw_data_ra, cpu_ldl_data_ra,
+    cpu_ldub_data_ra, cpu_lduw_le_data_ra, cpu_ldl_le_data_ra,
 };
 
 static void (* const cpu_stfn[])(CPUArchState *env,
                                  abi_ptr ptr,
                                  uint32_t val,
                                  uintptr_t retaddr) = {
-    cpu_stb_data_ra, cpu_stw_data_ra, cpu_stl_data_ra,
+    cpu_stb_data_ra, cpu_stw_le_data_ra, cpu_stl_le_data_ra,
 };
 
 void helper_sstr(CPURXState *env, uint32_t sz)
Signature · 1 line
2.52.0
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] target/rx: Use little-endian variant of cpu_ld/st_data*()

Quoted 20 lines · Philippe Mathieu-Daudé

We only build the RX target using little endianness order, therefore the cpu_ld/st_data*() definitions expand to the little endian declarations. Use the explicit little-endian variants.

Mechanical change running:

  $ tgt=rx; \
    end=le; \
    for op in data mmuidx_ra; do \
      for ac in uw sw l q; do \
        sed -i -e "s/cpu_ld${ac}_${op}/cpu_ld${ac}_${end}_${op}/" \
                  $(git grep -l cpu_ target/${tgt}/); \
      done;
      for ac in w l q; do \
        sed -i -e "s/cpu_st${ac}_${op}/cpu_st${ac}_${end}_${op}/" \
                  $(git grep -l cpu_ target/${tgt}/); \
      done;
    done
Quoted 3 lines

---

Quoted 72 lines
 target/rx/helper.c    | 14 +++++++-------
 target/rx/op_helper.c |  6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)
target/rx/helper.c +7 -7
index e9a7aaf610d..83cd491eb4a 100644
@@ -68,10 +68,10 @@ void rx_cpu_do_interrupt(CPUState *cs)
         qemu_log_mask(CPU_LOG_INT, "fast interrupt raised\n");
     } else if (cpu_test_interrupt(cs, CPU_INTERRUPT_HARD)) {
         env->isp -= 4;
-        cpu_stl_data(env, env->isp, save_psw);
+        cpu_stl_le_data(env, env->isp, save_psw);
         env->isp -= 4;
-        cpu_stl_data(env, env->isp, env->pc);
-        env->pc = cpu_ldl_data(env, env->intb + env->ack_irq * 4);
+        cpu_stl_le_data(env, env->isp, env->pc);
+        env->pc = cpu_ldl_le_data(env, env->intb + env->ack_irq * 4);
         env->psw_ipl = env->ack_ipl;
         cpu_reset_interrupt(cs, CPU_INTERRUPT_HARD);
         qemu_set_irq(env->ack, env->ack_irq);
@@ -82,14 +82,14 @@ void rx_cpu_do_interrupt(CPUState *cs)
         const char *expname = "unknown exception";
 
         env->isp -= 4;
-        cpu_stl_data(env, env->isp, save_psw);
+        cpu_stl_le_data(env, env->isp, save_psw);
         env->isp -= 4;
-        cpu_stl_data(env, env->isp, env->pc);
+        cpu_stl_le_data(env, env->isp, env->pc);
 
         if (vec < 0x100) {
-            env->pc = cpu_ldl_data(env, 0xffffff80 + vec * 4);
+            env->pc = cpu_ldl_le_data(env, 0xffffff80 + vec * 4);
         } else {
-            env->pc = cpu_ldl_data(env, env->intb + (vec & 0xff) * 4);
+            env->pc = cpu_ldl_le_data(env, env->intb + (vec & 0xff) * 4);
         }
 
         if (vec == 30) {
target/rx/op_helper.c +3 -4
index 2b190a4b2cf..ca3e9e85fc7 100644
@@ -217,20 +217,20 @@ void helper_scmpu(CPURXState *env)
 static uint32_t (* const cpu_ldufn[])(CPUArchState *env,
                                      abi_ptr ptr,
                                      uintptr_t retaddr) = {
-    cpu_ldub_data_ra, cpu_lduw_data_ra, cpu_ldl_data_ra,
+    cpu_ldub_data_ra, cpu_lduw_le_data_ra, cpu_ldl_le_data_ra,
 };
 
 static uint32_t (* const cpu_ldfn[])(CPUArchState *env,
                                      abi_ptr ptr,
                                      uintptr_t retaddr) = {
-    cpu_ldub_data_ra, cpu_lduw_data_ra, cpu_ldl_data_ra,
+    cpu_ldub_data_ra, cpu_lduw_le_data_ra, cpu_ldl_le_data_ra,
 };
 
 static void (* const cpu_stfn[])(CPUArchState *env,
                                  abi_ptr ptr,
                                  uint32_t val,
                                  uintptr_t retaddr) = {
-    cpu_stb_data_ra, cpu_stw_data_ra, cpu_stl_data_ra,
+    cpu_stb_data_ra, cpu_stw_le_data_ra, cpu_stl_le_data_ra,
 };
 
 void helper_sstr(CPURXState *env, uint32_t sz)
--

2.52.0

#3 lore raw

PATCH 2/4 target/rx: Use explicit little-endian LD/ST API

In reply to Philippe Mathieu-Daudé

The RX architecture uses little endianness. Directly use the little-endian LD/ST API.

Mechanical change using:

  $ end=le; \
    for acc in uw w l q tul; do \
      sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \
             -e "s/st${acc}_p(/st${acc}_${end}_p(/" \
        $(git grep -wlE '(ld|st)t?u?[wlq]_p' target/rx/); \
    done
---
 target/rx/cpu.c     |  2 +-
 target/rx/gdbstub.c | 24 ++++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)
target/rx/cpu.c +1 -1
index da02ae7bf88..0841b594f63 100644
@@ -99,7 +99,7 @@ static void rx_cpu_reset_hold(Object *obj, ResetType type)
     resetvec = rom_ptr(0xfffffffc, 4);
     if (resetvec) {
         /* In the case of kernel, it is ignored because it is not set. */
-        env->pc = ldl_p(resetvec);
+        env->pc = ldl_le_p(resetvec);
     }
     rx_cpu_unpack_psw(env, 0, 1);
     env->regs[0] = env->isp = env->usp = 0;
target/rx/gdbstub.c +12 -12
index f222bf003be..30074c9da7b 100644
@@ -56,7 +56,7 @@ int rx_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
     uint32_t psw;
     switch (n) {
     case 0 ... 15:
-        env->regs[n] = ldl_p(mem_buf);
+        env->regs[n] = ldl_le_p(mem_buf);
         if (n == 0) {
             if (env->psw_u) {
                 env->usp = env->regs[0];
@@ -66,38 +66,38 @@ int rx_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
         }
         break;
     case 16:
-        env->usp = ldl_p(mem_buf);
+        env->usp = ldl_le_p(mem_buf);
         if (env->psw_u) {
-            env->regs[0] = ldl_p(mem_buf);
+            env->regs[0] = ldl_le_p(mem_buf);
         }
         break;
     case 17:
-        env->isp = ldl_p(mem_buf);
+        env->isp = ldl_le_p(mem_buf);
         if (!env->psw_u) {
-            env->regs[0] = ldl_p(mem_buf);
+            env->regs[0] = ldl_le_p(mem_buf);
         }
         break;
     case 18:
-        psw = ldl_p(mem_buf);
+        psw = ldl_le_p(mem_buf);
         rx_cpu_unpack_psw(env, psw, 1);
         break;
     case 19:
-        env->pc = ldl_p(mem_buf);
+        env->pc = ldl_le_p(mem_buf);
         break;
     case 20:
-        env->intb = ldl_p(mem_buf);
+        env->intb = ldl_le_p(mem_buf);
         break;
     case 21:
-        env->bpsw = ldl_p(mem_buf);
+        env->bpsw = ldl_le_p(mem_buf);
         break;
     case 22:
-        env->bpc = ldl_p(mem_buf);
+        env->bpc = ldl_le_p(mem_buf);
         break;
     case 23:
-        env->fintv = ldl_p(mem_buf);
+        env->fintv = ldl_le_p(mem_buf);
         break;
     case 24:
-        env->fpsw = ldl_p(mem_buf);
+        env->fpsw = ldl_le_p(mem_buf);
         break;
     case 25:
         return 8;
Signature · 1 line
2.52.0
Reviewed-by on v1 2/4
#4 lore raw
Quoted 13 lines · Philippe Mathieu-Daudé

The RX architecture uses little endianness. Directly use the little-endian LD/ST API.

Mechanical change using:

  $ end=le; \
    for acc in uw w l q tul; do \
      sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \
             -e "s/st${acc}_p(/st${acc}_${end}_p(/" \
        $(git grep -wlE '(ld|st)t?u?[wlq]_p' target/rx/); \
    done
Quoted 2 lines

---

Quoted 83 lines
 target/rx/cpu.c     |  2 +-
 target/rx/gdbstub.c | 24 ++++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)
target/rx/cpu.c +1 -1
index da02ae7bf88..0841b594f63 100644
@@ -99,7 +99,7 @@ static void rx_cpu_reset_hold(Object *obj, ResetType type)
     resetvec = rom_ptr(0xfffffffc, 4);
     if (resetvec) {
         /* In the case of kernel, it is ignored because it is not set. */
-        env->pc = ldl_p(resetvec);
+        env->pc = ldl_le_p(resetvec);
     }
     rx_cpu_unpack_psw(env, 0, 1);
     env->regs[0] = env->isp = env->usp = 0;
target/rx/gdbstub.c +12 -13
index f222bf003be..30074c9da7b 100644
@@ -56,7 +56,7 @@ int rx_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
     uint32_t psw;
     switch (n) {
     case 0 ... 15:
-        env->regs[n] = ldl_p(mem_buf);
+        env->regs[n] = ldl_le_p(mem_buf);
         if (n == 0) {
             if (env->psw_u) {
                 env->usp = env->regs[0];
@@ -66,38 +66,38 @@ int rx_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
         }
         break;
     case 16:
-        env->usp = ldl_p(mem_buf);
+        env->usp = ldl_le_p(mem_buf);
         if (env->psw_u) {
-            env->regs[0] = ldl_p(mem_buf);
+            env->regs[0] = ldl_le_p(mem_buf);
         }
         break;
     case 17:
-        env->isp = ldl_p(mem_buf);
+        env->isp = ldl_le_p(mem_buf);
         if (!env->psw_u) {
-            env->regs[0] = ldl_p(mem_buf);
+            env->regs[0] = ldl_le_p(mem_buf);
         }
         break;
     case 18:
-        psw = ldl_p(mem_buf);
+        psw = ldl_le_p(mem_buf);
         rx_cpu_unpack_psw(env, psw, 1);
         break;
     case 19:
-        env->pc = ldl_p(mem_buf);
+        env->pc = ldl_le_p(mem_buf);
         break;
     case 20:
-        env->intb = ldl_p(mem_buf);
+        env->intb = ldl_le_p(mem_buf);
         break;
     case 21:
-        env->bpsw = ldl_p(mem_buf);
+        env->bpsw = ldl_le_p(mem_buf);
         break;
     case 22:
-        env->bpc = ldl_p(mem_buf);
+        env->bpc = ldl_le_p(mem_buf);
         break;
     case 23:
-        env->fintv = ldl_p(mem_buf);
+        env->fintv = ldl_le_p(mem_buf);
         break;
     case 24:
-        env->fpsw = ldl_p(mem_buf);
+        env->fpsw = ldl_le_p(mem_buf);
         break;
     case 25:
         return 8;
--

2.52.0

Reviewed-by on v1 2/4
#5 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 12 lines · Philippe Mathieu-Daudé

The RX architecture uses little endianness. Directly use the little-endian LD/ST API.

Mechanical change using:

   $ end=le; \
     for acc in uw w l q tul; do \
       sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \
              -e "s/st${acc}_p(/st${acc}_${end}_p(/" \
         $(git grep -wlE '(ld|st)t?u?[wlq]_p' target/rx/); \
     done
Quoted 5 lines
---
  target/rx/cpu.c     |  2 +-
  target/rx/gdbstub.c | 24 ++++++++++++------------
  2 files changed, 13 insertions(+), 13 deletions(-)

r~

#6 lore raw

PATCH 3/4 target/rx: Inline translator_lduw() and translator_ldl()

In reply to Philippe Mathieu-Daudé

translator_lduw() and translator_ldl() are defined in "exec/translator.h" as:

  192 static inline uint16_t
  193 translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc)
  194 {
  195     return translator_lduw_end(env, db, pc, MO_TE);
  196 }

  198 static inline uint32_t
  199 translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc)
  200 {
  201     return translator_ldl_end(env, db, pc, MO_TE);
  202 }

Directly use the inlined form, expanding MO_TE -> MO_LE since we only build the Renesas RX target as little-endian.

---
 target/rx/translate.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
target/rx/translate.c +5 -4
index ef865f14bf5..d2f73221952 100644
@@ -101,16 +101,16 @@ static uint32_t li(DisasContext *ctx, int sz)
         return (int8_t)translator_ldub(env, &ctx->base, addr);
     case 2:
         ctx->base.pc_next += 2;
-        return (int16_t)translator_lduw(env, &ctx->base, addr);
+        return (int16_t) translator_lduw_end(env, &ctx->base, addr, MO_LE);
     case 3:
         ctx->base.pc_next += 3;
         tmp = (int8_t)translator_ldub(env, &ctx->base, addr + 2);
         tmp <<= 16;
-        tmp |= translator_lduw(env, &ctx->base, addr);
+        tmp |= translator_lduw_end(env, &ctx->base, addr, MO_LE);
         return tmp;
     case 0:
         ctx->base.pc_next += 4;
-        return translator_ldl(env, &ctx->base, addr);
+        return translator_ldl_end(env, &ctx->base, addr, MO_LE);
     default:
         g_assert_not_reached();
     }
@@ -206,7 +206,8 @@ static TCGv_i32 rx_index_addr(DisasContext *ctx, TCGv_i32 mem,
         ctx->base.pc_next += 1;
         return mem;
     case 2:
-        dsp = translator_lduw(ctx->env, &ctx->base, ctx->base.pc_next) << size;
+        dsp = translator_lduw_end(ctx->env, &ctx->base, ctx->base.pc_next,
+                                  MO_LE) << size;
         tcg_gen_addi_i32(mem, cpu_regs[reg], dsp);
         ctx->base.pc_next += 2;
         return mem;
Signature · 1 line
2.52.0
Reviewed-by on v1 3/4
#7 lore raw

Re: [PATCH 3/4] target/rx: Inline translator_lduw() and translator_ldl()

Quoted 16 lines · Philippe Mathieu-Daudé

translator_lduw() and translator_ldl() are defined in "exec/translator.h" as:

  192 static inline uint16_t
  193 translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc)
  194 {
  195     return translator_lduw_end(env, db, pc, MO_TE);
  196 }

  198 static inline uint32_t
  199 translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc)
  200 {
  201     return translator_ldl_end(env, db, pc, MO_TE);
  202 }
Quoted 5 lines

Directly use the inlined form, expanding MO_TE -> MO_LE since we only build the Renesas RX target as little-endian.

---

Quoted 40 lines
 target/rx/translate.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
target/rx/translate.c +5 -5
index ef865f14bf5..d2f73221952 100644
@@ -101,16 +101,16 @@ static uint32_t li(DisasContext *ctx, int sz)
         return (int8_t)translator_ldub(env, &ctx->base, addr);
     case 2:
         ctx->base.pc_next += 2;
-        return (int16_t)translator_lduw(env, &ctx->base, addr);
+        return (int16_t) translator_lduw_end(env, &ctx->base, addr, MO_LE);
     case 3:
         ctx->base.pc_next += 3;
         tmp = (int8_t)translator_ldub(env, &ctx->base, addr + 2);
         tmp <<= 16;
-        tmp |= translator_lduw(env, &ctx->base, addr);
+        tmp |= translator_lduw_end(env, &ctx->base, addr, MO_LE);
         return tmp;
     case 0:
         ctx->base.pc_next += 4;
-        return translator_ldl(env, &ctx->base, addr);
+        return translator_ldl_end(env, &ctx->base, addr, MO_LE);
     default:
         g_assert_not_reached();
     }
@@ -206,7 +206,8 @@ static TCGv_i32 rx_index_addr(DisasContext *ctx, TCGv_i32 mem,
         ctx->base.pc_next += 1;
         return mem;
     case 2:
-        dsp = translator_lduw(ctx->env, &ctx->base, ctx->base.pc_next) << size;
+        dsp = translator_lduw_end(ctx->env, &ctx->base, ctx->base.pc_next,
+                                  MO_LE) << size;
         tcg_gen_addi_i32(mem, cpu_regs[reg], dsp);
         ctx->base.pc_next += 2;
         return mem;
--

2.52.0

Reviewed-by on v1 3/4
#8 lore raw

Re: [PATCH 3/4] target/rx: Inline translator_lduw() and translator_ldl()

In reply to Philippe Mathieu-Daudé
Quoted 15 lines · Philippe Mathieu-Daudé

translator_lduw() and translator_ldl() are defined in "exec/translator.h" as:

   192 static inline uint16_t
   193 translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc)
   194 {
   195     return translator_lduw_end(env, db, pc, MO_TE);
   196 }

   198 static inline uint32_t
   199 translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc)
   200 {
   201     return translator_ldl_end(env, db, pc, MO_TE);
   202 }
Quoted 7 lines

Directly use the inlined form, expanding MO_TE -> MO_LE since we only build the Renesas RX target as little-endian.

---
  target/rx/translate.c | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)

Using mo_endian(),

r~

#9 lore raw

PATCH 4/4 configs/targets: Forbid Renesas RX to use legacy native endianness API

In reply to Philippe Mathieu-Daudé

The qemu-system-rx binary is buildable without a single use of the legacy "native endian" API. Unset the transitional TARGET_USE_LEGACY_NATIVE_ENDIAN_API definition to forbid further uses of the legacy API.

Preliminary commits allowing this final change:

. 0f4af4e2672 target/rx: Use MemOp type in gen_ld[u]() and gen_st() . 2062fa663c0 target/rx: Propagate DisasContext to generated helpers . 8b71fd6ffec target/rx: Propagate DisasContext to push() / pop() . 363fff6d1b1 target/rx: Propagate DisasContext to gen_ld[u]() and gen_st() . cb8e4556d58 target/rx: Factor mo_endian() helper out
. f9903a8a23e target/rx: Replace MO_TE -> MO_LE

---
 configs/targets/rx-softmmu.mak | 1 +
 1 file changed, 1 insertion(+)
configs/targets/rx-softmmu.mak +1 -0
index 3a90f1b9977..281a165873a 100644
@@ -4,3 +4,4 @@ TARGET_XML_FILES= gdb-xml/rx-core.xml
 TARGET_NEED_FDT=y
 TARGET_LONG_BITS=32
 TARGET_NOT_USING_LEGACY_LDST_PHYS_API=y
+TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=y
Signature · 1 line
2.52.0
Reviewed-by on v1 4/4
#10 lore raw

Re: [PATCH 4/4] configs/targets: Forbid Renesas RX to use legacy native endianness API

Quoted 15 lines · Philippe Mathieu-Daudé

The qemu-system-rx binary is buildable without a single use of the legacy "native endian" API. Unset the transitional TARGET_USE_LEGACY_NATIVE_ENDIAN_API definition to forbid further uses of the legacy API.

Preliminary commits allowing this final change:

. 0f4af4e2672 target/rx: Use MemOp type in gen_ld[u]() and gen_st() . 2062fa663c0 target/rx: Propagate DisasContext to generated helpers . 8b71fd6ffec target/rx: Propagate DisasContext to push() / pop() . 363fff6d1b1 target/rx: Propagate DisasContext to gen_ld[u]() and gen_st() . cb8e4556d58 target/rx: Factor mo_endian() helper out
. f9903a8a23e target/rx: Replace MO_TE -> MO_LE

Quoted 2 lines

---

Quoted 15 lines
 configs/targets/rx-softmmu.mak | 1 +
 1 file changed, 1 insertion(+)
configs/targets/rx-softmmu.mak +1 -1
index 3a90f1b9977..281a165873a 100644
@@ -4,3 +4,4 @@ TARGET_XML_FILES= gdb-xml/rx-core.xml
 TARGET_NEED_FDT=y
 TARGET_LONG_BITS=32
 TARGET_NOT_USING_LEGACY_LDST_PHYS_API=y
+TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=y
--

2.52.0

Reviewed-by on v1 4/4
#11 lore raw

Re: [PATCH 4/4] configs/targets: Forbid Renesas RX to use legacy native endianness API

In reply to Philippe Mathieu-Daudé
Quoted 14 lines · Philippe Mathieu-Daudé

The qemu-system-rx binary is buildable without a single use of the legacy "native endian" API. Unset the transitional TARGET_USE_LEGACY_NATIVE_ENDIAN_API definition to forbid further uses of the legacy API.

Preliminary commits allowing this final change:

. 0f4af4e2672 target/rx: Use MemOp type in gen_ld[u]() and gen_st() . 2062fa663c0 target/rx: Propagate DisasContext to generated helpers . 8b71fd6ffec target/rx: Propagate DisasContext to push() / pop() . 363fff6d1b1 target/rx: Propagate DisasContext to gen_ld[u]() and gen_st() . cb8e4556d58 target/rx: Factor mo_endian() helper out
. f9903a8a23e target/rx: Replace MO_TE -> MO_LE

Quoted 4 lines
---
  configs/targets/rx-softmmu.mak | 1 +
  1 file changed, 1 insertion(+)

r~