diff mbox

[02/14] tcg: define and set call_type only when it is used

Message ID 8287d0f18e0022efaae2180a66fb2790c3aacd48.1307014902.git.quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela June 2, 2011, 11:53 a.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tcg/tcg.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/tcg/tcg.c b/tcg/tcg.c
index fad92f9..2d180a5 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -585,9 +585,6 @@  void tcg_register_helper(void *func, const char *name)
 void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
                    int sizemask, TCGArg ret, int nargs, TCGArg *args)
 {
-#ifdef TCG_TARGET_I386
-    int call_type;
-#endif
     int i;
     int real_args;
     int nb_rets;
@@ -612,9 +609,6 @@  void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,

     *gen_opc_ptr++ = INDEX_op_call;
     nparam = gen_opparam_ptr++;
-#ifdef TCG_TARGET_I386
-    call_type = (flags & TCG_CALL_TYPE_MASK);
-#endif
     if (ret != TCG_CALL_DUMMY_ARG) {
 #if TCG_TARGET_REG_BITS < 64
         if (sizemask & 1) {
@@ -641,6 +635,9 @@  void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
         int is_64bit = sizemask & (1 << (i+1)*2);
         if (is_64bit) {
 #ifdef TCG_TARGET_I386
+            int call_type;
+
+            call_type = (flags & TCG_CALL_TYPE_MASK);
             /* REGPARM case: if the third parameter is 64 bit, it is
                allocated on the stack */
             if (i == 2 && call_type == TCG_CALL_TYPE_REGPARM) {