]> git.ipfire.org Git - thirdparty/gcc.git/blame - boehm-gc/powerpc_darwin_mach_dep.s
gc_ext_config.h.in: Added GC_PTHREAD_SYM_VERSION.
[thirdparty/gcc.git] / boehm-gc / powerpc_darwin_mach_dep.s
CommitLineData
97e095fd
MS
1#if defined(__ppc64__)
2#define MODE_CHOICE(x, y) y
3#else
4#define MODE_CHOICE(x, y) x
5#endif
6
7#define lgu MODE_CHOICE(lwzu, ldu)
8
9#define g_long MODE_CHOICE(long, quad) /* usage is ".g_long" */
10
11#define LOG2_GPR_BYTES MODE_CHOICE(2,3) /* log2(GPR_BYTES) */
6991c6c9
JS
12
13; GC_push_regs function. Under some optimization levels GCC will clobber
14; some of the non-volatile registers before we get a chance to save them
54f28c21 15; therefore, this cannot be inline asm.
6991c6c9
JS
16
17.text
97e095fd 18 .align LOG2_GPR_BYTES
6991c6c9
JS
19 .globl _GC_push_regs
20_GC_push_regs:
21
22 ; Prolog
23 mflr r0
24 stw r0,8(r1)
25 stwu r1,-80(r1)
26
27 ; Push r13-r31
28 mr r3,r13
29 bl L_GC_push_one$stub
30 mr r3,r14
31 bl L_GC_push_one$stub
32 mr r3,r15
33 bl L_GC_push_one$stub
34 mr r3,r16
35 bl L_GC_push_one$stub
36 mr r3,r17
37 bl L_GC_push_one$stub
38 mr r3,r18
39 bl L_GC_push_one$stub
40 mr r3,r19
41 bl L_GC_push_one$stub
42 mr r3,r20
43 bl L_GC_push_one$stub
44 mr r3,r21
45 bl L_GC_push_one$stub
46 mr r3,r22
47 bl L_GC_push_one$stub
48 mr r3,r23
49 bl L_GC_push_one$stub
50 mr r3,r24
51 bl L_GC_push_one$stub
52 mr r3,r25
53 bl L_GC_push_one$stub
54 mr r3,r26
55 bl L_GC_push_one$stub
56 mr r3,r27
57 bl L_GC_push_one$stub
58 mr r3,r28
59 bl L_GC_push_one$stub
60 mr r3,r29
61 bl L_GC_push_one$stub
62 mr r3,r30
63 bl L_GC_push_one$stub
64 mr r3,r31
65 bl L_GC_push_one$stub
66
67 ;
68 lwz r0,88(r1)
69 addi r1,r1,80
70 mtlr r0
71
72 ; Return
73 blr
74
75; PIC stuff, generated by GCC
76
77.data
cbaaa7db 78.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
97e095fd 79 .align LOG2_GPR_BYTES
6991c6c9
JS
80L_GC_push_one$stub:
81 .indirect_symbol _GC_push_one
82 mflr r0
83 bcl 20,31,L0$_GC_push_one
84L0$_GC_push_one:
85 mflr r11
86 addis r11,r11,ha16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)
87 mtlr r0
97e095fd 88 lgu r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11)
6991c6c9 89 mtctr r12
6991c6c9
JS
90 bctr
91.data
92.lazy_symbol_pointer
93L_GC_push_one$lazy_ptr:
94 .indirect_symbol _GC_push_one
97e095fd 95 .g_long dyld_stub_binding_helper