aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot
diff options
context:
space:
mode:
authorOlaf Hering <olh@suse.de>2005-11-17 16:09:02 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-17 21:18:16 -0500
commit68643cfb879ad8c327441f875b60981822016575 (patch)
tree78c39f62bf48658640b4f4ed36a6356a4403cdd5 /arch/powerpc/boot
parentd2a33170972c5772826f7f6cc950ab69ba034667 (diff)
[PATCH] ppc boot: replace string labels with numbers
Replacing the string labels with numbers saves 117 bytes in the final zImage. These local labels are not discared. Signed-off-by: Olaf Hering <olh@suse.de> arch/powerpc/boot/crt0.S | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r--arch/powerpc/boot/crt0.S23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S
index 9cc442263939..d2f2ace56cd3 100644
--- a/arch/powerpc/boot/crt0.S
+++ b/arch/powerpc/boot/crt0.S
@@ -14,43 +14,42 @@
14 .text 14 .text
15 .globl _zimage_start 15 .globl _zimage_start
16_zimage_start: 16_zimage_start:
17 bl reloc_offset 17 bl 1f
18 18
19reloc_offset: 191:
20 mflr r0 20 mflr r0
21 lis r9,reloc_offset@ha 21 lis r9,1b@ha
22 addi r9,r9,reloc_offset@l 22 addi r9,r9,1b@l
23 subf. r0,r9,r0 23 subf. r0,r9,r0
24 beq clear_caches 24 beq 3f
25 25
26reloc_got2:
27 lis r9,__got2_start@ha 26 lis r9,__got2_start@ha
28 addi r9,r9,__got2_start@l 27 addi r9,r9,__got2_start@l
29 lis r8,__got2_end@ha 28 lis r8,__got2_end@ha
30 addi r8,r8,__got2_end@l 29 addi r8,r8,__got2_end@l
31 subf. r8,r9,r8 30 subf. r8,r9,r8
32 beq clear_caches 31 beq 3f
33 srwi. r8,r8,2 32 srwi. r8,r8,2
34 mtctr r8 33 mtctr r8
35 add r9,r0,r9 34 add r9,r0,r9
36reloc_got2_loop: 352:
37 lwz r8,0(r9) 36 lwz r8,0(r9)
38 add r8,r8,r0 37 add r8,r8,r0
39 stw r8,0(r9) 38 stw r8,0(r9)
40 addi r9,r9,4 39 addi r9,r9,4
41 bdnz reloc_got2_loop 40 bdnz 2b
42 41
43clear_caches: 423:
44 lis r9,_start@h 43 lis r9,_start@h
45 add r9,r0,r9 44 add r9,r0,r9
46 lis r8,_etext@ha 45 lis r8,_etext@ha
47 addi r8,r8,_etext@l 46 addi r8,r8,_etext@l
48 add r8,r0,r8 47 add r8,r0,r8
491: dcbf r0,r9 484: dcbf r0,r9
50 icbi r0,r9 49 icbi r0,r9
51 addi r9,r9,0x20 50 addi r9,r9,0x20
52 cmplwi 0,r9,8 51 cmplwi 0,r9,8
53 blt 1b 52 blt 4b
54 sync 53 sync
55 isync 54 isync
56 55