diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 22:51:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 22:51:32 -0400 |
commit | 2a56d2220284b0e4dd8569fa475d7053f1c40a63 (patch) | |
tree | 96f959486a2f31db599e5f97167074bd1ecb3dc6 /arch/arm/lib/lib1funcs.S | |
parent | 46f2cc80514e389bacfb642a32a4181fa1f1d20b (diff) | |
parent | 239df0fd5ee25588f8a5ba7f7ee646940cc403f4 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (45 commits)
ARM: 6945/1: Add unwinding support for division functions
ARM: kill pmd_off()
ARM: 6944/1: mm: allow ASID 0 to be allocated to tasks
ARM: 6943/1: mm: use TTBR1 instead of reserved context ID
ARM: 6942/1: mm: make TTBR1 always point to swapper_pg_dir on ARMv6/7
ARM: 6941/1: cache: ensure MVA is cacheline aligned in flush_kern_dcache_area
ARM: add sendmmsg syscall
ARM: 6863/1: allow hotplug on msm
ARM: 6832/1: mmci: support for ST-Ericsson db8500v2
ARM: 6830/1: mach-ux500: force PrimeCell revisions
ARM: 6829/1: amba: make hardcoded periphid override hardware
ARM: 6828/1: mach-ux500: delete SSP PrimeCell ID
ARM: 6827/1: mach-netx: delete hardcoded periphid
ARM: 6940/1: fiq: Briefly document driver responsibilities for suspend/resume
ARM: 6938/1: fiq: Refactor {get,set}_fiq_regs() for Thumb-2
ARM: 6914/1: sparsemem: fix highmem detection when using SPARSEMEM
ARM: 6913/1: sparsemem: allow pfn_valid to be overridden when using SPARSEMEM
at91: drop at572d940hf support
at91rm9200: introduce at91rm9200_set_type to specficy cpu package
at91: drop boot_params and PLAT_PHYS_OFFSET
...
Diffstat (limited to 'arch/arm/lib/lib1funcs.S')
-rw-r--r-- | arch/arm/lib/lib1funcs.S | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/arch/arm/lib/lib1funcs.S b/arch/arm/lib/lib1funcs.S index 6dc06487f3c3..c562f649734c 100644 --- a/arch/arm/lib/lib1funcs.S +++ b/arch/arm/lib/lib1funcs.S | |||
@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */ | |||
35 | 35 | ||
36 | #include <linux/linkage.h> | 36 | #include <linux/linkage.h> |
37 | #include <asm/assembler.h> | 37 | #include <asm/assembler.h> |
38 | 38 | #include <asm/unwind.h> | |
39 | 39 | ||
40 | .macro ARM_DIV_BODY dividend, divisor, result, curbit | 40 | .macro ARM_DIV_BODY dividend, divisor, result, curbit |
41 | 41 | ||
@@ -207,6 +207,7 @@ Boston, MA 02111-1307, USA. */ | |||
207 | 207 | ||
208 | ENTRY(__udivsi3) | 208 | ENTRY(__udivsi3) |
209 | ENTRY(__aeabi_uidiv) | 209 | ENTRY(__aeabi_uidiv) |
210 | UNWIND(.fnstart) | ||
210 | 211 | ||
211 | subs r2, r1, #1 | 212 | subs r2, r1, #1 |
212 | moveq pc, lr | 213 | moveq pc, lr |
@@ -230,10 +231,12 @@ ENTRY(__aeabi_uidiv) | |||
230 | mov r0, r0, lsr r2 | 231 | mov r0, r0, lsr r2 |
231 | mov pc, lr | 232 | mov pc, lr |
232 | 233 | ||
234 | UNWIND(.fnend) | ||
233 | ENDPROC(__udivsi3) | 235 | ENDPROC(__udivsi3) |
234 | ENDPROC(__aeabi_uidiv) | 236 | ENDPROC(__aeabi_uidiv) |
235 | 237 | ||
236 | ENTRY(__umodsi3) | 238 | ENTRY(__umodsi3) |
239 | UNWIND(.fnstart) | ||
237 | 240 | ||
238 | subs r2, r1, #1 @ compare divisor with 1 | 241 | subs r2, r1, #1 @ compare divisor with 1 |
239 | bcc Ldiv0 | 242 | bcc Ldiv0 |
@@ -247,10 +250,12 @@ ENTRY(__umodsi3) | |||
247 | 250 | ||
248 | mov pc, lr | 251 | mov pc, lr |
249 | 252 | ||
253 | UNWIND(.fnend) | ||
250 | ENDPROC(__umodsi3) | 254 | ENDPROC(__umodsi3) |
251 | 255 | ||
252 | ENTRY(__divsi3) | 256 | ENTRY(__divsi3) |
253 | ENTRY(__aeabi_idiv) | 257 | ENTRY(__aeabi_idiv) |
258 | UNWIND(.fnstart) | ||
254 | 259 | ||
255 | cmp r1, #0 | 260 | cmp r1, #0 |
256 | eor ip, r0, r1 @ save the sign of the result. | 261 | eor ip, r0, r1 @ save the sign of the result. |
@@ -287,10 +292,12 @@ ENTRY(__aeabi_idiv) | |||
287 | rsbmi r0, r0, #0 | 292 | rsbmi r0, r0, #0 |
288 | mov pc, lr | 293 | mov pc, lr |
289 | 294 | ||
295 | UNWIND(.fnend) | ||
290 | ENDPROC(__divsi3) | 296 | ENDPROC(__divsi3) |
291 | ENDPROC(__aeabi_idiv) | 297 | ENDPROC(__aeabi_idiv) |
292 | 298 | ||
293 | ENTRY(__modsi3) | 299 | ENTRY(__modsi3) |
300 | UNWIND(.fnstart) | ||
294 | 301 | ||
295 | cmp r1, #0 | 302 | cmp r1, #0 |
296 | beq Ldiv0 | 303 | beq Ldiv0 |
@@ -310,11 +317,14 @@ ENTRY(__modsi3) | |||
310 | rsbmi r0, r0, #0 | 317 | rsbmi r0, r0, #0 |
311 | mov pc, lr | 318 | mov pc, lr |
312 | 319 | ||
320 | UNWIND(.fnend) | ||
313 | ENDPROC(__modsi3) | 321 | ENDPROC(__modsi3) |
314 | 322 | ||
315 | #ifdef CONFIG_AEABI | 323 | #ifdef CONFIG_AEABI |
316 | 324 | ||
317 | ENTRY(__aeabi_uidivmod) | 325 | ENTRY(__aeabi_uidivmod) |
326 | UNWIND(.fnstart) | ||
327 | UNWIND(.save {r0, r1, ip, lr} ) | ||
318 | 328 | ||
319 | stmfd sp!, {r0, r1, ip, lr} | 329 | stmfd sp!, {r0, r1, ip, lr} |
320 | bl __aeabi_uidiv | 330 | bl __aeabi_uidiv |
@@ -323,10 +333,12 @@ ENTRY(__aeabi_uidivmod) | |||
323 | sub r1, r1, r3 | 333 | sub r1, r1, r3 |
324 | mov pc, lr | 334 | mov pc, lr |
325 | 335 | ||
336 | UNWIND(.fnend) | ||
326 | ENDPROC(__aeabi_uidivmod) | 337 | ENDPROC(__aeabi_uidivmod) |
327 | 338 | ||
328 | ENTRY(__aeabi_idivmod) | 339 | ENTRY(__aeabi_idivmod) |
329 | 340 | UNWIND(.fnstart) | |
341 | UNWIND(.save {r0, r1, ip, lr} ) | ||
330 | stmfd sp!, {r0, r1, ip, lr} | 342 | stmfd sp!, {r0, r1, ip, lr} |
331 | bl __aeabi_idiv | 343 | bl __aeabi_idiv |
332 | ldmfd sp!, {r1, r2, ip, lr} | 344 | ldmfd sp!, {r1, r2, ip, lr} |
@@ -334,15 +346,18 @@ ENTRY(__aeabi_idivmod) | |||
334 | sub r1, r1, r3 | 346 | sub r1, r1, r3 |
335 | mov pc, lr | 347 | mov pc, lr |
336 | 348 | ||
349 | UNWIND(.fnend) | ||
337 | ENDPROC(__aeabi_idivmod) | 350 | ENDPROC(__aeabi_idivmod) |
338 | 351 | ||
339 | #endif | 352 | #endif |
340 | 353 | ||
341 | Ldiv0: | 354 | Ldiv0: |
342 | 355 | UNWIND(.fnstart) | |
356 | UNWIND(.pad #4) | ||
357 | UNWIND(.save {lr}) | ||
343 | str lr, [sp, #-8]! | 358 | str lr, [sp, #-8]! |
344 | bl __div0 | 359 | bl __div0 |
345 | mov r0, #0 @ About as wrong as it could be. | 360 | mov r0, #0 @ About as wrong as it could be. |
346 | ldr pc, [sp], #8 | 361 | ldr pc, [sp], #8 |
347 | 362 | UNWIND(.fnend) | |
348 | 363 | ENDPROC(Ldiv0) | |