41
41
the initialization code.
42
42
*/
43
43
44
+ #include "arc-symbols.h"
45
+
44
46
/* Compatibility with older ARC GCC, that doesn't provide some of the
45
47
preprocessor defines used by newlib and libgloss for ARC. */
46
48
#if defined (__Xbarrel_shifter) && !defined (__ARC_BARREL_SHIFTER__)
@@ -106,11 +108,11 @@ IVT_ENTRY(IRQ_20) ; 20 0x50 80
106
108
#ifdef __ARC601__
107
109
; Startup code for the ARC601 processor
108
110
__start:
109
- mov gp, __SDATA_BEGIN__
110
- mov sp, __stack_top ; Point to top of stack
111
+ mov gp, SMALL_DATA_BASE
112
+ mov sp, STACK_TOP ; Point to top of stack
111
113
mov r5, 0 ; Zero value
112
- mov_s r2, __sbss_start ; r2 = start of the bss section
113
- sub r3, _end , r2 ; r3 = size of the bss section in bytes
114
+ mov_s r2, SMALL_DATA_BSS_START ; r2 = start of the bss section
115
+ sub r3, SMALL_DATA_BSS_START , r2 ; r3 = size of the bss section in bytes
114
116
115
117
asr_s r3, r3
116
118
asr_s r3, r3 ; r3 = size of bss in words
@@ -146,9 +148,9 @@ __start:
146
148
;; Initialize jli_base
147
149
sr __JLI_TABLE__,[jli_base]
148
150
#endif
149
- mov gp, __SDATA_BEGIN__
150
- mov_s r2, __sbss_start ; r2 = start of the bss section
151
- sub r3, _end , r2 ; r3 = size of the bss section in bytes
151
+ mov gp, SMALL_DATA_BASE
152
+ mov_s r2, SMALL_DATA_BSS_START ; r2 = start of the bss section
153
+ sub r3, SMALL_DATA_BSS_END , r2 ; r3 = size of the bss section in bytes
152
154
; set up the loop counter register to the size (in words) of the bss section
153
155
#if defined (__ARC_BARREL_SHIFTER__)
154
156
asr.f lp_count, r3, 2
@@ -162,12 +164,12 @@ __start:
162
164
add r3, pcl, 20
163
165
sr r3, [2] ; LP_END
164
166
; initialize stack pointer, and this instruction has 2 words
165
- mov sp, __stack_top
167
+ mov sp, STACK_TOP
166
168
mov_s r3, 0
167
169
st.ab r3, [r2, 4] ; zero out the word
168
170
.Lend_zbss:
169
171
#else
170
- mov sp, __stack_top ; initialize stack pointer
172
+ mov sp, STACK_TOP ; initialize stack pointer
171
173
mov_s r3,0
172
174
; loop to zero out the bss. Enter loop only if lp_count != 0
173
175
lpnz .Lend_zbss
0 commit comments