Files
fmn_processor/bench/tests/op/sh.s

23 lines
494 B
ArmAsm

# expected: 00000050, 000001AB
.text
_start:
addi x1, x0, 0x500
# Write x1 in the next addi instruction, position 12+2 bytes
# Due to type I immediate, x31 must contain 0x050
sh x1, 14(x0)
nop
addi x31, x0, 0x0
# Create an instruction bytes per bytes
# addi x31, x0, 0x1AB -> 0x1AB00F93
lui x1, 0x0F93
srli x1, x1, 12
lui x2, 0x1AB0
srli x2, x2, 12
sh x1, 44(x0)
sh x2, 46(x0)
nop
# Instruction will be written here
nop