Merge "Use ENTRY and EXIT macros for strcmp, memcpy, atexit."

This commit is contained in:
Jesse Wilson 2011-10-12 07:51:53 -07:00 committed by Android (Google) Code Review
commit b0641d4a44
3 changed files with 6 additions and 22 deletions

View File

@ -37,16 +37,10 @@
.eabi_attribute 26, 2 .eabi_attribute 26, 2
.eabi_attribute 30, 4 .eabi_attribute 30, 4
.eabi_attribute 18, 4 .eabi_attribute 18, 4
.code 16
.section .text.atexit,"ax",%progbits
.align 2
.global atexit
.hidden atexit .hidden atexit
.code 16 .code 16
.thumb_func .thumb_func
.type atexit, %function ENTRY(atexit)
atexit:
.fnstart
.LFB0: .LFB0:
.save {r4, lr} .save {r4, lr}
push {r4, lr} push {r4, lr}
@ -64,6 +58,5 @@ atexit:
.L3: .L3:
.word __dso_handle-(.LPIC0+4) .word __dso_handle-(.LPIC0+4)
.LFE0: .LFE0:
.fnend END(atexit)
.size atexit, .-atexit
#endif #endif

View File

@ -34,16 +34,11 @@
.text .text
.fpu neon .fpu neon
.global memcpy
.type memcpy, %function
.align 4
/* a prefetch distance of 4 cache-lines works best experimentally */ /* a prefetch distance of 4 cache-lines works best experimentally */
#define CACHE_LINE_SIZE 64 #define CACHE_LINE_SIZE 64
#define PREFETCH_DISTANCE (CACHE_LINE_SIZE*4) #define PREFETCH_DISTANCE (CACHE_LINE_SIZE*4)
memcpy: ENTRY(memcpy)
.fnstart
.save {r0, lr} .save {r0, lr}
stmfd sp!, {r0, lr} stmfd sp!, {r0, lr}

View File

@ -28,13 +28,10 @@
*/ */
#include <machine/cpu-features.h> #include <machine/cpu-features.h>
#include <machine/asm.h>
.text .text
.global strcmp
.type strcmp, %function
.align 4
#ifdef __ARMEB__ #ifdef __ARMEB__
#define SHFT2LSB lsl #define SHFT2LSB lsl
#define SHFT2LSBEQ lsleq #define SHFT2LSBEQ lsleq
@ -54,8 +51,7 @@
#define magic1(REG) REG #define magic1(REG) REG
#define magic2(REG) REG, lsl #7 #define magic2(REG) REG, lsl #7
strcmp: ENTRY(strcmp)
.fnstart
PLD(r0, #0) PLD(r0, #0)
PLD(r1, #0) PLD(r1, #0)
eor r2, r0, r1 eor r2, r0, r1
@ -136,7 +132,6 @@ strcmp:
#endif #endif
ldr r4, [sp], #4 ldr r4, [sp], #4
bx lr bx lr
.fnend
.Lstrcmp_unaligned: .Lstrcmp_unaligned:
wp1 .req r0 wp1 .req r0
@ -319,3 +314,4 @@ strcmp:
ldr r4, [sp], #4 ldr r4, [sp], #4
ldr r5, [sp], #4 ldr r5, [sp], #4
bx lr bx lr
END(strcmp)