From 31d6655100cd54a8c081e04349661c0f08117e66 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Tue, 2 Mar 2010 23:16:36 +0100 Subject: 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 --- tcg/tcg-runtime.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tcg/tcg-runtime.h') diff --git a/tcg/tcg-runtime.h b/tcg/tcg-runtime.h index e750cc1952..5615b133e0 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); -- cgit v1.2.1