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)
63 Special Registers Altered:
67 # Load Byte and Zero with Update
76 RT <- ([0] * (XLEN-8)) || MEM(EA, 1)
79 Description:Let the effective address (EA) be the sum (RA)+ D. The
80 byte in storage addressed by EA is loaded into RT 56:63.
82 EA is placed into register RA.
83 If RA=0 or RA=RT, the instruction form is invalid.
85 Special Registers Altered:
89 # Load Byte and Zero with Update Indexed
98 RT <- ([0] * (XLEN-8)) || MEM(EA, 1)
101 Description:Let the effective address (EA) be the sum (RA)+ (RB).
102 The byte in storage addressed by EA is loaded into
103 RT56:63. RT0:55 are set to 0.
104 EA is placed into register RA.
105 If RA=0 or RA=RT, the instruction form is invalid.
107 Special Registers Altered:
111 # Load Halfword and Zero
121 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
123 Special Registers Altered:
127 # Load Halfword and Zero Indexed
137 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
139 Special Registers Altered:
143 # Load Halfword and Zero with Update
152 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
155 Description:Let the effective address (EA) be the sum (RA)+ D. The
156 halfword in storage addressed by EA is loaded into
157 RT48:63. RT 0:47 are set to 0.
158 EA is placed into register RA.
159 If RA=0 or RA=RT, the instruction form is invalid.
161 Special Registers Altered:
165 # Load Halfword and Zero with Update Indexed
174 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
177 Special Registers Altered:
181 # Load Halfword Algebraic
191 RT <- EXTS(MEM(EA, 2))
193 Special Registers Altered:
197 # Load Halfword Algebraic Indexed
207 RT <- EXTS(MEM(EA, 2))
209 Special Registers Altered:
213 # Load Halfword Algebraic with Update
222 RT <- EXTS(MEM(EA, 2))
225 Special Registers Altered:
229 # Load Halfword Algebraic with Update Indexed
238 RT <- EXTS(MEM(EA, 2))
241 Special Registers Altered:
255 RT <- [0] * 32 || MEM(EA, 4)
257 Special Registers Altered:
261 # Load Word and Zero Indexed
271 RT <- [0] * 32 || MEM(EA, 4)
273 Special Registers Altered:
277 # Load Word and Zero with Update
286 RT <- [0]*32 || MEM(EA, 4)
289 Special Registers Altered:
293 # Load Word and Zero with Update Indexed
302 RT <- [0] * 32 || MEM(EA, 4)
305 Special Registers Altered:
309 # Load Word Algebraic
318 EA <- b + EXTS(DS || 0b00)
319 RT <- EXTS(MEM(EA, 4))
321 Special Registers Altered:
325 # Load Word Algebraic Indexed
335 RT <- EXTS(MEM(EA, 4))
337 Special Registers Altered:
341 # Load Word Algebraic with Update Indexed
350 RT <- EXTS(MEM(EA, 4))
353 Special Registers Altered:
366 EA <- b + EXTS(DS || 0b00)
369 Special Registers Altered:
373 # Load Doubleword Indexed
385 Special Registers Altered:
389 # Load Doubleword with Update Indexed
397 EA <- (RA) + EXTS(DS || 0b00)
401 Special Registers Altered:
405 # Load Doubleword with Update Indexed
417 Special Registers Altered:
421 <!-- Section 3.3.3 Fixed-Point Store Instructions pages 54 - 56 -->
423 <!-- The contents of register RS are stored into the byte, halfword, word, or -->
424 <!-- doubleword in storage addressed by EA. -->
426 <!-- Many of the Store instructions have an “update” form, in which register RA is -->
427 <!-- updated with the effective address. For these forms, the following rules apply. -->
429 <!-- If RA!=0, the effective address is placed into register RA. -->
431 <!-- If RS=RA, the contents of register RS are copied to the target storage element -->
432 <!-- and then EA is placed into RA (RS). -->
434 <!-- Section 3.3.3.1 64-bit Fixed-Point Store Instructions pages 57 -->
436 <!-- Section 3.3.4 Fixed Point Load and Store Quadword Instructions pages 58 - 59 -->
438 <!-- For lq, the quadword in storage addressed by EA is loaded into an even-odd pair -->
439 <!-- of GPRs as follows. In Big-Endian mode, the even-numbered GPR is loaded with -->
440 <!-- the doubleword from storage addressed by EA and the odd-numbered GPR is loaded -->
441 <!-- with the doubleword addressed by EA+8. In Little-Endian mode, the even-numbered -->
442 <!-- GPR is loaded with the byte-reversed doubleword from storage addressed by EA+8 -->
443 <!-- and the odd-numbered GPR is loaded with the byte-reversed doubleword addressed -->
455 EA <- b + EXTS(DQ || 0b0000)
458 Special Registers Altered:
462 <!-- Section 3.3.5 Fixed-Point Load and Store with Byte Reversal Instructions page 60 -->
464 # Load Halfword Byte-Reverse Indexed
474 load_data <- MEM(EA, 2)
475 RT <- [0]*48 || load_data[8:15] || load_data[0:7]
477 Special Registers Altered:
481 # Load Word Byte-Reverse Indexed
491 load_data <- MEM(EA, 4)
492 RT <- ([0] * 32 || load_data[24:31] || load_data[16:23]
493 || load_data[8:15] || load_data[0:7])
495 Special Registers Altered:
500 <!-- Section 3.3.5.1 64-Bit Load and Store with Byte Reversal Instructions page 61 -->
502 # Load Doubleword Byte-Reverse Indexed
512 load_data <- MEM(EA, 8)
513 RT <- (load_data[56:63] || load_data[48:55]
514 || load_data[40:47] || load_data[32:39]
515 || load_data[24:31] || load_data[16:23]
516 || load_data[8:15] || load_data[0:7])
518 Special Registers Altered:
522 <!-- Section 3.3.6 Fixed-Point Load and Store Multiple Instructions page 62 -->
536 GPR(r) <- [0]*32 || MEM(EA, 4)
540 Special Registers Altered: