Patchwork tcg/ppc: Add missing conditional compilation

login
register
mail settings
Submitter Stefan Weil
Date Feb. 22, 2010, 4:43 p.m.
Message ID <1266857032-10078-1-git-send-email-weil@mail.berlios.de>
Download mbox | patch
Permalink /patch/45972/
State New
Headers show

Comments

Stefan Weil - Feb. 22, 2010, 4:43 p.m.
INDEX_op_qemu_ld32s is only used when
TCG_TARGET_REG_BITS == 64.

This fixes a compile error
(reported by Alexander Graf).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 tcg/ppc/tcg-target.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
malc - Feb. 22, 2010, 5:09 p.m.
On Mon, 22 Feb 2010, Stefan Weil wrote:

> INDEX_op_qemu_ld32s is only used when
> TCG_TARGET_REG_BITS == 64.

TCG_TARGET_REG_BITS is always 32 for PPC32.

[..snip..]

Patch

diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c
index 903b69f..9f801c2 100644
--- a/tcg/ppc/tcg-target.c
+++ b/tcg/ppc/tcg-target.c
@@ -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" } },