diff options
author | Richard Henderson <rth@twiddle.net> | 2013-04-02 14:14:23 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2013-04-15 20:09:53 +0200 |
commit | 991041a4eb8895390d816375021dccfd12c81752 (patch) | |
tree | baf513907e7d7e6715d3ea2def17e1c99dc19f83 /tcg | |
parent | 4c314da6d1b438c815533380981880fe3f49b1ac (diff) |
tcg-ppc64: Cleanup i32 constants to tcg_out_cmp
Nothing else in the call chain ensures that these
constants don't have garbage in the high bits.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/ppc64/tcg-target.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 84c757562b..70cbb86938 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -1059,6 +1059,11 @@ static void tcg_out_cmp(TCGContext *s, int cond, TCGArg arg1, TCGArg arg2, int imm; uint32_t op; + /* Simplify the comparisons below wrt CMPI. */ + if (type == TCG_TYPE_I32) { + arg2 = (int32_t)arg2; + } + switch (cond) { case TCG_COND_EQ: case TCG_COND_NE: |