diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-02-04 00:37:54 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-02-04 00:37:54 +0000 |
commit | 5ff9d6a469fbbd3861ea49e241b0ccd09aedd62b (patch) | |
tree | 6604027fe330eb0722c528ee57d3212868794bc4 /tcg/tcg-op.h | |
parent | bb210e78b35d21f8bfe2addbe64b65f586f5a241 (diff) |
fixed sign extensions - added explicit side effect op flag - added discard instruction
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3963 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/tcg-op.h')
-rw-r--r-- | tcg/tcg-op.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h index 6fb3138366..82aebb3219 100644 --- a/tcg/tcg-op.h +++ b/tcg/tcg-op.h @@ -865,7 +865,7 @@ static inline void tcg_gen_ext8s_i32(TCGv ret, TCGv arg) tcg_gen_op2(INDEX_op_ext8s_i32, ret, arg); #else tcg_gen_shli_i32(ret, arg, 24); - tcg_gen_sari_i32(ret, arg, 24); + tcg_gen_sari_i32(ret, ret, 24); #endif } @@ -875,7 +875,7 @@ static inline void tcg_gen_ext16s_i32(TCGv ret, TCGv arg) tcg_gen_op2(INDEX_op_ext16s_i32, ret, arg); #else tcg_gen_shli_i32(ret, arg, 16); - tcg_gen_sari_i32(ret, arg, 16); + tcg_gen_sari_i32(ret, ret, 16); #endif } @@ -975,7 +975,7 @@ static inline void tcg_gen_ext8s_i64(TCGv ret, TCGv arg) tcg_gen_op2(INDEX_op_ext8s_i64, ret, arg); #else tcg_gen_shli_i64(ret, arg, 56); - tcg_gen_sari_i64(ret, arg, 56); + tcg_gen_sari_i64(ret, ret, 56); #endif } @@ -985,7 +985,7 @@ static inline void tcg_gen_ext16s_i64(TCGv ret, TCGv arg) tcg_gen_op2(INDEX_op_ext16s_i64, ret, arg); #else tcg_gen_shli_i64(ret, arg, 48); - tcg_gen_sari_i64(ret, arg, 48); + tcg_gen_sari_i64(ret, ret, 48); #endif } @@ -995,7 +995,7 @@ static inline void tcg_gen_ext32s_i64(TCGv ret, TCGv arg) tcg_gen_op2(INDEX_op_ext32s_i64, ret, arg); #else tcg_gen_shli_i64(ret, arg, 32); - tcg_gen_sari_i64(ret, arg, 32); + tcg_gen_sari_i64(ret, ret, 32); #endif } @@ -1062,6 +1062,25 @@ static inline void tcg_gen_bswap_i64(TCGv ret, TCGv arg) #endif + +static inline void tcg_gen_discard_i32(TCGv arg) +{ + tcg_gen_op1(INDEX_op_discard, arg); +} + +#if TCG_TARGET_REG_BITS == 32 +static inline void tcg_gen_discard_i64(TCGv arg) +{ + tcg_gen_discard_i32(arg); + tcg_gen_discard_i32(TCGV_HIGH(arg)); +} +#else +static inline void tcg_gen_discard_i64(TCGv arg) +{ + tcg_gen_op1(INDEX_op_discard, arg); +} +#endif + /***************************************/ static inline void tcg_gen_macro_2(TCGv ret0, TCGv ret1, int macro_id) { |