From owner-svn-src-all@freebsd.org Sat Jan 27 00:39:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81A7CED3206; Sat, 27 Jan 2018 00:39:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31B656D6CF; Sat, 27 Jan 2018 00:39:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A2D422D97; Sat, 27 Jan 2018 00:39:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0R0doWd007284; Sat, 27 Jan 2018 00:39:50 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0R0dodu007283; Sat, 27 Jan 2018 00:39:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201801270039.w0R0dodu007283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 27 Jan 2018 00:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328457 - head/lib/libc/mips/gen X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/lib/libc/mips/gen X-SVN-Commit-Revision: 328457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jan 2018 00:39:50 -0000 Author: jhb Date: Sat Jan 27 00:39:49 2018 New Revision: 328457 URL: https://svnweb.freebsd.org/changeset/base/328457 Log: Clarify some comments in the MIPS makecontext(). - N32 and N64 do not have a $a0-3 gap. - Use 'sp += 4' to skip over the gap for O32 rather than '+= i'. It doesn't make a functional change, but makes the code match the comment. Sponsored by: DARPA / AFRL Modified: head/lib/libc/mips/gen/makecontext.c Modified: head/lib/libc/mips/gen/makecontext.c ============================================================================== --- head/lib/libc/mips/gen/makecontext.c Sat Jan 27 00:09:43 2018 (r328456) +++ head/lib/libc/mips/gen/makecontext.c Sat Jan 27 00:39:49 2018 (r328457) @@ -95,19 +95,18 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int for (i = 0; i < argc && i < 4; i++) /* LINTED register_t is safe */ mc->mc_regs[A0 + i] = va_arg(ap, register_t); - /* Pass remaining arguments on the stack above the $a0-3 gap. */ - sp += i; + /* Skip over the $a0-3 gap. */ + sp += 4; #endif #if defined(__mips_n32) || defined(__mips_n64) /* Up to the first 8 arguments are passed in $a0-7. */ for (i = 0; i < argc && i < 8; i++) /* LINTED register_t is safe */ mc->mc_regs[A0 + i] = va_arg(ap, register_t); - /* Pass remaining arguments on the stack above the $a0-3 gap. */ #endif - /* Pass remaining arguments on the stack above the $a0-3 gap. */ + /* Pass remaining arguments on the stack. */ for (; i < argc; i++) - /* LINTED uintptr_t is safe */ + /* LINTED register_t is safe */ *sp++ = va_arg(ap, register_t); va_end(ap); }