summaryrefslogtreecommitdiff
path: root/target-arm/helpers.h
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-03-31 03:45:50 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-03-31 03:45:50 +0000
commit1497c961af2b6d45bd2a1da5a351be54edcadca2 (patch)
tree0e8af8215053e2dc84138adae3db63bad77f2906 /target-arm/helpers.h
parent9a119ff6c1cba1fde88bf6275d6ba40c95d35dce (diff)
downloadqemu-1497c961af2b6d45bd2a1da5a351be54edcadca2.zip
ARM TCG conversion 4/16.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4141 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-arm/helpers.h')
-rw-r--r--target-arm/helpers.h37
1 files changed, 33 insertions, 4 deletions
diff --git a/target-arm/helpers.h b/target-arm/helpers.h
index 8f2e129162..3b9eca07e3 100644
--- a/target-arm/helpers.h
+++ b/target-arm/helpers.h
@@ -1,7 +1,36 @@
-#ifndef DEF_HELPER
#define DEF_HELPER(name, ret, args) ret helper_##name args;
+
+#ifdef GEN_HELPER
+#define DEF_HELPER_1_1(name, ret, args) \
+DEF_HELPER(name, ret, args) \
+static inline void gen_helper_##name(TCGv ret, TCGv arg1) \
+{ \
+ tcg_gen_helper_1_1(helper_##name, ret, arg1); \
+}
+#define DEF_HELPER_1_2(name, ret, args) \
+DEF_HELPER(name, ret, args) \
+static inline void gen_helper_##name(TCGv ret, TCGv arg1, TCGv arg2) \
+{ \
+ tcg_gen_helper_1_2(helper_##name, ret, arg1, arg2); \
+}
+#else /* !GEN_HELPER */
+#define DEF_HELPER_1_1 DEF_HELPER
+#define DEF_HELPER_1_2 DEF_HELPER
+#define HELPER(x) helper_##x
#endif
-DEF_HELPER(clz, uint32_t, (uint32_t))
-DEF_HELPER(sxtb16, uint32_t, (uint32_t))
-DEF_HELPER(uxtb16, uint32_t, (uint32_t))
+DEF_HELPER_1_1(clz, uint32_t, (uint32_t))
+DEF_HELPER_1_1(sxtb16, uint32_t, (uint32_t))
+DEF_HELPER_1_1(uxtb16, uint32_t, (uint32_t))
+
+DEF_HELPER_1_2(add_setq, uint32_t, (uint32_t, uint32_t))
+DEF_HELPER_1_2(add_saturate, uint32_t, (uint32_t, uint32_t))
+DEF_HELPER_1_2(sub_saturate, uint32_t, (uint32_t, uint32_t))
+DEF_HELPER_1_2(add_usaturate, uint32_t, (uint32_t, uint32_t))
+DEF_HELPER_1_2(sub_usaturate, uint32_t, (uint32_t, uint32_t))
+DEF_HELPER_1_1(double_saturate, uint32_t, (int32_t))
+
+#undef DEF_HELPER
+#undef DEF_HELPER_1_1
+#undef DEF_HELPER_1_2
+#undef GEN_HELPER