Skip to contentSkip to conversation

tcg/tci: Restrict tci_write_reg16() to 64-bit hosts

PATCH Applied Philippe Mathieu-Daudé 3 participants 3 messages Jan 23, 2021 – Jan 27, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcg/tci: Restrict tci_write_reg16() to 64-bit hosts

Restrict tci_write_reg16() to 64-bit hosts to fix on 32-bit ones:

[520/1115] Compiling C object libqemu-arm-linux-user.fa.p/tcg_tci.c.o
FAILED: libqemu-arm-linux-user.fa.p/tcg_tci.c.o
tcg/tci.c:132:1: error: 'tci_write_reg16' defined but not used [-Werror=unused-function]
tci_write_reg16(tcg_target_ulong *regs, TCGReg index, uint16_t value) ^~~~~~~~~~~~~~~

Fixes 2f160e0f979 ("tci: Add implementation for INDEX_op_ld16u_i64")
---
 tcg/tci.c | 2 ++
 1 file changed, 2 insertions(+)
tcg/tci.c +2 -0
index 2311aa7d3ab..3fc82d3c79d 100644
@@ -128,11 +128,13 @@ static void tci_write_reg8(tcg_target_ulong *regs, TCGReg index, uint8_t value)
     tci_write_reg(regs, index, value);
 }
 
+#if TCG_TARGET_REG_BITS == 64
 static void
 tci_write_reg16(tcg_target_ulong *regs, TCGReg index, uint16_t value)
 {
     tci_write_reg(regs, index, value);
 }
+#endif
 
 static void
 tci_write_reg32(tcg_target_ulong *regs, TCGReg index, uint32_t value)
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw

Am 23.01.21 um 10:41 schrieb Philippe Mathieu-Daudé:

Quoted 22 lines

Restrict tci_write_reg16() to 64-bit hosts to fix on 32-bit ones:

[520/1115] Compiling C object libqemu-arm-linux-user.fa.p/tcg_tci.c.o
FAILED: libqemu-arm-linux-user.fa.p/tcg_tci.c.o
tcg/tci.c:132:1: error: 'tci_write_reg16' defined but not used [-Werror=unused-function]
tci_write_reg16(tcg_target_ulong *regs, TCGReg index, uint16_t value) ^~~~~~~~~~~~~~~

Fixes 2f160e0f979 ("tci: Add implementation for INDEX_op_ld16u_i64")
---
  tcg/tci.c | 2 ++
  1 file changed, 2 insertions(+)
tcg/tci.c +0 -0
index 2311aa7d3ab..3fc82d3c79d 100644
@@ -128,11 +128,13 @@ static void tci_write_reg8(tcg_target_ulong *regs, TCGReg index, uint8_t value)
      tci_write_reg(regs, index, value);
  }
 

tcg/tci.c static void tci_write_reg8(tcg_target_ulong *regs, TCGReg index, uint8_t value) · line 140

Quoted 10 lines
tcg/tci.c +2 -0
+#if TCG_TARGET_REG_BITS == 64
  static void
  tci_write_reg16(tcg_target_ulong *regs, TCGReg index, uint16_t value)
  {
      tci_write_reg(regs, index, value);
  }
+#endif
 
  static void
  tci_write_reg32(tcg_target_ulong *regs, TCGReg index, uint32_t value)

Thanks for fixing this. This could optionally be applied via qemu-trivial.

#2 lore raw

Le 23/01/2021 à 11:30, Stefan Weil a écrit :

Quoted 36 lines

Am 23.01.21 um 10:41 schrieb Philippe Mathieu-Daudé:

Quoted 22 lines

Restrict tci_write_reg16() to 64-bit hosts to fix on 32-bit ones:

   [520/1115] Compiling C object libqemu-arm-linux-user.fa.p/tcg_tci.c.o
   FAILED: libqemu-arm-linux-user.fa.p/tcg_tci.c.o
   tcg/tci.c:132:1: error: 'tci_write_reg16' defined but not used [-Werror=unused-function] tci_write_reg16(tcg_target_ulong *regs, TCGReg index, uint16_t value) ^~~~~~~~~~~~~~~

Fixes 2f160e0f979 ("tci: Add implementation for INDEX_op_ld16u_i64")

---
  tcg/tci.c | 2 ++

  1 file changed, 2 insertions(+)
tcg/tci.c +0 -0
index 2311aa7d3ab..3fc82d3c79d 100644
@@ -128,11 +128,13 @@ static void tci_write_reg8(tcg_target_ulong *regs, TCGReg index, uint8_t value)
       tci_write_reg(regs, index, value);
   }

  +#if TCG_TARGET_REG_BITS == 64

Quoted 8 lines

  static void
  tci_write_reg16(tcg_target_ulong *regs, TCGReg index, uint16_t value) {
      tci_write_reg(regs, index, value);
  }
+#endif
    static void
  tci_write_reg32(tcg_target_ulong *regs, TCGReg index, uint32_t value)

Thanks for fixing this. This could optionally be applied via qemu-trivial.

Quoted 3 lines

Applied to my trivial-patches branch.

Thanks,
Laurent