|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes |
Date: | Thu, 17 Dec 2009 09:48:45 -0800 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Thunderbird/3.0b4 |
On 12/17/2009 09:07 AM, Richard Henderson wrote:
+ case TCG_COND_NE: + if (const_arg2) { + if ((uint16_t) arg2 == arg2) { + tcg_out32 (s, XORI | RS (arg1) | RA (0) | arg2); + } + else { + tcg_out_movi (s, TCG_TYPE_I32, 0, arg2); + tcg_out32 (s, XOR | SAB (arg1, 0, 0)); + } + } + else { + tcg_out32 (s, XOR | SAB (arg1, 0, arg2)); + } + + tcg_out32 (s, ADDIC | RT (arg0) | RA (0) | 0xffff); + tcg_out32 (s, SUBFE | TAB (arg0, arg0, 0)); + return;Heh, you know a trick that gcc doesn't for powerpc. It just adds an xor at the end of the EQ sequence.
Ah, gcc does know the trick, it just thinks it's only a win on old Power systems.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |