图着色基本原理
static int gcd(int a, int b) {
while (a != 0) {
int c = b % a;
b = a;
a = c;
}
return b;
}...
# _R32是a,_R33是b,_R34被优化掉了,_R35是c,_R36是计算a != 0的临时结果
j _L3
_L2:
rem _R35, _R33, _R32
move _R33, _R32
move _R32, _R35
_L3:
sne _R36, _R32, 0
bnez _R36, _L2
move $v0, _R33
...
Last updated
Was this helpful?