when gcc emits code for arithmetic operations involving a var (register)
and a constant (immediate), it emits two instructions:
1. loading constant to a register
2. register <- register op register
the most notable case of such code is
n--
which is compiled to
or $s37,1,(0)1 # $s37 <- 1
cpx $s35,$s40,$s37 # $s35 <- $s40 - $s37
for constants like 1, easily created by a mask, gcc could emit just a
single instruction
1. register <- register op immediate
Original issue reported on code.google.com by jmoc...@gmail.com on 26 Nov 2008 at 3:39
Original issue reported on code.google.com by
jmoc...@gmail.com
on 26 Nov 2008 at 3:39