07-24-2023, 11:29 AM
I was confused about this part while I study MIPS.
The textbook written by Professor [John L. Hennessy](
lui $s0, upper(big)
ori $s0, $s0, lower(big)
But why don't we just do
addi $s0, $zero, big
Since the registers are 32-bit, this is more strightforward, isn't it?
The textbook written by Professor [John L. Hennessy](
[To see links please register here]
) say if we get some *big* constant to load, we shouldlui $s0, upper(big)
ori $s0, $s0, lower(big)
But why don't we just do
addi $s0, $zero, big
Since the registers are 32-bit, this is more strightforward, isn't it?