-
Notifications
You must be signed in to change notification settings - Fork 747
/
Copy pathunsafeHelper.s
175 lines (168 loc) · 5.21 KB
/
unsafeHelper.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# Copyright IBM Corp. and others 1991
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
# distribution and is available at https://www.eclipse.org/legal/epl-2.0/
# or the Apache License, Version 2.0 which accompanies this distribution and
# is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# This Source Code may also be made available under the following
# Secondary Licenses when the conditions for such availability set
# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
# General Public License, version 2 with the GNU Classpath
# Exception [1] and GNU General Public License, version 2 with the
# OpenJDK Assembly Exception [2].
#
# [1] https://www.gnu.org/software/classpath/license.html
# [2] https://openjdk.org/legal/assembly-exception.html
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
.globl .unsafePut64[pr]
.globl unsafePut64[ds]
.globl .unsafePut64
.toc
TOC.unsafePut64: .tc .unsafePut64[tc],unsafePut64[ds]
.csect unsafePut64[ds]
.long .unsafePut64[pr]
.long TOC[tc0]
.long 0
.globl .unsafePut32[pr]
.globl unsafePut32[ds]
.globl .unsafePut32
.toc
TOC.unsafePut32: .tc .unsafePut32[tc],unsafePut32[ds]
.csect unsafePut32[ds]
.long .unsafePut32[pr]
.long TOC[tc0]
.long 0
.globl .unsafePut16[pr]
.globl unsafePut16[ds]
.globl .unsafePut16
.toc
TOC.unsafePut16: .tc .unsafePut16[tc],unsafePut16[ds]
.csect unsafePut16[ds]
.long .unsafePut16[pr]
.long TOC[tc0]
.long 0
.globl .unsafePut8[pr]
.globl unsafePut8[ds]
.globl .unsafePut8
.toc
TOC.unsafePut8: .tc .unsafePut8[tc],unsafePut8[ds]
.csect unsafePut8[ds]
.long .unsafePut8[pr]
.long TOC[tc0]
.long 0
.globl .unsafeGet64[pr]
.globl unsafeGet64[ds]
.globl .unsafeGet64
.toc
TOC.unsafeGet64: .tc .unsafeGet64[tc],unsafeGet64[ds]
.csect unsafeGet64[ds]
.long .unsafeGet64[pr]
.long TOC[tc0]
.long 0
.globl .unsafeGet32[pr]
.globl unsafeGet32[ds]
.globl .unsafeGet32
.toc
TOC.unsafeGet32: .tc .unsafeGet32[tc],unsafeGet32[ds]
.csect unsafeGet32[ds]
.long .unsafeGet32[pr]
.long TOC[tc0]
.long 0
.globl .unsafeGet16[pr]
.globl unsafeGet16[ds]
.globl .unsafeGet16
.toc
TOC.unsafeGet16: .tc .unsafeGet16[tc],unsafeGet16[ds]
.csect unsafeGet16[ds]
.long .unsafeGet16[pr]
.long TOC[tc0]
.long 0
.globl .unsafeGet8[pr]
.globl unsafeGet8[ds]
.globl .unsafeGet8
.toc
TOC.unsafeGet8: .tc .unsafeGet8[tc],unsafeGet8[ds]
.csect unsafeGet8[ds]
.long .unsafeGet8[pr]
.long TOC[tc0]
.long 0
## Prototype: void unsafePut64(I_64 *address, I_64 value);
## Defined in: #Args: 2
.csect .unsafePut64[pr]
.unsafePut64:
.function .unsafePut64,startproc.unsafePut64,16,0,(endproc.unsafePut64-startproc.unsafePut64)
startproc.unsafePut64:
st 4,0(3)
st 5,4(3)
blr
endproc.unsafePut64:
## Prototype: void unsafePut32(I_32 *address, I_32 value);
## Defined in: #Args: 2
.csect .unsafePut32[pr]
.unsafePut32:
.function .unsafePut32,startproc.unsafePut32,16,0,(endproc.unsafePut32-startproc.unsafePut32)
startproc.unsafePut32:
st 4,0(3)
blr
endproc.unsafePut32:
## Prototype: void unsafePut16(I_16 *address, I_16 value);
## Defined in: #Args: 2
.csect .unsafePut16[pr]
.unsafePut16:
.function .unsafePut16,startproc.unsafePut16,16,0,(endproc.unsafePut16-startproc.unsafePut16)
startproc.unsafePut16:
sth 4,0(3)
blr
endproc.unsafePut16:
## Prototype: void unsafePut8(I_8 *address, I_8 value);
## Defined in: #Args: 2
.csect .unsafePut8[pr]
.unsafePut8:
.function .unsafePut8,startproc.unsafePut8,16,0,(endproc.unsafePut8-startproc.unsafePut8)
startproc.unsafePut8:
stb 4,0(3)
blr
endproc.unsafePut8:
## Prototype: I_64 unsafeGet64(I_64 *address);
## Defined in: #Args: 1
.csect .unsafeGet64[pr]
.unsafeGet64:
.function .unsafeGet64,startproc.unsafeGet64,16,0,(endproc.unsafeGet64-startproc.unsafeGet64)
startproc.unsafeGet64:
lwz 4,4(3)
lwz 3,0(3)
blr
endproc.unsafeGet64:
## Prototype: I_32 unsafeGet32(I_32 *address);
## Defined in: #Args: 1
.csect .unsafeGet32[pr]
.unsafeGet32:
.function .unsafeGet32,startproc.unsafeGet32,16,0,(endproc.unsafeGet32-startproc.unsafeGet32)
startproc.unsafeGet32:
lwz 3,0(3)
blr
endproc.unsafeGet32:
## Prototype: I_16 unsafeGet16(I_16 *address);
## Defined in: #Args: 1
.csect .unsafeGet16[pr]
.unsafeGet16:
.function .unsafeGet16,startproc.unsafeGet16,16,0,(endproc.unsafeGet16-startproc.unsafeGet16)
startproc.unsafeGet16:
lha 3,0(3)
blr
endproc.unsafeGet16:
## Prototype: I_8 unsafeGet8(I_8 *address);
## Defined in: #Args: 1
.csect .unsafeGet8[pr]
.unsafeGet8:
.function .unsafeGet8,startproc.unsafeGet8,16,0,(endproc.unsafeGet8-startproc.unsafeGet8)
startproc.unsafeGet8:
lbz 0,0(3)
extsb 3,0
blr
endproc.unsafeGet8:
#CODE32 ends
# end of file