From nobody Mon Dec 18 22:29:01 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SvDy60MbHz54BkS; Mon, 18 Dec 2023 22:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SvDy55lGBz4cYM; Mon, 18 Dec 2023 22:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702938541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53zr5tLY87hCjtZuLLBd+FvUGIFPt2vTyy3cVpxYzII=; b=tM1muxhUUi/6O5ZNc8+mIq/rddbOXVIhUVNjxKMRYMClCe8rchkJWfuSzM1KPosCwfcGrG Tuj/QkrXRjnvEZUUtEsU7pzBAHuvBxFsxXpj44YjHfvi97tOmGkojBvi1EE7e+NA95QOO8 yX3NkkwP7TCR0Pj68Ax05VH9P6KI2/pk9wKcSbRU8GY4VuGKviu0HprGTsf7/fBPHMOTht psWDV8eC2RMdPMHIMYI3NFO6rmqrvBDntQ3DAoZbukTKEoCiRp49XIkfyqIr8S1pdYoBYT NmM+346vC+d+0Rx0vEqs9ZdpKdLO7faIGVCSCGZmZv4gtcf65IYaHrLO6BbILg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702938541; a=rsa-sha256; cv=none; b=LR2ymbHVL2tcY4eNc9kgtLQGbGurOCru1HV0//1GFx01nK0zo1ZkUIgTt0D8/JTUUlfP4j si838EJPLVVfkHXO8j7/rN4eandRsQqoNxou2Qqp1Skf3hJDyYQIL5RSLU5DWANJYmv0jx M++r3U4Khsl/pTxxcqi6mhSiiT9oDtosM4fB9+f+rzICRyRVAAougCaL6Yjrri8tPk/DV+ x7itw+oh0xiFslKHqEbYUsvrG+p/a5xdmVN58uodP970wQiP6MYItFTpOcaZvfFApVr7q7 H4UDG5rL5Ue944RJoo4PqRE+pnOAxqeS1Z00aut/2ZSHteeUQjqPKAP12WpVPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702938541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53zr5tLY87hCjtZuLLBd+FvUGIFPt2vTyy3cVpxYzII=; b=XDUl2Rk+3L22ZpB5MFAdO87S/LKHlBKBS+GIrbia2G1LU4kOO2j7dW7ScMmUvBGaytdVJ+ KkRSXvDNgqWJ4OIEwD/3hyu0ANb5lk/ekvzEhOrrvbYXzbIrH5MNOdlSi9Sn1xLn75GTgU Tu3bh/j5PrMY4d3Oqu4OgWD/qSIsuVxrtsP/3Jk6jYsjH0HdmMk+pu6eCE9YAbwr/teAC7 x6aMvibaxWOEU72sWUSUJr8ME3FC+DFrdz0F9Q2e4SBtZsgJnOrJDA1DWhWDesJgt8bxZs RLNwBz85XVZKOVgJUSPoFoC6cCnYLfbMFvCAeZSPvdKydaeH6DV4b5c2gSv3pA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SvDy536nRzfG3; Mon, 18 Dec 2023 22:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BIMT1YS007987; Mon, 18 Dec 2023 22:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BIMT1Ga007984; Mon, 18 Dec 2023 22:29:01 GMT (envelope-from git) Date: Mon, 18 Dec 2023 22:29:01 GMT Message-Id: <202312182229.3BIMT1Ga007984@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8a1b84f861e8 - main - arm/SYS.h: align with other arches List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a1b84f861e869a76b1902692dbb93c2a54081d5 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8a1b84f861e869a76b1902692dbb93c2a54081d5 commit 8a1b84f861e869a76b1902692dbb93c2a54081d5 Author: Brooks Davis AuthorDate: 2023-12-18 22:28:42 +0000 Commit: Brooks Davis CommitDate: 2023-12-18 22:28:42 +0000 arm/SYS.h: align with other arches Rename SYSTRAP() macro to _SYSCALL() and add _SYSCALL_BODY() which invokes the syscall via _SYCALL() and then calls cerror as required. Use to implement PSEUDO() and RSYSCALL() removing _SYSCALL_NOERROR(). Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43061 --- lib/libc/arm/SYS.h | 30 ++++++++++++------------------ lib/libc/arm/sys/vfork.S | 2 +- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/lib/libc/arm/SYS.h b/lib/libc/arm/SYS.h index a1150ed03dc6..c3bc78704a16 100644 --- a/lib/libc/arm/SYS.h +++ b/lib/libc/arm/SYS.h @@ -37,7 +37,7 @@ #include #include -#define SYSTRAP(x) \ +#define _SYSCALL(x) \ mov ip, r7; \ ldr r7, =SYS_ ## x; \ swi 0; \ @@ -45,30 +45,24 @@ #define CERROR _C_LABEL(cerror) -#define _SYSCALL_NOERROR(x) \ - ENTRY(__CONCAT(__sys_, x)); \ - .weak _C_LABEL(x); \ - .set _C_LABEL(x), _C_LABEL(__CONCAT(__sys_,x)); \ - .weak _C_LABEL(__CONCAT(_,x)); \ - .set _C_LABEL(__CONCAT(_,x)),_C_LABEL(__CONCAT(__sys_,x)); \ - SYSTRAP(x) - -#define _SYSCALL(x) \ - _SYSCALL_NOERROR(x); \ +#define _SYSCALL_BODY(x) \ + _SYSCALL(x); \ it cs; \ - bcs PIC_SYM(CERROR, PLT) + bcs PIC_SYM(CERROR, PLT); \ + RET #define PSEUDO(x) \ ENTRY(__CONCAT(__sys_, x)); \ .weak _C_LABEL(__CONCAT(_,x)); \ .set _C_LABEL(__CONCAT(_,x)),_C_LABEL(__CONCAT(__sys_,x)); \ - SYSTRAP(x); \ - it cs; \ - bcs PIC_SYM(CERROR, PLT); \ - RET + _SYSCALL_BODY(x) #define RSYSCALL(x) \ - _SYSCALL(x); \ - RET + ENTRY(__CONCAT(__sys_, x)); \ + .weak _C_LABEL(x); \ + .set _C_LABEL(x), _C_LABEL(__CONCAT(__sys_,x)); \ + .weak _C_LABEL(__CONCAT(_,x)); \ + .set _C_LABEL(__CONCAT(_,x)),_C_LABEL(__CONCAT(__sys_,x)); \ + _SYSCALL_BODY(x); \ .globl CERROR diff --git a/lib/libc/arm/sys/vfork.S b/lib/libc/arm/sys/vfork.S index 5cc8afc8d953..2b92f56ad4e4 100644 --- a/lib/libc/arm/sys/vfork.S +++ b/lib/libc/arm/sys/vfork.S @@ -44,7 +44,7 @@ ENTRY(vfork) mov r2, r14 - SYSTRAP(vfork) + _SYSCALL(vfork) bcs PIC_SYM(CERROR, PLT) sub r1, r1, #1 /* r1 == 0xffffffff if parent, 0 if child */ and r0, r0, r1 /* r0 == 0 if child, else unchanged */