aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg-op.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-12-10 16:35:31 +0000
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-12-14 11:13:03 +0000
commit73f5e3132a18654caa9705e3e8c7688f615f8c7d (patch)
treed4b21d6aaa926d5aec99b66fbf35912e8ad3be8b /tcg/tcg-op.h
parente7d81004e486b0e80a674d164d8aec0e83fa812f (diff)
tcg: make tcg_const_ptr actually accept a pointer argument
Make tcg_const_ptr() include a cast so that you can pass it a pointer. This allows us to drop the casts we had in all the places that use this macro. Acked-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'tcg/tcg-op.h')
-rw-r--r--tcg/tcg-op.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
index 82e04e7f30..169d3b2b0d 100644
--- a/tcg/tcg-op.h
+++ b/tcg/tcg-op.h
@@ -389,7 +389,7 @@ static inline void tcg_gen_helperN(void *func, int flags, int sizemask,
TCGArg ret, int nargs, TCGArg *args)
{
TCGv_ptr fn;
- fn = tcg_const_ptr((tcg_target_long)func);
+ fn = tcg_const_ptr(func);
tcg_gen_callN(&tcg_ctx, fn, flags, sizemask, ret,
nargs, args);
tcg_temp_free_ptr(fn);
@@ -405,7 +405,7 @@ static inline void tcg_gen_helper32(void *func, int sizemask, TCGv_i32 ret,
{
TCGv_ptr fn;
TCGArg args[2];
- fn = tcg_const_ptr((tcg_target_long)func);
+ fn = tcg_const_ptr(func);
args[0] = GET_TCGV_I32(a);
args[1] = GET_TCGV_I32(b);
tcg_gen_callN(&tcg_ctx, fn, TCG_CALL_CONST | TCG_CALL_PURE, sizemask,
@@ -418,7 +418,7 @@ static inline void tcg_gen_helper64(void *func, int sizemask, TCGv_i64 ret,
{
TCGv_ptr fn;
TCGArg args[2];
- fn = tcg_const_ptr((tcg_target_long)func);
+ fn = tcg_const_ptr(func);
args[0] = GET_TCGV_I64(a);
args[1] = GET_TCGV_I64(b);
tcg_gen_callN(&tcg_ctx, fn, TCG_CALL_CONST | TCG_CALL_PURE, sizemask,