projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c314da
)
tcg-ppc64: Cleanup i32 constants to tcg_out_cmp
author
Richard Henderson
<rth@twiddle.net>
Tue, 2 Apr 2013 21:14:23 +0000
(14:14 -0700)
committer
Richard Henderson
<rth@twiddle.net>
Mon, 15 Apr 2013 18:09:53 +0000
(20:09 +0200)
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>
tcg/ppc64/tcg-target.c
patch
|
blob
|
history
diff --git
a/tcg/ppc64/tcg-target.c
b/tcg/ppc64/tcg-target.c
index 84c757562b984d76e4a7f440e009f0cbd4a513a2..70cbb869380e7b641eff1c785f0ae2b35cf258e7 100644
(file)
--- 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: