diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2008-07-16 07:07:05 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-20 09:38:18 -0400 |
commit | d6d8a4635a8451ca3c6fa2aaf9bbf934d8e2097b (patch) | |
tree | 5c88efce6c89e6c3500a875ab285f1db5fa3cec3 /include | |
parent | c29d150305f7f655b7002cc31754c605e5c0d1a0 (diff) |
[MIPS] Tinker with constraints in <asm/atomic.h> to fix build error.
[...]
CC init/main.o
include/asm/bitops.h: In function `start_kernel':
include/asm/bitops.h:76: warning: asm operand 2 probably doesn't match
constraints
include/asm/bitops.h:76: warning: asm operand 2 probably doesn't match
constraints
include/asm/bitops.h:76: warning: asm operand 2 probably doesn't match
constraints
include/asm/bitops.h:76: error: impossible constraint in `asm'
include/asm/bitops.h:76: error: impossible constraint in `asm'
include/asm/bitops.h:76: error: impossible constraint in `asm'
make[1]: *** [init/main.o] Error 1
[...]
The build error is caused by the ages old gcc bug where gcc at the time of
analyzing the constraints is unable to figure out that an "i" constraint
actually can be satisfied and thus will abort unless an "r" is added to
the constraint. For the actual code generation gcc will only ever use the
"i" constraint.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/bitops.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 9a7274ba6a0b..49df8c4c9d25 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -82,7 +82,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | |||
82 | "2: b 1b \n" | 82 | "2: b 1b \n" |
83 | " .previous \n" | 83 | " .previous \n" |
84 | : "=&r" (temp), "=m" (*m) | 84 | : "=&r" (temp), "=m" (*m) |
85 | : "i" (bit), "m" (*m), "r" (~0)); | 85 | : "ir" (bit), "m" (*m), "r" (~0)); |
86 | #endif /* CONFIG_CPU_MIPSR2 */ | 86 | #endif /* CONFIG_CPU_MIPSR2 */ |
87 | } else if (cpu_has_llsc) { | 87 | } else if (cpu_has_llsc) { |
88 | __asm__ __volatile__( | 88 | __asm__ __volatile__( |
@@ -147,7 +147,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | |||
147 | "2: b 1b \n" | 147 | "2: b 1b \n" |
148 | " .previous \n" | 148 | " .previous \n" |
149 | : "=&r" (temp), "=m" (*m) | 149 | : "=&r" (temp), "=m" (*m) |
150 | : "i" (bit), "m" (*m)); | 150 | : "ir" (bit), "m" (*m)); |
151 | #endif /* CONFIG_CPU_MIPSR2 */ | 151 | #endif /* CONFIG_CPU_MIPSR2 */ |
152 | } else if (cpu_has_llsc) { | 152 | } else if (cpu_has_llsc) { |
153 | __asm__ __volatile__( | 153 | __asm__ __volatile__( |
@@ -428,7 +428,7 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
428 | "2: b 1b \n" | 428 | "2: b 1b \n" |
429 | " .previous \n" | 429 | " .previous \n" |
430 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 430 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
431 | : "i" (bit), "m" (*m) | 431 | : "ir" (bit), "m" (*m) |
432 | : "memory"); | 432 | : "memory"); |
433 | #endif | 433 | #endif |
434 | } else if (cpu_has_llsc) { | 434 | } else if (cpu_has_llsc) { |