Module Name:    src
Committed By:   ryo
Date:           Fri Nov 16 10:51:08 UTC 2018

Modified Files:
        src/lib/libc/arch/aarch64/gen: makecontext.c

Log Message:
fix type of argument for va_arg; don't round to 32bit.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/aarch64/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/aarch64/gen/makecontext.c
diff -u src/lib/libc/arch/aarch64/gen/makecontext.c:1.1 src/lib/libc/arch/aarch64/gen/makecontext.c:1.2
--- src/lib/libc/arch/aarch64/gen/makecontext.c:1.1	Sun Aug 10 05:47:36 2014
+++ src/lib/libc/arch/aarch64/gen/makecontext.c	Fri Nov 16 10:51:08 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: makecontext.c,v 1.1 2014/08/10 05:47:36 matt Exp $ */
+/* $NetBSD: makecontext.c,v 1.2 2018/11/16 10:51:08 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: makecontext.c,v 1.1 2014/08/10 05:47:36 matt Exp $");
+__RCSID("$NetBSD: makecontext.c,v 1.2 2018/11/16 10:51:08 ryo Exp $");
 #endif
 
 #include <stddef.h>
@@ -63,9 +63,9 @@ makecontext(ucontext_t *ucp, void (*func
 	va_list ap;
 	va_start(ap, argc);
 
-	/* Pass up to four arguments in r0-3. */
+	/* Pass up to eight arguments in x0-x7. */
 	for (int i = 0; i < argc && i < 8; i++) {
-		gr[_REG_X0 + i] = va_arg(ap, int);
+		gr[_REG_X0 + i] = va_arg(ap, __greg_t);
 	}
 
 	/* Pass any additional arguments on the stack. */

Reply via email to