projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1194dcb
)
tcg-sparc: Use the type parameter to tcg_target_const_match
author
Richard Henderson
<rth@twiddle.net>
Mon, 31 Mar 2014 05:27:35 +0000
(22:27 -0700)
committer
Richard Henderson
<rth@twiddle.net>
Fri, 18 Apr 2014 23:57:36 +0000
(16:57 -0700)
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/sparc/tcg-target.c
patch
|
blob
|
history
diff --git
a/tcg/sparc/tcg-target.c
b/tcg/sparc/tcg-target.c
index 73121e13cfc439ec8cb8230f38b8ec418bf9134f..35089b82c9d305b8cf5e4f6da63c2fc66c8f0ac8 100644
(file)
--- a/
tcg/sparc/tcg-target.c
+++ b/
tcg/sparc/tcg-target.c
@@
-334,7
+334,13
@@
static inline int tcg_target_const_match(tcg_target_long val, TCGType type,
if (ct & TCG_CT_CONST) {
return 1;
- } else if ((ct & TCG_CT_CONST_ZERO) && val == 0) {
+ }
+
+ if (type == TCG_TYPE_I32) {
+ val = (int32_t)val;
+ }
+
+ if ((ct & TCG_CT_CONST_ZERO) && val == 0) {
return 1;
} else if ((ct & TCG_CT_CONST_S11) && check_fit_tl(val, 11)) {
return 1;