Stage 10: passing tests

This commit is contained in:
2025-11-09 15:35:42 +01:00
parent 5c05d0b3e5
commit 4018f69f65
7 changed files with 102 additions and 16 deletions

View File

@@ -1,10 +1,24 @@
# expected: 00010000
# expected: 00000050, 000001AB
.text
_start:
addi x1, x0, 0x1
sw x1, 28(x0)
nop
nop
nop
addi x1, x0, 0x5
# Write x1 in the next addi instruction, position 12+3 bytes
# Due to type I immediate, x31 must contain 0x050
sb x1, 15(x0)
nop
addi x31, x0, 0x0
# Create an instruction bytes per bytes
# addi x31, x0, 0x1AB -> 0x1AB00F93
addi x1, x0, 0x93
addi x2, x0, 0x0F
addi x3, x0, 0xB0
addi x4, x0, 0x1A
sb x1, 52(x0)
sb x2, 53(x0)
sb x3, 54(x0)
sb x4, 55(x0)
nop
# Instruction will be written here
nop