[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 01/13] Hexagon (target/hexagon) Add overrides for jumpr31 inst
From: |
Taylor Simpson |
Subject: |
[PATCH v4 01/13] Hexagon (target/hexagon) Add overrides for jumpr31 instructions |
Date: |
Tue, 24 Jan 2023 18:42:03 -0800 |
Add overrides for
SL2_jumpr31 Unconditional
SL2_jumpr31_t Predicated true (old value)
SL2_jumpr31_f Predicated false (old value)
SL2_jumpr31_tnew Predicated true (new value)
SL2_jumpr31_fnew Predicated false (new value)
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
---
target/hexagon/gen_tcg.h | 15 ++++++++++++++-
target/hexagon/genptr.c | 10 +++++++++-
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/target/hexagon/gen_tcg.h b/target/hexagon/gen_tcg.h
index 19697b42a5..d644e59a63 100644
--- a/target/hexagon/gen_tcg.h
+++ b/target/hexagon/gen_tcg.h
@@ -1,5 +1,5 @@
/*
- * Copyright(c) 2019-2022 Qualcomm Innovation Center, Inc. All Rights
Reserved.
+ * Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights
Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1015,6 +1015,19 @@
#define fGEN_TCG_S2_asl_r_r_sat(SHORTCODE) \
gen_asl_r_r_sat(RdV, RsV, RtV)
+#define fGEN_TCG_SL2_jumpr31(SHORTCODE) \
+ gen_jumpr(ctx, hex_gpr[HEX_REG_LR])
+
+#define fGEN_TCG_SL2_jumpr31_t(SHORTCODE) \
+ gen_cond_jumpr31(ctx, TCG_COND_EQ, hex_pred[0])
+#define fGEN_TCG_SL2_jumpr31_f(SHORTCODE) \
+ gen_cond_jumpr31(ctx, TCG_COND_NE, hex_pred[0])
+
+#define fGEN_TCG_SL2_jumpr31_tnew(SHORTCODE) \
+ gen_cond_jumpr31(ctx, TCG_COND_EQ, hex_new_pred_value[0])
+#define fGEN_TCG_SL2_jumpr31_fnew(SHORTCODE) \
+ gen_cond_jumpr31(ctx, TCG_COND_NE, hex_new_pred_value[0])
+
/* Floating point */
#define fGEN_TCG_F2_conv_sf2df(SHORTCODE) \
gen_helper_conv_sf2df(RddV, cpu_env, RsV)
diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c
index 90db99024f..23fb808e37 100644
--- a/target/hexagon/genptr.c
+++ b/target/hexagon/genptr.c
@@ -1,5 +1,5 @@
/*
- * Copyright(c) 2019-2022 Qualcomm Innovation Center, Inc. All Rights
Reserved.
+ * Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights
Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -593,6 +593,14 @@ static void gen_cond_jumpr(DisasContext *ctx, TCGv dst_pc,
gen_write_new_pc_addr(ctx, dst_pc, cond, pred);
}
+static void gen_cond_jumpr31(DisasContext *ctx, TCGCond cond, TCGv pred)
+{
+ TCGv LSB = tcg_temp_new();
+ tcg_gen_andi_tl(LSB, pred, 1);
+ gen_cond_jumpr(ctx, hex_gpr[HEX_REG_LR], cond, LSB);
+ tcg_temp_free(LSB);
+}
+
static void gen_cond_jump(DisasContext *ctx, TCGCond cond, TCGv pred,
int pc_off)
{
--
2.17.1
- [PATCH v4 10/13] Hexagon (target/hexagon) Change subtract from zero to change sign, (continued)
- [PATCH v4 10/13] Hexagon (target/hexagon) Change subtract from zero to change sign, Taylor Simpson, 2023/01/24
- [PATCH v4 13/13] Hexagon (target/hexagon) Improve code gen for predicated HVX instructions, Taylor Simpson, 2023/01/24
- [PATCH v4 09/13] Hexagon (tests/tcg/hexagon) Enable HVX tests, Taylor Simpson, 2023/01/24
- [PATCH v4 02/13] Hexagon (target/hexagon) Add overrides for callr, Taylor Simpson, 2023/01/24
- [PATCH v4 05/13] Hexagon (target/hexagon) Analyze packet before generating TCG, Taylor Simpson, 2023/01/24
- [PATCH v4 12/13] Hexagon (target/hexagon) Reduce manipulation of slot_cancelled, Taylor Simpson, 2023/01/24
- [PATCH v4 06/13] Hexagon (target/hexagon) Analyze packet for HVX, Taylor Simpson, 2023/01/24
- [PATCH v4 08/13] Hexagon (tests/tcg/hexagon) Remove __builtin from scatter_gather, Taylor Simpson, 2023/01/24
- [PATCH v4 11/13] Hexagon (target/hexagon) Remove gen_log_predicated_reg_write[_pair], Taylor Simpson, 2023/01/24
- [PATCH v4 04/13] Hexagon (target/hexagon) Add overrides for dealloc-return instructions, Taylor Simpson, 2023/01/24
- [PATCH v4 01/13] Hexagon (target/hexagon) Add overrides for jumpr31 instructions,
Taylor Simpson <=