aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-08-12 10:00:35 -0400
committerH. Peter Anvin <hpa@zytor.com>2010-08-12 10:04:16 -0400
commit417484d47e115774745ef025bce712a102b6f86f (patch)
tree2a898b29b691ae0f1617e1189d57abbcbeb7383c /arch/x86/lib
parent30246557a06bb20618bed906a06d1e1e0faa8bb4 (diff)
x86, asm: Use a lower case name for the end macro in atomic64_386_32.S
Use a lowercase name for the end macro, which somehow fixes a binutils 2.16 problem. Signed-off-by: Luca Barbieri <luca@luca-barbieri.com> LKML-Reference: <tip-30246557a06bb20618bed906a06d1e1e0faa8bb4@git.kernel.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/atomic64_386_32.S38
1 files changed, 20 insertions, 18 deletions
diff --git a/arch/x86/lib/atomic64_386_32.S b/arch/x86/lib/atomic64_386_32.S
index 78ee8e0fa278..2cda60a06e65 100644
--- a/arch/x86/lib/atomic64_386_32.S
+++ b/arch/x86/lib/atomic64_386_32.S
@@ -26,35 +26,37 @@
26.endm 26.endm
27 27
28#define BEGIN(op) \ 28#define BEGIN(op) \
29.macro END; \ 29.macro endp; \
30 CFI_ENDPROC; \ 30 CFI_ENDPROC; \
31ENDPROC(atomic64_##op##_386); \ 31ENDPROC(atomic64_##op##_386); \
32.purgem END; \ 32.purgem endp; \
33.endm; \ 33.endm; \
34ENTRY(atomic64_##op##_386); \ 34ENTRY(atomic64_##op##_386); \
35 CFI_STARTPROC; \ 35 CFI_STARTPROC; \
36 LOCK v; 36 LOCK v;
37 37
38#define ENDP endp
39
38#define RET \ 40#define RET \
39 UNLOCK v; \ 41 UNLOCK v; \
40 ret 42 ret
41 43
42#define RET_END \ 44#define RET_ENDP \
43 RET; \ 45 RET; \
44 END 46 ENDP
45 47
46#define v %ecx 48#define v %ecx
47BEGIN(read) 49BEGIN(read)
48 movl (v), %eax 50 movl (v), %eax
49 movl 4(v), %edx 51 movl 4(v), %edx
50RET_END 52RET_ENDP
51#undef v 53#undef v
52 54
53#define v %esi 55#define v %esi
54BEGIN(set) 56BEGIN(set)
55 movl %ebx, (v) 57 movl %ebx, (v)
56 movl %ecx, 4(v) 58 movl %ecx, 4(v)
57RET_END 59RET_ENDP
58#undef v 60#undef v
59 61
60#define v %esi 62#define v %esi
@@ -63,14 +65,14 @@ BEGIN(xchg)
63 movl 4(v), %edx 65 movl 4(v), %edx
64 movl %ebx, (v) 66 movl %ebx, (v)
65 movl %ecx, 4(v) 67 movl %ecx, 4(v)
66RET_END 68RET_ENDP
67#undef v 69#undef v
68 70
69#define v %ecx 71#define v %ecx
70BEGIN(add) 72BEGIN(add)
71 addl %eax, (v) 73 addl %eax, (v)
72 adcl %edx, 4(v) 74 adcl %edx, 4(v)
73RET_END 75RET_ENDP
74#undef v 76#undef v
75 77
76#define v %ecx 78#define v %ecx
@@ -79,14 +81,14 @@ BEGIN(add_return)
79 adcl 4(v), %edx 81 adcl 4(v), %edx
80 movl %eax, (v) 82 movl %eax, (v)
81 movl %edx, 4(v) 83 movl %edx, 4(v)
82RET_END 84RET_ENDP
83#undef v 85#undef v
84 86
85#define v %ecx 87#define v %ecx
86BEGIN(sub) 88BEGIN(sub)
87 subl %eax, (v) 89 subl %eax, (v)
88 sbbl %edx, 4(v) 90 sbbl %edx, 4(v)
89RET_END 91RET_ENDP
90#undef v 92#undef v
91 93
92#define v %ecx 94#define v %ecx
@@ -98,14 +100,14 @@ BEGIN(sub_return)
98 adcl 4(v), %edx 100 adcl 4(v), %edx
99 movl %eax, (v) 101 movl %eax, (v)
100 movl %edx, 4(v) 102 movl %edx, 4(v)
101RET_END 103RET_ENDP
102#undef v 104#undef v
103 105
104#define v %esi 106#define v %esi
105BEGIN(inc) 107BEGIN(inc)
106 addl $1, (v) 108 addl $1, (v)
107 adcl $0, 4(v) 109 adcl $0, 4(v)
108RET_END 110RET_ENDP
109#undef v 111#undef v
110 112
111#define v %esi 113#define v %esi
@@ -116,14 +118,14 @@ BEGIN(inc_return)
116 adcl $0, %edx 118 adcl $0, %edx
117 movl %eax, (v) 119 movl %eax, (v)
118 movl %edx, 4(v) 120 movl %edx, 4(v)
119RET_END 121RET_ENDP
120#undef v 122#undef v
121 123
122#define v %esi 124#define v %esi
123BEGIN(dec) 125BEGIN(dec)
124 subl $1, (v) 126 subl $1, (v)
125 sbbl $0, 4(v) 127 sbbl $0, 4(v)
126RET_END 128RET_ENDP
127#undef v 129#undef v
128 130
129#define v %esi 131#define v %esi
@@ -134,7 +136,7 @@ BEGIN(dec_return)
134 sbbl $0, %edx 136 sbbl $0, %edx
135 movl %eax, (v) 137 movl %eax, (v)
136 movl %edx, 4(v) 138 movl %edx, 4(v)
137RET_END 139RET_ENDP
138#undef v 140#undef v
139 141
140#define v %ecx 142#define v %ecx
@@ -156,7 +158,7 @@ BEGIN(add_unless)
156 jne 1b 158 jne 1b
157 xorl %eax, %eax 159 xorl %eax, %eax
158 jmp 2b 160 jmp 2b
159END 161ENDP
160#undef v 162#undef v
161 163
162#define v %esi 164#define v %esi
@@ -177,7 +179,7 @@ BEGIN(inc_not_zero)
177 testl %edx, %edx 179 testl %edx, %edx
178 jne 1b 180 jne 1b
179 jmp 2b 181 jmp 2b
180END 182ENDP
181#undef v 183#undef v
182 184
183#define v %esi 185#define v %esi
@@ -190,5 +192,5 @@ BEGIN(dec_if_positive)
190 movl %eax, (v) 192 movl %eax, (v)
191 movl %edx, 4(v) 193 movl %edx, 4(v)
1921: 1941:
193RET_END 195RET_ENDP
194#undef v 196#undef v