1 <!-- This defines instructions described in PowerISA Version 3.0 B Book 1 -->
3 <!-- This defines instructions that load from RAM to a register -->
5 <!-- Note that these pages also define equivalent store instructions, -->
6 <!-- these are described in fixedstore.mdwn -->
8 <!-- Section 3.3.2 This defines the Fixed-Point Load Instructions pages 47 - 53 -->
9 <!-- Section 3.3.3 Fixed-Point Store Instructions pages 54 - 56 -->
10 <!-- Section 3.3.3.1 64-bit Fixed-Point Store Instructions pages 57 -->
11 <!-- Section 3.3.4 Fixed Point Load and Store Quadword Instructions pages 58 - 59 -->
12 <!-- Section 3.3.5 Fixed-Point Load and Store with Byte Reversal Instructions page 60 -->
13 <!-- Section 3.3.5.1 64-Bit Load and Store with Byte Reversal Instructions page 61 -->
14 <!-- Section 3.3.6 Fixed-Point Load and Store Multiple Instructions page 62 -->
18 <!-- Section 3.3.2 This defines the Fixed-Point Load Instructions pages 47 - 53 -->
20 <!-- The byte, halfword, word, or doubleword in storage addressed by EA is loaded -->
21 <!-- into register RT. -->
23 <!-- Many of the Load instructions have an “update” form, in which register RA is -->
24 <!-- updated with the effective address. For these forms, if RA!=0 and RA!=RT, the -->
25 <!-- effective address is placed into register RA and the storage element (byte, -->
26 <!-- halfword, word, or doubleword) addressed by EA is loaded into RT. -->
39 RT <- ([0] * (XLEN-8)) || MEM(EA, 1)
43 Let the effective address (EA) be the sum (RA|0)+ D.
44 The byte in storage addressed by EA is loaded into
45 RT[56:63]. RT[0:55] are set to 0.
47 Special Registers Altered:
51 # Load Byte and Zero Indexed
61 RT <- ([0] * (XLEN-8)) || MEM(EA, 1)
65 Let the effective address (EA) be the sum
66 (RA|0)+ (RB). The byte in storage addressed by EA is
67 loaded into RT[56:63] . RT[0:55] are set to 0.
69 Special Registers Altered:
73 # Load Byte and Zero with Update
82 RT <- ([0] * (XLEN-8)) || MEM(EA, 1)
87 Let the effective address (EA) be the sum (RA)+ D. The
88 byte in storage addressed by EA is loaded into RT[56:63].
89 RT[0:55] are set to 0.
91 EA is placed into register RA.
93 If RA=0 or RA=RT, the instruction form is invalid.
95 Special Registers Altered:
99 # Load Byte and Zero with Update Indexed
108 RT <- ([0] * (XLEN-8)) || MEM(EA, 1)
113 Let the effective address (EA) be the sum (RA)+ (RB).
114 The byte in storage addressed by EA is loaded into
115 RT[56:63]. RT[0:55] are set to 0.
117 EA is placed into register RA.
119 If RA=0 or RA=RT, the instruction form is invalid.
121 Special Registers Altered:
125 # Load Halfword and Zero
135 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
139 Let the effective address (EA) be the sum (RA|0)+ D.
140 The halfword in storage addressed by EA is loaded into
141 RT[48:63]. RT[0:47] are set to 0.
143 Special Registers Altered:
147 # Load Halfword and Zero Indexed
157 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
159 Special Registers Altered:
163 # Load Halfword and Zero with Update
172 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
177 Let the effective address (EA) be the sum (RA)+ D. The
178 halfword in storage addressed by EA is loaded into
179 RT[48:63]. RT[0:47] are set to 0.
181 EA is placed into register RA.
183 If RA=0 or RA=RT, the instruction form is invalid.
185 Special Registers Altered:
189 # Load Halfword and Zero with Update Indexed
198 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
203 Let the effective address (EA) be the sum (RA)+ (RB).
204 The halfword in storage addressed by EA is loaded into
205 RT[48:63]. RT[0:47] are set to 0.
207 EA is placed into register RA.
209 If RA=0 or RA=RT, the instruction form is invalid.
211 Special Registers Altered:
215 # Load Halfword Algebraic
225 RT <- EXTS(MEM(EA, 2))
227 Special Registers Altered:
231 # Load Halfword Algebraic Indexed
241 RT <- EXTS(MEM(EA, 2))
243 Special Registers Altered:
247 # Load Halfword Algebraic with Update
256 RT <- EXTS(MEM(EA, 2))
261 Let the effective address (EA) be the sum (RA)+ D. The
262 halfword in storage addressed by EA is loaded into
263 RT[48:63]. RT[0:47] are filled with a copy of bit 0 of the
266 EA is placed into register RA.
268 If RA=0 or RA=RT, the instruction form is invalid.
270 Special Registers Altered:
274 # Load Halfword Algebraic with Update Indexed
283 RT <- EXTS(MEM(EA, 2))
288 Let the effective address (EA) be the sum (RA)+ (RB).
289 The halfword in storage addressed by EA is loaded into
290 RT48:63. RT 0:47 are filled with a copy of bit 0 of the
293 EA is placed into register RA.
295 If RA=0 or RA=RT, the instruction form is invalid.
297 Special Registers Altered:
311 RT <- [0] * 32 || MEM(EA, 4)
313 Special Registers Altered:
317 # Load Word and Zero Indexed
327 RT <- [0] * 32 || MEM(EA, 4)
329 Special Registers Altered:
333 # Load Word and Zero with Update
342 RT <- [0]*32 || MEM(EA, 4)
345 Special Registers Altered:
349 # Load Word and Zero with Update Indexed
358 RT <- [0] * 32 || MEM(EA, 4)
361 Special Registers Altered:
365 # Load Word Algebraic
374 EA <- b + EXTS(DS || 0b00)
375 RT <- EXTS(MEM(EA, 4))
377 Special Registers Altered:
381 # Load Word Algebraic Indexed
391 RT <- EXTS(MEM(EA, 4))
393 Special Registers Altered:
397 # Load Word Algebraic with Update Indexed
406 RT <- EXTS(MEM(EA, 4))
409 Special Registers Altered:
422 EA <- b + EXTS(DS || 0b00)
425 Special Registers Altered:
429 # Load Doubleword Indexed
441 Special Registers Altered:
445 # Load Doubleword with Update Indexed
453 EA <- (RA) + EXTS(DS || 0b00)
457 Special Registers Altered:
461 # Load Doubleword with Update Indexed
473 Special Registers Altered:
477 <!-- Section 3.3.3 Fixed-Point Store Instructions pages 54 - 56 -->
479 <!-- The contents of register RS are stored into the byte, halfword, word, or -->
480 <!-- doubleword in storage addressed by EA. -->
482 <!-- Many of the Store instructions have an “update” form, in which register RA is -->
483 <!-- updated with the effective address. For these forms, the following rules apply. -->
485 <!-- If RA!=0, the effective address is placed into register RA. -->
487 <!-- If RS=RA, the contents of register RS are copied to the target storage element -->
488 <!-- and then EA is placed into RA (RS). -->
490 <!-- Section 3.3.3.1 64-bit Fixed-Point Store Instructions pages 57 -->
492 <!-- Section 3.3.4 Fixed Point Load and Store Quadword Instructions pages 58 - 59 -->
494 <!-- For lq, the quadword in storage addressed by EA is loaded into an even-odd pair -->
495 <!-- of GPRs as follows. In Big-Endian mode, the even-numbered GPR is loaded with -->
496 <!-- the doubleword from storage addressed by EA and the odd-numbered GPR is loaded -->
497 <!-- with the doubleword addressed by EA+8. In Little-Endian mode, the even-numbered -->
498 <!-- GPR is loaded with the byte-reversed doubleword from storage addressed by EA+8 -->
499 <!-- and the odd-numbered GPR is loaded with the byte-reversed doubleword addressed -->
511 EA <- b + EXTS(DQ || 0b0000)
514 Special Registers Altered:
518 <!-- Section 3.3.5 Fixed-Point Load and Store with Byte Reversal Instructions page 60 -->
520 # Load Halfword Byte-Reverse Indexed
530 load_data <- MEM(EA, 2)
531 RT <- [0]*48 || load_data[8:15] || load_data[0:7]
533 Special Registers Altered:
537 # Load Word Byte-Reverse Indexed
547 load_data <- MEM(EA, 4)
548 RT <- ([0] * 32 || load_data[24:31] || load_data[16:23]
549 || load_data[8:15] || load_data[0:7])
551 Special Registers Altered:
556 <!-- Section 3.3.5.1 64-Bit Load and Store with Byte Reversal Instructions page 61 -->
558 # Load Doubleword Byte-Reverse Indexed
568 load_data <- MEM(EA, 8)
569 RT <- (load_data[56:63] || load_data[48:55]
570 || load_data[40:47] || load_data[32:39]
571 || load_data[24:31] || load_data[16:23]
572 || load_data[8:15] || load_data[0:7])
574 Special Registers Altered:
578 <!-- Section 3.3.6 Fixed-Point Load and Store Multiple Instructions page 62 -->
592 GPR(r) <- [0]*32 || MEM(EA, 4)
596 Special Registers Altered: