Skip to content

Commit

Permalink
Hexagon (target/hexagon) Add overrides for clr[tf]new
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
taylorsimpson committed May 18, 2023
1 parent 085b670 commit 5c4b11e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
16 changes: 16 additions & 0 deletions target/hexagon/gen_tcg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
4 changes: 0 additions & 4 deletions target/hexagon/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5c4b11e

Please sign in to comment.