diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-24 11:39:17 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-24 11:39:17 +0000 |
commit | 9da3385a50dc0f359e6f46cade1a30678fce0a50 (patch) | |
tree | 31db42ec16b028626349471db713873ff1c69280 | |
parent | 3d2c829c692a383ad7859a044d57a76acd196e32 (diff) | |
download | rockbox-9da3385a50dc0f359e6f46cade1a30678fce0a50.tar.gz rockbox-9da3385a50dc0f359e6f46cade1a30678fce0a50.zip |
gcc 3.4 has a different constraint syntax
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4933 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/export/system.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h index cfb771d66b..0d601e3d47 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -49,25 +49,32 @@ extern void system_init(void); | |||
49 | #define nop \ | 49 | #define nop \ |
50 | asm volatile ("nop") | 50 | asm volatile ("nop") |
51 | 51 | ||
52 | /* gcc 3.4 changed the format of the constraints */ | ||
53 | #if (__GNUC__ >= 3) && (__GNUC_MINOR__ > 3) | ||
54 | #define I_CONSTRAINT "I08" | ||
55 | #else | ||
56 | #define I_CONSTRAINT "I" | ||
57 | #endif | ||
58 | |||
52 | #define or_b(mask, address) \ | 59 | #define or_b(mask, address) \ |
53 | asm \ | 60 | asm \ |
54 | ("or.b\t%0,@(r0,gbr)" \ | 61 | ("or.b\t%0,@(r0,gbr)" \ |
55 | : \ | 62 | : \ |
56 | : /* %0 */ "I"((char)(mask)), \ | 63 | : /* %0 */ I_CONSTRAINT((char)(mask)), \ |
57 | /* %1 */ "z"(address-GBR)) | 64 | /* %1 */ "z"(address-GBR)) |
58 | 65 | ||
59 | #define and_b(mask, address) \ | 66 | #define and_b(mask, address) \ |
60 | asm \ | 67 | asm \ |
61 | ("and.b\t%0,@(r0,gbr)" \ | 68 | ("and.b\t%0,@(r0,gbr)" \ |
62 | : \ | 69 | : \ |
63 | : /* %0 */ "I"((char)(mask)), \ | 70 | : /* %0 */ I_CONSTRAINT((char)(mask)), \ |
64 | /* %1 */ "z"(address-GBR)) | 71 | /* %1 */ "z"(address-GBR)) |
65 | 72 | ||
66 | #define xor_b(mask, address) \ | 73 | #define xor_b(mask, address) \ |
67 | asm \ | 74 | asm \ |
68 | ("xor.b\t%0,@(r0,gbr)" \ | 75 | ("xor.b\t%0,@(r0,gbr)" \ |
69 | : \ | 76 | : \ |
70 | : /* %0 */ "I"((char)(mask)), \ | 77 | : /* %0 */ I_CONSTRAINT((char)(mask)), \ |
71 | /* %1 */ "z"(address-GBR)) | 78 | /* %1 */ "z"(address-GBR)) |
72 | 79 | ||
73 | #ifndef SIMULATOR | 80 | #ifndef SIMULATOR |