mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
tcg-ppc64: Use the type parameter to tcg_target_const_match
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
170bf9315b
commit
1194dcba22
1 changed files with 9 additions and 1 deletions
|
@ -296,7 +296,15 @@ static int tcg_target_const_match(tcg_target_long val, TCGType type,
|
||||||
int ct = arg_ct->ct;
|
int ct = arg_ct->ct;
|
||||||
if (ct & TCG_CT_CONST) {
|
if (ct & TCG_CT_CONST) {
|
||||||
return 1;
|
return 1;
|
||||||
} else if ((ct & TCG_CT_CONST_S16) && val == (int16_t)val) {
|
}
|
||||||
|
|
||||||
|
/* The only 32-bit constraint we use aside from
|
||||||
|
TCG_CT_CONST is TCG_CT_CONST_S16. */
|
||||||
|
if (type == TCG_TYPE_I32) {
|
||||||
|
val = (int32_t)val;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((ct & TCG_CT_CONST_S16) && val == (int16_t)val) {
|
||||||
return 1;
|
return 1;
|
||||||
} else if ((ct & TCG_CT_CONST_U16) && val == (uint16_t)val) {
|
} else if ((ct & TCG_CT_CONST_U16) && val == (uint16_t)val) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue