summaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-04-08 08:39:43 -0700
committerRichard Henderson <rth@twiddle.net>2014-05-28 09:33:55 -0700
commitbbb8a1b45574d4e9d06d5753090ccadef2347e38 (patch)
tree2be3bd8abbe573ea2effbff9b0428eeae30ed9c2 /tcg
parentafb49896fa4422011b5199ea92f5749039046f27 (diff)
downloadqemu-bbb8a1b45574d4e9d06d5753090ccadef2347e38.zip
tcg: Remove sizemask and flags arguments to tcg_gen_callN
Take them from the TCGHelperInfo struct instead. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg.c17
-rw-r--r--tcg/tcg.h4
2 files changed, 9 insertions, 12 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 004f4bf8a5..219c995272 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -691,18 +691,17 @@ int tcg_check_temp_count(void)
/* Note: we convert the 64 bit args to 32 bit and do some alignment
and endian swap. Maybe it would be better to do the alignment
and endian swap in tcg_reg_alloc_call(). */
-void tcg_gen_callN(TCGContext *s, void *func, unsigned int flags,
- int sizemask, TCGArg ret, int nargs, TCGArg *args)
+void tcg_gen_callN(TCGContext *s, void *func, TCGArg ret,
+ int nargs, TCGArg *args)
{
- int i;
- int real_args;
- int nb_rets;
+ int i, real_args, nb_rets;
+ unsigned sizemask, flags;
TCGArg *nparam;
TCGHelperInfo *info;
info = g_hash_table_lookup(s->helpers, (gpointer)func);
- assert(info != NULL);
- assert(info->sizemask == sizemask);
+ flags = info->flags;
+ sizemask = info->sizemask;
#if defined(__sparc__) && !defined(__arch64__) \
&& !defined(CONFIG_TCG_INTERPRETER)
@@ -788,9 +787,8 @@ void tcg_gen_callN(TCGContext *s, void *func, unsigned int flags,
}
real_args = 0;
for (i = 0; i < nargs; i++) {
-#if TCG_TARGET_REG_BITS < 64
int is_64bit = sizemask & (1 << (i+1)*2);
- if (is_64bit) {
+ if (TCG_TARGET_REG_BITS < 64 && is_64bit) {
#ifdef TCG_TARGET_CALL_ALIGN_ARGS
/* some targets want aligned 64 bit args */
if (real_args & 1) {
@@ -818,7 +816,6 @@ void tcg_gen_callN(TCGContext *s, void *func, unsigned int flags,
real_args += 2;
continue;
}
-#endif /* TCG_TARGET_REG_BITS < 64 */
*s->gen_opparam_ptr++ = args[i];
real_args++;
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 7e7d5910e8..2efa333166 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -723,8 +723,8 @@ void tcg_add_target_add_op_defs(const TCGTargetOpDef *tdefs);
#define tcg_temp_free_ptr(T) tcg_temp_free_i64(TCGV_PTR_TO_NAT(T))
#endif
-void tcg_gen_callN(TCGContext *s, void *func, unsigned int flags,
- int sizemask, TCGArg ret, int nargs, TCGArg *args);
+void tcg_gen_callN(TCGContext *s, void *func,
+ TCGArg ret, int nargs, TCGArg *args);
void tcg_gen_shifti_i64(TCGv_i64 ret, TCGv_i64 arg1,
int c, int right, int arith);