Commit 933dc6ebc4b908be93929ac80399ba315ba626cd
1 parent
1e6cae95
Mac OS X port
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@998 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
9 additions
and
4 deletions
target-ppc/translate.c
... | ... | @@ -276,9 +276,15 @@ static inline uint32_t MASK (uint32_t start, uint32_t end) |
276 | 276 | return ret; |
277 | 277 | } |
278 | 278 | |
279 | +#if defined(__linux__) | |
280 | +#define OPCODES_SECTION \ | |
281 | + __attribute__ ((section(".opcodes"), unused, aligned (8) )) | |
282 | +#else | |
283 | +#define OPCODES_SECTION | |
284 | +#endif | |
285 | + | |
279 | 286 | #define GEN_OPCODE(name, op1, op2, op3, invl, _typ) \ |
280 | -__attribute__ ((section(".opcodes"), unused, aligned (8) )) \ | |
281 | -static opcode_t opc_##name = { \ | |
287 | +OPCODES_SECTION static opcode_t opc_##name = { \ | |
282 | 288 | .opc1 = op1, \ |
283 | 289 | .opc2 = op2, \ |
284 | 290 | .opc3 = op3, \ |
... | ... | @@ -290,8 +296,7 @@ static opcode_t opc_##name = { \ |
290 | 296 | } |
291 | 297 | |
292 | 298 | #define GEN_OPCODE_MARK(name) \ |
293 | -__attribute__ ((section(".opcodes"), unused, aligned (8) )) \ | |
294 | -static opcode_t opc_##name = { \ | |
299 | +OPCODES_SECTION static opcode_t opc_##name = { \ | |
295 | 300 | .opc1 = 0xFF, \ |
296 | 301 | .opc2 = 0xFF, \ |
297 | 302 | .opc3 = 0xFF, \ | ... | ... |