Skip to contentSkip to conversation

[6740] Sparse fixes: add extern to ELF opcode tables to avoid warnings

Qemu-devel Blue Swirl 1 participant 1 message Mar 7, 2009

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 6740

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6740
Author:   blueswir1
Date:     2009-03-07 15:59:09 +0000 (Sat, 07 Mar 2009)

Log Message:
-----------
Sparse fixes: add extern to ELF opcode tables to avoid warnings

Modified Paths:
--------------
trunk/target-ppc/translate.c

Modified: trunk/target-ppc/translate.c
===================================================================

target-ppc/translate.c +4 -0
@@ -604,6 +604,7 @@
 
 #if defined(DO_PPC_STATISTICS)
 #define GEN_OPCODE(name, op1, op2, op3, invl, _typ)                           \
+extern opcode_t opc_##name;                                                   \
 OPCODES_SECTION opcode_t opc_##name = {                                       \
     .opc1 = op1,                                                              \
     .opc2 = op2,                                                              \
@@ -633,6 +634,7 @@
 }
 #else
 #define GEN_OPCODE(name, op1, op2, op3, invl, _typ)                           \
+extern opcode_t opc_##name;                                                   \
 OPCODES_SECTION opcode_t opc_##name = {                                       \
     .opc1 = op1,                                                              \
     .opc2 = op2,                                                              \
@@ -646,6 +648,7 @@
     .oname = stringify(name),                                                 \
 }
 #define GEN_OPCODE2(name, onam, op1, op2, op3, invl, _typ)                    \
+extern opcode_t opc_##name;                                                   \
 OPCODES_SECTION opcode_t opc_##name = {                                       \
     .opc1 = op1,                                                              \
     .opc2 = op2,                                                              \
@@ -661,6 +664,7 @@
 #endif
 
 #define GEN_OPCODE_MARK(name)                                                 \
+extern opcode_t opc_##name;                                                   \
 OPCODES_SECTION opcode_t opc_##name = {                                       \
     .opc1 = 0xFF,                                                             \
     .opc2 = 0xFF,                                                             \