aboutsummaryrefslogtreecommitdiff
path: root/tcg-runtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'tcg-runtime.c')
-rw-r--r--tcg-runtime.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tcg-runtime.c b/tcg-runtime.c
index 219cade429..abfc36498f 100644
--- a/tcg-runtime.c
+++ b/tcg-runtime.c
@@ -25,6 +25,30 @@
#include "tcg/tcg-runtime.h"
+/* 32-bit helpers */
+
+int32_t tcg_helper_div_i32(int32_t arg1, int32_t arg2)
+{
+ return arg1 / arg2;
+}
+
+int32_t tcg_helper_rem_i32(int32_t arg1, int32_t arg2)
+{
+ return arg1 % arg2;
+}
+
+uint32_t tcg_helper_divu_i32(uint32_t arg1, uint32_t arg2)
+{
+ return arg1 / arg2;
+}
+
+uint32_t tcg_helper_remu_i32(uint32_t arg1, uint32_t arg2)
+{
+ return arg1 % arg2;
+}
+
+/* 64-bit helpers */
+
int64_t tcg_helper_shl_i64(int64_t arg1, int64_t arg2)
{
return arg1 << arg2;