-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_instructions.asm
26 lines (26 loc) · 1.08 KB
/
test_instructions.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.text
addi x1, x0, 12 # (x1) <= 12 / 0x0000000c
addi x2, x0, 17 # (x2) <= 17 / 0x00000011
add x3, x1, x2 # (x3) <= 29 / 0x0000001D
sub x3, x3, x1 # (x3) <= 17 / 0x00000011
slli x3, x3, 27 # (x3) <= -2013265920 / 0x88000000
mul x4, x2, x3 # (x4) <= 134217728 / 0x08000000
mulh x4, x2, x3 # (x4) <= -8 / 0xFFFFFFF8
mulhu x5, x2, x3 # (x5) <= 9 / 0x00000009
slt x6, x4, x1 # (x6) <= 1 / 0x00000001
sltu x6, x4, x1 # (x6) <= 0 / 0x00000000
and x7, x4, x1 # (x7) <= 8 / 0x00000008
or x8, x4, x1 # (x8) <= -4 / 0xFFFFFFFC
xor x9, x1, x2 # (x9) <= 29 / 0x0000001D
andi x10, x3, -2048 # (x10) <= -2013265920 / 0x88000000
ori x11, x2, -2048 # (x11) <= -2031 / 0xFFFFF811
xori x12, x2, 14 # (x12) <= 31 / 0x0000001F
sll x13, x2, x1 # (x13) <= 69632 / 0x00011000
srl x14,x3,x2 # (x14) <= 17408 / 0x00004400
sra x15, x3, x2 # (x15) <= -15360 / 0xFFFFC400
slli x16 ,x1, 1 # (x16) <= 24 / 0x00000018
srli x17, x2, 1 # (x17) <= 8 / 0x00000008
srai x18, x3, 1 # (x18) <= -1006632960 / 0xC4000000
lui x19, 0xDBEEF # (x19) <= -605097984 / 0xDBEEF000
csrrw x20, 0xf02, x3 # HEX <= 0x88000000 / -2013265920
csrrw x21, 0xf00, x3