tcp->u_arg[1] = mips_REG_A1;
tcp->u_arg[2] = mips_REG_A2;
tcp->u_arg[3] = mips_REG_A3;
- if (tcp->s_ent->nargs > 4) {
- if (umoven(tcp, mips_REG_SP + 4 * 4,
- (tcp->s_ent->nargs - 4) * sizeof(tcp->u_arg[0]),
- &tcp->u_arg[4]) < 0)
- return -1;
+ if (tcp->s_ent->nargs > 4
+ && umoven(tcp, mips_REG_SP + 4 * sizeof(tcp->u_arg[0]),
+ (tcp->s_ent->nargs - 4) * sizeof(tcp->u_arg[0]),
+ &tcp->u_arg[4]) < 0) {
+ /*
+ * Let's proceed with the first 4 arguments
+ * instead of reporting the failure.
+ */
+ memset(&tcp->u_arg[4], 0,
+ (tcp->s_ent->nargs - 4) * sizeof(tcp->u_arg[0]));
}
#else
# error unsupported mips abi