Commit 50773fd23d4c269516a1ddc19964f562d7e580ff
1 parent
e6f2870e
Sparse fixes: add extern to ELF opcode tables to avoid warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6740 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
0 deletions
target-ppc/translate.c
| @@ -604,6 +604,7 @@ enum { | @@ -604,6 +604,7 @@ enum { | ||
| 604 | 604 | ||
| 605 | #if defined(DO_PPC_STATISTICS) | 605 | #if defined(DO_PPC_STATISTICS) |
| 606 | #define GEN_OPCODE(name, op1, op2, op3, invl, _typ) \ | 606 | #define GEN_OPCODE(name, op1, op2, op3, invl, _typ) \ |
| 607 | +extern opcode_t opc_##name; \ | ||
| 607 | OPCODES_SECTION opcode_t opc_##name = { \ | 608 | OPCODES_SECTION opcode_t opc_##name = { \ |
| 608 | .opc1 = op1, \ | 609 | .opc1 = op1, \ |
| 609 | .opc2 = op2, \ | 610 | .opc2 = op2, \ |
| @@ -633,6 +634,7 @@ OPCODES_SECTION opcode_t opc_##name = { \ | @@ -633,6 +634,7 @@ OPCODES_SECTION opcode_t opc_##name = { \ | ||
| 633 | } | 634 | } |
| 634 | #else | 635 | #else |
| 635 | #define GEN_OPCODE(name, op1, op2, op3, invl, _typ) \ | 636 | #define GEN_OPCODE(name, op1, op2, op3, invl, _typ) \ |
| 637 | +extern opcode_t opc_##name; \ | ||
| 636 | OPCODES_SECTION opcode_t opc_##name = { \ | 638 | OPCODES_SECTION opcode_t opc_##name = { \ |
| 637 | .opc1 = op1, \ | 639 | .opc1 = op1, \ |
| 638 | .opc2 = op2, \ | 640 | .opc2 = op2, \ |
| @@ -646,6 +648,7 @@ OPCODES_SECTION opcode_t opc_##name = { \ | @@ -646,6 +648,7 @@ OPCODES_SECTION opcode_t opc_##name = { \ | ||
| 646 | .oname = stringify(name), \ | 648 | .oname = stringify(name), \ |
| 647 | } | 649 | } |
| 648 | #define GEN_OPCODE2(name, onam, op1, op2, op3, invl, _typ) \ | 650 | #define GEN_OPCODE2(name, onam, op1, op2, op3, invl, _typ) \ |
| 651 | +extern opcode_t opc_##name; \ | ||
| 649 | OPCODES_SECTION opcode_t opc_##name = { \ | 652 | OPCODES_SECTION opcode_t opc_##name = { \ |
| 650 | .opc1 = op1, \ | 653 | .opc1 = op1, \ |
| 651 | .opc2 = op2, \ | 654 | .opc2 = op2, \ |
| @@ -661,6 +664,7 @@ OPCODES_SECTION opcode_t opc_##name = { \ | @@ -661,6 +664,7 @@ OPCODES_SECTION opcode_t opc_##name = { \ | ||
| 661 | #endif | 664 | #endif |
| 662 | 665 | ||
| 663 | #define GEN_OPCODE_MARK(name) \ | 666 | #define GEN_OPCODE_MARK(name) \ |
| 667 | +extern opcode_t opc_##name; \ | ||
| 664 | OPCODES_SECTION opcode_t opc_##name = { \ | 668 | OPCODES_SECTION opcode_t opc_##name = { \ |
| 665 | .opc1 = 0xFF, \ | 669 | .opc1 = 0xFF, \ |
| 666 | .opc2 = 0xFF, \ | 670 | .opc2 = 0xFF, \ |