File tree 1 file changed +10
-4
lines changed 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 53
53
(set$ dst src))
54
54
55
55
(defun C_LUI (dst imm)
56
- (set$ dst (lshift (cast-signed
57
- (- (word-width) 12 )
58
- (cast-low 6 imm))
59
- 12 )))
56
+ (set$ dst (lshift imm 12 )))
60
57
61
58
(defun AUIPC (dst off)
62
59
(set$ dst (+ (get-program-counter) off)))
86
83
(defun LW (dst reg off)
87
84
(load-word cast-signed 2 dst reg off))
88
85
86
+ (defun C_LW (dst reg off)
87
+ (load-word cast-signed 2 dst reg off))
88
+
89
89
(defun LH (dst reg off)
90
90
(load-word cast-signed 4 dst reg off))
91
91
194
194
(defun BNE (rs1 rs2 off)
195
195
(conditional-jump (/= rs1 rs2) off))
196
196
197
+ (defun BGE (rs1 rs2 off)
198
+ (conditional-jump (>= rs1 rs2) off))
199
+
197
200
(defun C_BEQ (rs1 rs2 off)
198
201
(conditional-jump (= rs1 rs2) off))
199
202
203
206
(defun C_BNE (rs1 rs2 off)
204
207
(conditional-jump (/= rs1 rs2) off))
205
208
209
+ (defun C_BGE (rs1 rs2 off)
210
+ (conditional-jump (>= rs1 rs2) off))
211
+
206
212
(defun BEQZ (rs1 off)
207
213
(conditional-jump (is-zero rs1) off))
208
214
You can’t perform that action at this time.
0 commit comments