Module Name: src
Committed By: skrll
Date: Sat May 4 12:43:36 UTC 2024
Modified Files:
src/lib/libc/arch/riscv/gen: makecontext.c
Log Message:
makecontext: correct the type to setup register based arguments.
Use __greg_t rather than int for register based arguments. This fixes
various atf tests.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/riscv/gen/makecontext.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/arch/riscv/gen/makecontext.c
diff -u src/lib/libc/arch/riscv/gen/makecontext.c:1.2 src/lib/libc/arch/riscv/gen/makecontext.c:1.3
--- src/lib/libc/arch/riscv/gen/makecontext.c:1.2 Sun May 7 12:41:47 2023
+++ src/lib/libc/arch/riscv/gen/makecontext.c Sat May 4 12:43:36 2024
@@ -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
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);