]> git.proxmox.com Git - rustc.git/blob - vendor/psm/src/arch/powerpc64_aix.s
New upstream version 1.67.1+dfsg1
[rustc.git] / vendor / psm / src / arch / powerpc64_aix.s
1 .csect .text[PR],2
2 .file "powerpc64_aix.s"
3
4 .globl rust_psm_stack_direction[DS]
5 .globl .rust_psm_stack_direction
6 .align 4
7 .csect rust_psm_stack_direction[DS],3
8 .vbyte 8, .rust_psm_stack_direction
9 .vbyte 8, TOC[TC0]
10 .vbyte 8, 0
11 .csect .text[PR],2
12 .rust_psm_stack_direction:
13 # extern "C" fn() -> u8
14 li 3, 2
15 blr
16 L..rust_psm_stack_direction_end:
17 # Following bytes form the traceback table on AIX.
18 # For specification, see https://www.ibm.com/docs/en/aix/7.2?topic=processor-traceback-tables.
19 # For implementation, see https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp,
20 # `PPCAIXAsmPrinter::emitTracebackTable`.
21 .vbyte 4, 0x00000000 # Traceback table begin, for unwinder to search the table.
22 .byte 0x00 # Version = 0
23 .byte 0x09 # Language = CPlusPlus, since rust is using C++-like LSDA.
24 .byte 0x20 # -IsGlobaLinkage, -IsOutOfLineEpilogOrPrologue
25 # +HasTraceBackTableOffset, -IsInternalProcedure
26 # -HasControlledStorage, -IsTOCless
27 # -IsFloatingPointPresent
28 # -IsFloatingPointOperationLogOrAbortEnabled
29 .byte 0x40 # -IsInterruptHandler, +IsFunctionNamePresent, -IsAllocaUsed
30 # OnConditionDirective = 0, -IsCRSaved, -IsLRSaved
31 .byte 0x80 # +IsBackChainStored, -IsFixup, NumOfFPRsSaved = 0
32 .byte 0x00 # -HasExtensionTable, -HasVectorInfo, NumOfGPRsSaved = 0
33 .byte 0x00 # NumberOfFixedParms = 0
34 .byte 0x01 # NumberOfFPParms = 0, +HasParmsOnStack
35 .vbyte 4, L..rust_psm_stack_direction_end-.rust_psm_stack_direction #Function size
36 .vbyte 2, 0x0018 # Function name len = 24
37 .byte "rust_psm_stack_direction" # Function Name
38
39 .globl rust_psm_stack_pointer[DS]
40 .globl .rust_psm_stack_pointer
41 .align 4
42 .csect rust_psm_stack_pointer[DS],3
43 .vbyte 8, .rust_psm_stack_pointer
44 .vbyte 8, TOC[TC0]
45 .vbyte 8, 0
46 .csect .text[PR],2
47 .rust_psm_stack_pointer:
48 # extern "C" fn() -> *mut u8
49 mr 3, 1
50 blr
51 L..rust_psm_stack_pointer_end:
52 .vbyte 4, 0x00000000
53 .byte 0x00
54 .byte 0x09
55 .byte 0x20
56 .byte 0x40
57 .byte 0x80
58 .byte 0x00
59 .byte 0x00
60 .byte 0x01
61 .vbyte 4, L..rust_psm_stack_pointer_end-.rust_psm_stack_pointer
62 .vbyte 2, 0x0016
63 .byte "rust_psm_stack_pointer"
64
65 .globl rust_psm_replace_stack[DS]
66 .globl .rust_psm_replace_stack
67 .align 4
68 .csect rust_psm_replace_stack[DS],3
69 .vbyte 8, .rust_psm_replace_stack
70 .vbyte 8, TOC[TC0]
71 .vbyte 8, 0
72 .csect .text[PR],2
73 .rust_psm_replace_stack:
74 # extern "C" fn(3: usize, 4: extern "C" fn(usize), 5: *mut u8)
75 # Load the function pointer and toc pointer from TOC and make the call.
76 ld 2, 8(4)
77 ld 4, 0(4)
78 addi 5, 5, -48
79 mr 1, 5
80 mtctr 4
81 bctr
82 L..rust_psm_replace_stack_end:
83 .vbyte 4, 0x00000000
84 .byte 0x00
85 .byte 0x09
86 .byte 0x20
87 .byte 0x40
88 .byte 0x80
89 .byte 0x00
90 .byte 0x03
91 .byte 0x01
92 .vbyte 4, 0x00000000 # Parameter type = i, i, i
93 .vbyte 4, L..rust_psm_replace_stack_end-.rust_psm_replace_stack
94 .vbyte 2, 0x0016
95 .byte "rust_psm_replace_stack"
96
97 .globl rust_psm_on_stack[DS]
98 .globl .rust_psm_on_stack
99 .align 4
100 .csect rust_psm_on_stack[DS],3
101 .vbyte 8, .rust_psm_on_stack
102 .vbyte 8, TOC[TC0]
103 .vbyte 8, 0
104 .csect .text[PR],2
105 .rust_psm_on_stack:
106 # extern "C" fn(3: usize, 4: usize, 5: extern "C" fn(usize, usize), 6: *mut u8)
107 mflr 0
108 std 2, -72(6)
109 std 0, -8(6)
110 sub 6, 6, 1
111 addi 6, 6, -112
112 stdux 1, 1, 6
113 ld 2, 8(5)
114 ld 5, 0(5)
115 mtctr 5
116 bctrl
117 ld 2, 40(1)
118 ld 0, 104(1)
119 mtlr 0
120 ld 1, 0(1)
121 blr
122 L..rust_psm_on_stack_end:
123 .vbyte 4, 0x00000000
124 .byte 0x00
125 .byte 0x09
126 .byte 0x20
127 .byte 0x41
128 .byte 0x80
129 .byte 0x00
130 .byte 0x04
131 .byte 0x01
132 .vbyte 4, 0x00000000 # Parameter type = i, i, i, i
133 .vbyte 4, L..rust_psm_on_stack_end-.rust_psm_on_stack
134 .vbyte 2, 0x0011
135 .byte "rust_psm_on_stack"
136
137 .toc