makecontext: correct the type to setup register based arguments.
Use __greg_t rather than int for register based arguments. This fixes various atf tests.
This commit is contained in:
parent
b06455d348
commit
be2d38de58
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: makecontext.c,v 1.2 2023/05/07 12:41:47 skrll Exp $ */
|
||||
/* $NetBSD: makecontext.c,v 1.3 2024/05/04 12:43:36 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: makecontext.c,v 1.2 2023/05/07 12:41:47 skrll Exp $");
|
||||
__RCSID("$NetBSD: makecontext.c,v 1.3 2024/05/04 12:43:36 skrll Exp $");
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
|
@ -75,7 +75,7 @@ makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
|
|||
va_start(ap, argc);
|
||||
/* Up to the first eight arguments are passed in a0(x10)-a7(x17) */
|
||||
for (i = 0; i < argc && i < 8; i++)
|
||||
gr[_REG_A0 + i] = va_arg(ap, int);
|
||||
gr[_REG_A0 + i] = va_arg(ap, __greg_t);
|
||||
/* Pass remaining arguments on the stack above the backchain/lr gap. */
|
||||
for (sp += 0; i < argc; i++)
|
||||
*sp++ = va_arg(ap, long);
|
||||
|
|
Loading…
Reference in New Issue