machine_mode split = maybe_split_mode (mode);
if (split != VOIDmode)
{
- write_one_arg (s, NULL_TREE, i, split, false);
- write_one_arg (s, NULL_TREE, i + 1, split, false);
- return i + 1;
+ i = write_one_arg (s, NULL_TREE, i, split, false);
+ i = write_one_arg (s, NULL_TREE, i, split, false);
+ return i;
}
if (no_arg_types && !AGGREGATE_TYPE_P (type))
mode = arg_promotion (mode);
}
- if (i > 0)
+ if (i)
s << ", ";
s << ".param" << nvptx_ptx_type_from_mode (mode, false) << " %in_ar"
- << (i + 1) << (mode == QImode || mode == HImode ? "[1]" : "");
+ << i << (mode == QImode || mode == HImode ? "[1]" : "");
if (mode == BLKmode)
s << "[" << int_size_in_bytes (type) << "]";
- return i;
+ return i + 1;
}
/* Look for attributes in ATTRS that would indicate we must write a function
{
s << "(";
int i = 0;
- bool any_args = false;
+
if (return_in_mem)
{
- s << ".param.u" << GET_MODE_BITSIZE (Pmode) << " %in_ar1";
+ s << ".param.u" << GET_MODE_BITSIZE (Pmode) << " %in_ar0";
i++;
}
while (args != NULL_TREE)
machine_mode mode = TYPE_MODE (type);
if (mode != VOIDmode)
- {
- i = write_one_arg (s, type, i, mode,
- TYPE_ARG_TYPES (fntype) == 0);
- any_args = true;
- i++;
- }
+ i = write_one_arg (s, type, i, mode,
+ TYPE_ARG_TYPES (fntype) == 0);
args = TREE_CHAIN (args);
}
if (stdarg_p (fntype))
}
if (DECL_STATIC_CHAIN (decl))
{
- if (i > 0)
+ if (i)
s << ", ";
s << ".reg.u" << GET_MODE_BITSIZE (Pmode)
<< reg_names [STATIC_CHAIN_REGNUM];
}
- if (!any_args && is_main)
+ if (!i && is_main)
s << ".param.u32 %argc, .param.u" << GET_MODE_BITSIZE (Pmode)
<< " %argv";
s << ")";
if (return_in_mem)
{
- ++argno;
fprintf (file, "\t.reg.u%d %%ar%d;\n", GET_MODE_BITSIZE (Pmode), argno);
fprintf (file, "\tld.param.u%d %%ar%d, [%%in_ar%d];\n",
GET_MODE_BITSIZE (Pmode), argno, argno);
+ argno++;
}
/* Declare and initialize incoming arguments. */
mode = arg_promotion (mode);
while (count--)
{
- ++argno;
fprintf (file, "\t.reg%s %%ar%d;\n",
nvptx_ptx_type_from_mode (mode, false), argno);
fprintf (file, "\tld.param%s %%ar%d, [%%in_ar%d];\n",
nvptx_ptx_type_from_mode (mode, false), argno, argno);
+ argno++;
}
}
happen is complex modes and those are dealt with by
TARGET_SPLIT_COMPLEX_ARG. */
return gen_rtx_UNSPEC (mode,
- gen_rtvec (1, GEN_INT (1 + cum->count)),
+ gen_rtvec (1, GEN_INT (cum->count)),
UNSPEC_ARG_REG);
}
if (split != VOIDmode)
{
mode = split;
- count = 2;
+ count = 2;
}
for (int n = 0; n != count; n++)
fprintf (asm_out_file, ";\n");
argno++;
}
-
}
fprintf (asm_out_file, "\t\tcall ");