target-mips: optimize gen_arith()/gen_arith_imm()
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 11 Nov 2008 11:50:17 +0000 (11:50 +0000)
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 11 Nov 2008 11:50:17 +0000 (11:50 +0000)
commit507563e85db880ff875f0a9498a1cf58a50cfad3
treea8d1e70591ca850d274b5e0ca9788e728b1e0ddd
parent49bcf33cc7c94655c0a48f8de9b3473d29bb6ed0
target-mips: optimize gen_arith()/gen_arith_imm()

Optimize code generation in gen_arith()/gen_arith_imm():
- Don't do sign extension when the value is already guaranteed to be
  sign extended (otherwise, results are marked as UNPREDICTABLE).
- When the value is sign extended, compare the value to 0 instead of
  testing bit 31/63.
- Temp variables are valid up to and *including* the brcond instruction.
  Use them instead of temp local variables.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5680 c046a42c-6fe2-441c-8c8c-71466251a162
target-mips/translate.c