aboutsummaryrefslogtreecommitdiff
path: root/target/hexagon/macros.h
diff options
context:
space:
mode:
authorNiccolò Izzo <nizzo@rev.ng>2022-09-23 19:38:25 +0200
committerTaylor Simpson <tsimpson@quicinc.com>2022-12-16 11:36:41 -0800
commit42659e046fb74a9cdbf2663a5d990df2507bccfa (patch)
treec487443d5159e9f884bfa8d7d08122d8d8df9beb /target/hexagon/macros.h
parent7e8b3b395fc39218d5a0b5122167d9249f4658f9 (diff)
target/hexagon: introduce new helper functions
These helpers will be employed by the idef-parser generated code, to correctly implement instruction semantics. "Helper" functions, in the context of this patch, refers to functions which provide a manual TCG implementation of certain features. Signed-off-by: Alessandro Di Federico <ale@rev.ng> Signed-off-by: Niccolò Izzo <nizzo@rev.ng> Signed-off-by: Anton Johansson <anjo@rev.ng> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Taylor Simpson <tsimpson@quicinc.com> Message-Id: <20220923173831.227551-6-anjo@rev.ng>
Diffstat (limited to 'target/hexagon/macros.h')
-rw-r--r--target/hexagon/macros.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h
index 1a31542010..cd64bb8eec 100644
--- a/target/hexagon/macros.h
+++ b/target/hexagon/macros.h
@@ -197,7 +197,16 @@
#define MEM_STORE8(VA, DATA, SLOT) log_store64(env, VA, DATA, 8, SLOT)
#endif
+#ifdef QEMU_GENERATE
+static inline void gen_cancel(uint32_t slot)
+{
+ tcg_gen_ori_tl(hex_slot_cancelled, hex_slot_cancelled, 1 << slot);
+}
+
+#define CANCEL gen_cancel(slot);
+#else
#define CANCEL cancel_slot(env, slot)
+#endif
#define LOAD_CANCEL(EA) do { CANCEL; } while (0)