aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg-runtime.h
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2010-03-02 23:16:36 +0100
committerAurelien Jarno <aurelien@aurel32.net>2010-03-14 22:04:50 +0100
commit31d6655100cd54a8c081e04349661c0f08117e66 (patch)
treee78fc8236bb36ab7b8ecd305f67780c1e97b76a5 /tcg/tcg-runtime.h
parent7296abaccc98872e28cec50091dbf26d38e4f062 (diff)
downloadqemu-31d6655100cd54a8c081e04349661c0f08117e66.zip
qemu-31d6655100cd54a8c081e04349661c0f08117e66.tar.gz
qemu-31d6655100cd54a8c081e04349661c0f08117e66.tar.bz2
tcg: add div/rem 32-bit helpers
Some targets like ARM would benefit to use 32-bit helpers for div/rem/divu/remu. Create a #define for div2 so that targets can select between div, div2 and helper implementation. Use the helper version if none of the #define are present. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/tcg-runtime.h')
-rw-r--r--tcg/tcg-runtime.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tcg/tcg-runtime.h b/tcg/tcg-runtime.h
index e750cc1..5615b13 100644
--- a/tcg/tcg-runtime.h
+++ b/tcg/tcg-runtime.h
@@ -2,6 +2,11 @@
#define TCG_RUNTIME_H
/* tcg-runtime.c */
+int32_t tcg_helper_div_i32(int32_t arg1, int32_t arg2);
+int32_t tcg_helper_rem_i32(int32_t arg1, int32_t arg2);
+uint32_t tcg_helper_divu_i32(uint32_t arg1, uint32_t arg2);
+uint32_t tcg_helper_remu_i32(uint32_t arg1, uint32_t arg2);
+
int64_t tcg_helper_shl_i64(int64_t arg1, int64_t arg2);
int64_t tcg_helper_shr_i64(int64_t arg1, int64_t arg2);
int64_t tcg_helper_sar_i64(int64_t arg1, int64_t arg2);