diff options
author | Taylor Simpson <tsimpson@quicinc.com> | 2023-04-27 15:59:56 -0700 |
---|---|---|
committer | Taylor Simpson <tsimpson@quicinc.com> | 2023-05-18 12:40:52 -0700 |
commit | 5c4b11e827e3cd64a6790b6158c75ed876e6f6e9 (patch) | |
tree | 5fb6a9c98834a159da79df1afb532b2737a0f56d /target/hexagon | |
parent | 085b6700f0063c4702706ac4bdcb80931b74e307 (diff) | |
download | qemu-5c4b11e827e3cd64a6790b6158c75ed876e6f6e9.zip qemu-5c4b11e827e3cd64a6790b6158c75ed876e6f6e9.tar.gz qemu-5c4b11e827e3cd64a6790b6158c75ed876e6f6e9.tar.bz2 |
Hexagon (target/hexagon) Add overrides for clr[tf]new
These instructions have implicit reads from p0, so we don't want
them in helpers when idef-parser is off.
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230427230012.3800327-6-tsimpson@quicinc.com>
Diffstat (limited to 'target/hexagon')
-rw-r--r-- | target/hexagon/gen_tcg.h | 16 | ||||
-rw-r--r-- | target/hexagon/macros.h | 4 |
2 files changed, 16 insertions, 4 deletions
diff --git a/target/hexagon/gen_tcg.h b/target/hexagon/gen_tcg.h index ef17f2f..a1d7eab 100644 --- a/target/hexagon/gen_tcg.h +++ b/target/hexagon/gen_tcg.h @@ -1101,6 +1101,22 @@ gen_jump(ctx, riV); \ } while (0) +/* if (p0.new) r0 = #0 */ +#define fGEN_TCG_SA1_clrtnew(SHORTCODE) \ + do { \ + tcg_gen_movcond_tl(TCG_COND_EQ, RdV, \ + hex_new_pred_value[0], tcg_constant_tl(0), \ + RdV, tcg_constant_tl(0)); \ + } while (0) + +/* if (!p0.new) r0 = #0 */ +#define fGEN_TCG_SA1_clrfnew(SHORTCODE) \ + do { \ + tcg_gen_movcond_tl(TCG_COND_NE, RdV, \ + hex_new_pred_value[0], tcg_constant_tl(0), \ + RdV, tcg_constant_tl(0)); \ + } while (0) + #define fGEN_TCG_J2_pause(SHORTCODE) \ do { \ uiV = uiV; \ diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h index 760630d..b1ff40c 100644 --- a/target/hexagon/macros.h +++ b/target/hexagon/macros.h @@ -227,12 +227,8 @@ static inline void gen_cancel(uint32_t slot) #ifdef QEMU_GENERATE #define fLSBNEW(PVAL) tcg_gen_andi_tl(LSB, (PVAL), 1) -#define fLSBNEW0 tcg_gen_andi_tl(LSB, hex_new_pred_value[0], 1) -#define fLSBNEW1 tcg_gen_andi_tl(LSB, hex_new_pred_value[1], 1) #else #define fLSBNEW(PVAL) ((PVAL) & 1) -#define fLSBNEW0 (env->new_pred_value[0] & 1) -#define fLSBNEW1 (env->new_pred_value[1] & 1) #endif #ifdef QEMU_GENERATE |