Skip to contentSkip to conversation

tcg/tci: Remove unnecessary TODO() for INDEX_op_bswap16_i64

PATCH In review Jaroslaw Pelczar 2 participants 2 messages Jul 12, 2017 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20170712135227eucas1p1d5baf43182869329c6dd282e52143444@eucas1p1.samsung.com

#1 lore raw

PATCH 1/1 tcg/tci: Remove unnecessary TODO() for INDEX_op_bswap16_i64

Running Ubuntu with systemd on AArch64 Cortex-A53 and qemu is compiled with

./configure --target-list=aarch64-softmmu --enable-tcg-interpreter

System gives the following log:

Welcome to Ubuntu 16.04.1 LTS!

systemd[1]: Set hostname to <localhost.localdomain>. TODO (...)/qemu/tcg/tci.c:1049: tcg_qemu_tb_exec() (...)/qemu/tcg/tci.c:1049: tcg fatal error Aborted (core dumped)

After investigation it turns out that TCG generates bswap16_i64 opcode, which looks fine in the implementation.

---
 tcg/tci.c | 1 -
 1 file changed, 1 deletion(-)
tcg/tci.c +0 -0
index 4bdc645..f39bfb9 100644
@@ -1046,7 +1046,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t

*tb_ptr)

             break;
 #if TCG_TARGET_HAS_bswap16_i64
         case INDEX_op_bswap16_i64:
-            TODO();
             t0 = *tb_ptr++;
             t1 = tci_read_r16(&tb_ptr);
             tci_write_reg64(t0, bswap16(t1));
Signature · 1 line
2.7.4
#2 lore raw

Hi Jaroslaw,

Thank for reporting this, however this fix has been reviewed:
http://patchwork.ozlabs.org/patch/781982/

Quoted 9 lines · Jaroslaw Pelczar

Running Ubuntu with systemd on AArch64 Cortex-A53 and qemu is compiled with

./configure --target-list=aarch64-softmmu --enable-tcg-interpreter

System gives the following log:

Welcome to Ubuntu 16.04.1 LTS!

Quoted 7 lines

systemd[1]: Set hostname to <localhost.localdomain>. TODO (...)/qemu/tcg/tci.c:1049: tcg_qemu_tb_exec() (...)/qemu/tcg/tci.c:1049: tcg fatal error Aborted (core dumped)

After investigation it turns out that TCG generates bswap16_i64 opcode, which looks fine in the implementation.

Indeed while correctly implemented, "that code part was simply never executed, and [Stefan] only removed the TODO() statements from tested code." as explained Stefan.

Quoted 1 line

I can add your Signed-off-by there if you mind

Quoted 16 lines
---
  tcg/tci.c | 1 -
  1 file changed, 1 deletion(-)
tcg/tci.c +0 -1
index 4bdc645..f39bfb9 100644
@@ -1046,7 +1046,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t
 *tb_ptr)
              break;
  #if TCG_TARGET_HAS_bswap16_i64
          case INDEX_op_bswap16_i64:
-            TODO();
              t0 = *tb_ptr++;
              t1 = tci_read_r16(&tb_ptr);
Quoted 2 lines
              tci_write_reg64(t0, bswap16(t1));

Regards,

Phil.