tcg: fix assertion with --enable-debug
PATCH v2 1/1 tcg: fix assertion with --enable-debug
On 32-bit hosts op_qemu_ld32s is unused. Remove it to fix the following assertion failure:
qemu-alpha: tcg/tcg.c:1055:tcg_add_target_add_op_defs: Assertion `tcg_op_defs[op].used' failed.
--- tcg/tcg-opc.h | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
tcg/tcg-opc.h +0 -0
@@ -224,11 +224,6 @@ DEF2(qemu_ld32u, 1, 1, 1, TCG_OPF_CALL_CLOBBER |
TCG_OPF_SIDE_EFFECTS)
DEF2(qemu_ld32u, 1, 2, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS) #endif
#if TARGET_LONG_BITS == 32
-DEF2(qemu_ld32s, 1, 1, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS) -#else
-DEF2(qemu_ld32s, 1, 2, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS) -#endif
-#if TARGET_LONG_BITS == 32
DEF2(qemu_ld64, 2, 1, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS) #else
DEF2(qemu_ld64, 2, 2, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS)
Blue Swirl
AppliedThanks, applied.
Quoted 31 lines · Jay Foad
On 32-bit hosts
op_qemu_ld32sis unused. Remove it to fix the
following assertion failure:qemu-alpha:
tcg/tcg.c:1055:
tcg_add_target_add_op_defs: Assertion `tcg_op_defs[op].used' failed.Signed-off-by Jay Foad <[email protected]>---
tcg/tcg-opc.h | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)diff --git
a/tcg/tcg-opc.hb/tcg/tcg-opc.h
index 89db3b4..838f1f4 100644
---a/tcg/tcg-opc.h
+++b/tcg/tcg-opc.h
@@ -224,11 +224,6 @@DEF2(qemu_ld32u, 1, 1, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS)
DEF2(qemu_ld32u, 1, 2, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS)#endif
#ifTARGET_LONG_BITS== 32
-DEF2(qemu_ld32s, 1, 1, 1,TCG_OPF_CALL_CLOBBER|TCG_OPF_SIDE_EFFECTS) -#else
-DEF2(qemu_ld32s, 1, 2, 1,TCG_OPF_CALL_CLOBBER|TCG_OPF_SIDE_EFFECTS) -#endif
-#ifTARGET_LONG_BITS== 32
DEF2(qemu_ld64, 2, 1, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS)#else
DEF2(qemu_ld64, 2, 2, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS)
Quoted 2 lines · Blue Swirl
Thanks, applied.
This patch breaks building on ppc32. Reverting it makes it compile again:
In file included from /suse/agraf/git/qemu/tcg/tcg.c:158:
/suse/agraf/git/qemu/tcg/ppc/tcg-target.c:1696: error:
‘INDEX_op_qemu_ld32s’ undeclared here (not in a function)
Alex
Quoted 37 lines · Jay Foad
Quoted 33 lines
On 32-bit hosts
op_qemu_ld32sis unused. Remove it to fix the
following assertion failure:qemu-alpha:
tcg/tcg.c:1055:
tcg_add_target_add_op_defs: Assertion `tcg_op_defs[op].used' failed.Signed-off-by Jay Foad <[email protected]>---
tcg/tcg-opc.h | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)diff --git
a/tcg/tcg-opc.hb/tcg/tcg-opc.h
index 89db3b4..838f1f4 100644
---a/tcg/tcg-opc.h
+++b/tcg/tcg-opc.h
@@ -224,11 +224,6 @@DEF2(qemu_ld32u, 1, 1, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS)
DEF2(qemu_ld32u, 1, 2, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS)#endif
#ifTARGET_LONG_BITS== 32
-DEF2(qemu_ld32s, 1, 1, 1,TCG_OPF_CALL_CLOBBER|TCG_OPF_SIDE_EFFECTS) -#else
-DEF2(qemu_ld32s, 1, 2, 1,TCG_OPF_CALL_CLOBBER|TCG_OPF_SIDE_EFFECTS) -#endif
-#ifTARGET_LONG_BITS== 32
DEF2(qemu_ld64, 2, 1, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS)#else
DEF2(qemu_ld64, 2, 2, 1, TCG_OPF_CALL_CLOBBER | TCG_OPF_SIDE_EFFECTS)
Quoted 4 lines
This patch breaks building on ppc32. Reverting it makes it compile again:
/suse/agraf/git/qemu/tcg/ppc/tcg-target.c:1696: error:
‘INDEX_op_qemu_ld32s’ undeclared here (not in a function)
Does it build if you remove line 1696? If so, I'd suggest doing that.
Thanks,
Jay.
Quoted 4 lines · Jay Foad
Quoted 2 lines
This patch breaks building on ppc32. Reverting it makes it compile again:
Quoted 8 lines
Quoted 3 lines
/suse/agraf/git/qemu/tcg/ppc/tcg-target.c:1696: error:
‘INDEX_op_qemu_ld32s’ undeclared here (not in a function)Does it build if you remove line 1696? If so, I'd suggest doing that.
Thanks,
Jay.
Removing the line helps only in that special case. #if TCG_TARGET_REG_BITS == 64 ... #endif is better. I can provide a patch.
Regards,
Stefan
Quoted 10 lines · Jay Foad
Quoted 7 lines
This patch breaks building on ppc32. Reverting it makes it compile again:
/suse/agraf/git/qemu/tcg/ppc/tcg-target.c:1696: error:
‘INDEX_op_qemu_ld32s’ undeclared here (not in a function)Does it build if you remove line 1696? If so, I'd suggest doing that.
Yes, that fixes it. Please grep through all tcg targets and send a patch removing all references to ld32s if you think it's not necessary.
Alex
Quoted 5 lines
Quoted 2 lines
Does it build if you remove line 1696? If so, I'd suggest doing that.
Yes, that fixes it. Please grep through all tcg targets and send a patch removing all references to ld32s if you think it's not necessary.
Done. Unfortunately I'm not in a position to try building any of the affected tcg targets. Or is there a way I can test it without an hppa/ppc/sparc cross-compiler?
Thanks,
Jay.
PATCH 1/1 tcg/ppc: Add missing conditional compilation
In reply to Stefan WeilINDEX_op_qemu_ld32s is only used whenTCG_TARGET_REG_BITS == 64.
This fixes a compile error
(reported by Alexander Graf).
--- tcg/ppc/tcg-target.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
tcg/ppc/tcg-target.c +4 -0
@@ -1693,7 +1693,9 @@ static const TCGTargetOpDef ppc_op_defs[] = { { INDEX_op_qemu_ld16u, { "r", "L" } }, { INDEX_op_qemu_ld16s, { "r", "L" } }, { INDEX_op_qemu_ld32u, { "r", "L" } }, +#if TCG_TARGET_REG_BITS == 64 { INDEX_op_qemu_ld32s, { "r", "L" } }, +#endif { INDEX_op_qemu_ld64, { "r", "r", "L" } }, { INDEX_op_qemu_st8, { "K", "K" } },
@@ -1706,7 +1708,9 @@ static const TCGTargetOpDef ppc_op_defs[] = { { INDEX_op_qemu_ld16u, { "r", "L", "L" } }, { INDEX_op_qemu_ld16s, { "r", "L", "L" } }, { INDEX_op_qemu_ld32u, { "r", "L", "L" } }, +#if TCG_TARGET_REG_BITS == 64 { INDEX_op_qemu_ld32s, { "r", "L", "L" } }, +#endif { INDEX_op_qemu_ld64, { "r", "L", "L", "L" } }, { INDEX_op_qemu_st8, { "K", "K", "K" } },
Signature · 1 line
1.6.6.1
Re: [Qemu-devel] [PATCH] tcg/ppc: Add missing conditional compilation
Quoted 2 lines · Stefan Weil
INDEX_op_qemu_ld32sis only used whenTCG_TARGET_REG_BITS== 64.
TCG_TARGET_REG_BITS is always 32 for PPC32.
[..snip..]
Signature · 1 line
mailto:[email protected]