pysvp64db: fix traversal
[openpower-isa.git] / openpower / isa / pifixedload.mdwn
1 <!-- This defines DRAFT instructions that are to be proposed for SV -->
2
3 <!-- This defines instructions that load from RAM to a register -->
4 <!-- Effective Address is always RA, and the usual EA is stored late in RA -->
5
6 <!-- Note that these pages also define equivalent store instructions, -->
7 <!-- these are described in pifixedstore.mdwn -->
8
9
10
11 # Load Byte and Zero with Post-Update
12
13 D-Form
14
15 * lbzup RT,D(RA)
16
17 Pseudo-code:
18
19 EA <- (RA)
20 RT <- ([0] * (XLEN-8)) || MEM(EA, 1)
21 RA <- (RA) + EXTS(D)
22
23 Description:
24
25 Let the effective address (EA) be register RA.
26 The byte in storage addressed by EA is loaded into RT[56:63].
27 RT[0:55] are set to 0.
28
29 The sum (RA) + D is placed into register RA.
30
31 If RA=0 or RA=RT, the instruction form is invalid.
32
33 Special Registers Altered:
34
35 None
36
37 # Load Byte and Zero with Post-Update Indexed
38
39 X-Form
40
41 * lbzupx RT,RA,RB
42
43 Pseudo-code:
44
45 EA <- (RA)
46 RT <- ([0] * (XLEN-8)) || MEM(EA, 1)
47 RA <- (RA) + (RB)
48
49 Description:
50
51 Let the effective address (EA) be register RA.
52 The byte in storage addressed by EA is loaded into RT[56:63].
53 RT[0:55] are set to 0.
54
55 The sum (RA) + (RB) is placed into register RA.
56
57 If RA=0 or RA=RT, the instruction form is invalid.
58
59 Special Registers Altered:
60
61 None
62
63 # Load Halfword and Zero with Post-Update
64
65 D-Form
66
67 * lhzup RT,D(RA)
68
69 Pseudo-code:
70
71 EA <- (RA)
72 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
73 RA <- (RA) + EXTS(D)
74
75 Description:
76
77 Let the effective address (EA) be register RA.
78 The halfword in storage addressed by EA is loaded into RT[48:63].
79 RT[0:47] are set to 0.
80
81 The sum (RA) + D is placed into register RA.
82
83 If RA=0 or RA=RT, the instruction form is invalid.
84
85 Special Registers Altered:
86
87 None
88
89 # Load Halfword and Zero with Post-Update Indexed
90
91 X-Form
92
93 * lhzupx RT,RA,RB
94
95 Pseudo-code:
96
97 EA <- (RA)
98 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
99 RA <- (RA) + (RB)
100
101 Description:
102
103 Let the effective address (EA) be register RA.
104 The halfword in storage addressed by EA is loaded into RT[48:63].
105 RT[0:47] are set to 0.
106
107 The sum (RA) + (RB) is placed into register RA.
108
109 If RA=0 or RA=RT, the instruction form is invalid.
110
111 Special Registers Altered:
112
113 None
114
115 # Load Halfword Algebraic with Post-Update
116
117 D-Form
118
119 * lhaup RT,D(RA)
120
121 Pseudo-code:
122
123 EA <- (RA)
124 RT <- EXTS(MEM(EA, 2))
125 RA <- (RA) + EXTS(D)
126
127 Description:
128
129 Let the effective address (EA) be the register RA.
130 The halfword in storage addressed by EA is loaded into RT[48:63].
131 RT[0:47] are filled with a copy of bit 0 of the loaded halfword.
132
133 The sum (RA) + D is placed into register RA.
134
135 If RA=0 or RA=RT, the instruction form is invalid.
136
137 Special Registers Altered:
138
139 None
140
141 # Load Halfword Algebraic with Post-Update Indexed
142
143 X-Form
144
145 * lhaupx RT,RA,RB
146
147 Pseudo-code:
148
149 EA <- (RA)
150 RT <- EXTS(MEM(EA, 2))
151 RA <- (RA) + (RB)
152
153 Description:
154
155 Let the effective address (EA) be the register RA.
156 The halfword in storage addressed by EA is loaded into RT[48:63].
157 RT[0:47] are filled with a copy of bit 0 of the loaded halfword.
158
159 The sum (RA) + (RB) is placed into register RA.
160
161 If RA=0 or RA=RT, the instruction form is invalid.
162
163 Special Registers Altered:
164
165 None
166
167 # Load Word and Zero with Post-Update
168
169 D-Form
170
171 * lwzup RT,D(RA)
172
173 Pseudo-code:
174
175 EA <- (RA)
176 RT <- [0]*32 || MEM(EA, 4)
177 RA <- (RA) + EXTS(D)
178
179 Description:
180
181 Let the effective address (EA) be the register RA.
182 The halfword in storage addressed by EA is loaded into RT[48:63].
183 RT[0:47] are filled with a copy of bit 0 of the loaded halfword.
184
185 The sum (RA) + D is placed into register RA.
186
187 If RA=0 or RA=RT, the instruction form is invalid.
188
189 Special Registers Altered:
190
191 None
192
193 # Load Word and Zero with Post-Update Indexed
194
195 X-Form
196
197 * lwzupx RT,RA,RB
198
199 Pseudo-code:
200
201 EA <- (RA)
202 RT <- [0] * 32 || MEM(EA, 4)
203 RA <- (RA) + (RB)
204
205 Description:
206
207 Let the effective address (EA) be the register RA.
208 The halfword in storage addressed by EA is loaded into RT[48:63].
209 RT[0:47] are filled with a copy of bit 0 of the loaded halfword.
210
211 The sum (RA) + (RB) is placed into register RA.
212
213 If RA=0 or RA=RT, the instruction form is invalid.
214
215 Special Registers Altered:
216
217 None
218
219 # Load Word Algebraic with Post-Update Indexed
220
221 X-Form
222
223 * lwaupx RT,RA,RB
224
225 Pseudo-code:
226
227 EA <- (RA)
228 RT <- EXTS(MEM(EA, 4))
229 RA <- (RA) + (RB)
230
231 Description:
232
233 Let the effective address (EA) be the register RA.
234 The word in storage addressed by EA is loaded into RT[32:63].
235 RT[0:31] are filled with a copy of bit 0 of the loaded word.
236
237 The sum (RA) + (RB) is placed into register RA.
238
239 If RA=0 or RA=RT, the instruction form is invalid.
240
241 Special Registers Altered:
242
243 None
244
245 # Load Doubleword with Post-Update Indexed
246
247 DS-Form
248
249 * ldup RT,DS(RA)
250
251 Pseudo-code:
252
253 EA <- (RA)
254 RT <- MEM(EA, 8)
255 RA <- (RA) + EXTS(DS || 0b00)
256
257 Description:
258
259 Let the effective address (EA) be the register RA.
260 The doubleword in storage addressed by EA is loaded into RT.
261
262 The sum (RA)+ (DS||0b00) is placed into register RA.
263
264 If RA=0 or RA=RT, the instruction form is invalid.
265
266 Special Registers Altered:
267
268 None
269
270 # Load Doubleword with Post-Update Indexed
271
272 X-Form
273
274 * ldupx RT,RA,RB
275
276 Pseudo-code:
277
278 EA <- (RA)
279 RT <- MEM(EA, 8)
280 RA <- (RA) + (RB)
281
282 Description:
283
284 Let the effective address (EA) be the register RA.
285 The doubleword in storage addressed by EA is loaded
286 into RT.
287
288 The sum (RA) + (RB) is placed into register RA.
289
290 If RA=0 or RA=RT, the instruction form is invalid.
291
292 Special Registers Altered:
293
294 None
295