2
Contributors
3
Replies
13
Views
3 Years
Discussion Span
Last Post by Hiroshe
0

I haven't use a MIPS assembler that accepts $zero, but yes - they both don't do anything.

Though I've heard that some might prefer one to the other when the other is used more often (a little less heat going through one instruction). I'm not sure how usefull that is in practice though.

1

So I just learned that the convention of using $zero and $s0 are specific calling conventions for some tools chains (O32/N32/N64). In this case $s0 is really $16 and $zero is really $0.

What I mean when I say "they don't do do anything" is that they don't do anything. Is this homework? Read out the instruction to yourself. add $16, $16, $0. What signed integer value does register $0 always hold? If you know what add $d, $s, $t does, then what is the effect when $t is $0 and $d is $s? Now do the same thing for addi $16, $16, 0. Contrast and compair the state before and after both instructions.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.