1 <!-- This defines DRAFT instructions that are to be proposed for SV -->
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 -->
6 <!-- Note that these pages also define equivalent store instructions, -->
7 <!-- these are described in pifixedstore.mdwn -->
11 # Load Byte and Zero with Post-Update
20 RT <- ([0] * (XLEN-8)) || MEM(EA, 1)
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.
29 The sum (RA) + D is placed into register RA.
31 If RA=0 or RA=RT, the instruction form is invalid.
33 Special Registers Altered:
37 # Load Byte and Zero with Post-Update Indexed
46 RT <- ([0] * (XLEN-8)) || MEM(EA, 1)
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.
55 The sum (RA) + (RB) is placed into register RA.
57 If RA=0 or RA=RT, the instruction form is invalid.
59 Special Registers Altered:
63 # Load Halfword and Zero with Post-Update
72 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
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.
81 The sum (RA) + D is placed into register RA.
83 If RA=0 or RA=RT, the instruction form is invalid.
85 Special Registers Altered:
89 # Load Halfword and Zero with Post-Update Indexed
98 RT <- ([0] * (XLEN-16)) || MEM(EA, 2)
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.
107 The sum (RA) + (RB) is placed into register RA.
109 If RA=0 or RA=RT, the instruction form is invalid.
111 Special Registers Altered:
115 # Load Halfword Algebraic with Post-Update
124 RT <- EXTS(MEM(EA, 2))
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.
133 The sum (RA) + D is placed into register RA.
135 If RA=0 or RA=RT, the instruction form is invalid.
137 Special Registers Altered:
141 # Load Halfword Algebraic with Post-Update Indexed
150 RT <- EXTS(MEM(EA, 2))
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.
159 The sum (RA) + (RB) is placed into register RA.
161 If RA=0 or RA=RT, the instruction form is invalid.
163 Special Registers Altered:
167 # Load Word and Zero with Post-Update
176 RT <- [0]*32 || MEM(EA, 4)
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.
185 The sum (RA) + D is placed into register RA.
187 If RA=0 or RA=RT, the instruction form is invalid.
189 Special Registers Altered:
193 # Load Word and Zero with Post-Update Indexed
202 RT <- [0] * 32 || MEM(EA, 4)
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.
211 The sum (RA) + (RB) is placed into register RA.
213 If RA=0 or RA=RT, the instruction form is invalid.
215 Special Registers Altered:
219 # Load Word Algebraic with Post-Update Indexed
228 RT <- EXTS(MEM(EA, 4))
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.
237 The sum (RA) + (RB) is placed into register RA.
239 If RA=0 or RA=RT, the instruction form is invalid.
241 Special Registers Altered:
245 # Load Doubleword with Post-Update Indexed
255 RA <- (RA) + EXTS(DS || 0b00)
259 Let the effective address (EA) be the register RA.
260 The doubleword in storage addressed by EA is loaded into RT.
262 The sum (RA)+ (DS||0b00) is placed into register RA.
264 If RA=0 or RA=RT, the instruction form is invalid.
266 Special Registers Altered:
270 # Load Doubleword with Post-Update Indexed
284 Let the effective address (EA) be the register RA.
285 The doubleword in storage addressed by EA is loaded
288 The sum (RA) + (RB) is placed into register RA.
290 If RA=0 or RA=RT, the instruction form is invalid.
292 Special Registers Altered: