stmt.o3.s1 = 0;
maxparams = numparams + self->max_varargs;
for (i = numparams; i < maxparams; ++i) {
- if (i <= 8) {
+ if (i < 8) {
stmt.o1.u1 = OFS_PARM0 + 3*i;
stmt.o2.u1 = ir_value_code_addr(self->locals[i]);
code_push_statement(&stmt, self->context.line);
continue;
}
- ext = i - 9;
- if (ext >= vec_size(ir->extparams))
+ ext = i - 8;
+ while (ext >= vec_size(ir->extparams))
ir_gen_extparam(ir);
ep = ir->extparams[ext];
--- /dev/null
+void past8(float a, float b, float c, float d, ...count)
+{
+ float i;
+ print("out:");
+ for (i = 0; i < count; ++i)
+ print(" ", ftos(...(i, float)), "");
+ print("\n");
+}
+
+void main() {
+ past8(1, 2, 3, 4, 10, 20, 30, 40, 50, 60, 70, 80);
+}
--- /dev/null
+I: varargs2.qc
+D: non-builtin vararg support test 2
+T: -execute
+C: -std=fteqcc -fvariadic-args
+M: out: 10 20 30 40 50 60 70 80