Reputation: 43
What does addi a0, zero, 2
mean in pseudocode?
Is it a0=a0+2
??
I am not sure because we do not have explicit register in this instruction to tell us where goes our result.
Upvotes: 0
Views: 950
Reputation: 3741
There is not so much pseudo code in this risc-v assembly line :
addi a0, zero, 2
But a0 and zero are ABI name of RISC-V register (see this pdf page 3).
Then the assembly line given will do this :
x10 = 0 + 2
Upvotes: 3