allow page size to vary on arm
[musl.git] / arch / sh / crt_arch.h
blobf341c8fbc096819d69333590bad906653df32ff2
1 #ifdef __SH_FDPIC__
3 __asm__(
4 ".text \n"
5 ".global " START " \n"
6 START ": \n"
7 " tst r8, r8 \n"
8 " bf 1f \n"
9 " mov #68, r3 \n"
10 " add r3, r3 \n"
11 " mov #8, r4 \n"
12 " swap.w r4, r4 \n"
13 " trapa #31 \n"
14 " nop \n"
15 " nop \n"
16 " nop \n"
17 " nop \n"
18 "1: nop \n"
19 #ifndef SHARED
20 " mov r8, r4 \n"
21 " mova 1f, r0 \n"
22 " mov.l 1f, r5 \n"
23 " mov.l 1f+4, r6 \n"
24 " add r0, r5 \n"
25 " mov.l 4f, r1 \n"
26 "5: bsrf r1 \n"
27 " add r0, r6 \n"
28 " mov r0, r12 \n"
29 #endif
30 " mov r10, r5 \n"
31 " mov r15, r4 \n"
32 " mov.l r9, @-r15 \n"
33 " mov.l r8, @-r15 \n"
34 " mov #-16, r0 \n"
35 " mov.l 2f, r1 \n"
36 "3: bsrf r1 \n"
37 " and r0, r15 \n"
38 ".align 2 \n"
39 "1: .long __ROFIXUP_LIST__@PCREL \n"
40 " .long __ROFIXUP_END__@PCREL + 4 \n"
41 "2: .long " START "_c@PCREL - (3b+4-.) \n"
42 #ifndef SHARED
43 "4: .long __fdpic_fixup@PCREL - (5b+4-.) \n"
44 #endif
47 #ifndef SHARED
48 #include "fdpic_crt.h"
49 #endif
51 #else
53 __asm__(
54 ".text \n"
55 ".global " START " \n"
56 START ": \n"
57 " mova 1f, r0 \n"
58 " mov.l 1f, r5 \n"
59 " add r0, r5 \n"
60 " mov r15, r4 \n"
61 " mov #-16, r0 \n"
62 " mov.l 2f, r1 \n"
63 "3: bsrf r1 \n"
64 " and r0, r15 \n"
65 ".align 2 \n"
66 ".weak _DYNAMIC \n"
67 ".hidden _DYNAMIC \n"
68 "1: .long _DYNAMIC-. \n"
69 "2: .long " START "_c@PCREL - (3b+4-.) \n"
72 #endif
74 /* used by gcc for switching the FPU between single and double precision */
75 #ifdef SHARED
76 __attribute__((__visibility__("hidden")))
77 #endif
78 const unsigned long __fpscr_values[2] = { 0, 0x80000 };