beqz s0, 1f
Expands tobeq s0, x0, 1f
jump to label1f
if s0 == x0. Note that label1f
means to go to numeric label 1 FORWARD of the given position whose opposite is label1b
meaning to go to numeric label 1 BACKWARD of the given position.csrrw t3, CSR_SSCRATCH, a0
Write the value in the csr registerCSR_SSCRATCH
tot3
register and write the value ina0
back toCSR_SSCRATCH
jal purgatory
Expands tojal x1, purgatory
and unconditionally jump to functionpurgatory()
and write PC+4 into x1 (return address) registerjal t0, .Lbyte_copy_until_aligned_forward
Write PC+4 into registert0
and unconditionally jump to label.Lbyte_copy_until_aligned_forward
.jalr s0
Expands tojalr x1, s0, 0
meaning the target address to jump to iss0 + 0
and write PC+4 into x1 (return address) register
Last active
July 17, 2024 04:29
-
-
Save lucmann/913cde879ec444fc639f5567df816099 to your computer and use it in GitHub Desktop.
riscv assembly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment