I’m disassembling a firmware using IDA (mipsb processor)
I’m seeing this a lot in this IDA dissasm.
lui $t9 , 0x802f
…does nothing with $t9 …and doesn’t jump..
lbu $t9, 0x200+var_24($sp)
And it makes no sense to me.
in first line: $t9 becomes 0x802F0000
in 2nd line: $t9 becomes whatever byte is store at that location on the stack.
If i’m right, then what’s the point? Is this a mishap of the compiler used, or maybe a programmer’s mishap, or am i missing something ?

This shall remain a mystery how it got here, but obviously the
lui $t9 , 0x802Fhas absolutely no purpose in this code (and other parts of the firmware i’m looking at, i see same thing.. same nonsense…with same valueslui $t9, 0x802f)hsikcah’s answer is definitely wrong. (
lbuloads a single byte, but it zero’es out the first 3 bytes of the register)..The answer seems to be my original guess. It’s either a compiler’s artifact or a coder’s nonsense that wasn’t removed by the compiler (also suggested by m0skit0‘s and markgz‘s comments)