From nobody Tue Jan 9 23:00:23 2024 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 4T8mc81GQ9z56jKg; Tue, 9 Jan 2024 23:00:24 +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 4T8mc76wsGz4LPQ; Tue, 9 Jan 2024 23:00:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704841224; 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=kWqJbMN8mDDyo8JJJesq6FRYZ5+sGMtQmq7tdde7ad0=; b=LemJOsozo1s8tkQsDyS4mojj4nfgbnYra6ya+VDBlcfBfE8rPmOXhFeHCuIXjRuQnBLuOo 2ZvAkxldGaIn1BKCmsy3ZfGL0J4R+lx899c+EwRkU4sv77LrxDdbwfRcX8US13KVmiENbW EkrK9Khltr9bupZENBkcs/0xMJj+TiONnD84mXaFFC++M1TDQHTX7NZIPGDWk5NCrboDNo ENYIMXCfky8W2NaBnvtiomkDQLnh6i7zbSwEYY/i7VKV76QV9afc4UU/z+PwadpagT+kUy IYK5qUW1VVXFnFni2TTKC6RUmq/QRG9i9DtAaFZdrN7Exd5VrC28OFUb8SE6dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704841224; 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=kWqJbMN8mDDyo8JJJesq6FRYZ5+sGMtQmq7tdde7ad0=; b=RlytJ8PkPLiV1JIBS5FIIoYCcO6TFOUhK6VohpPOEyu1FWj2YuD6omOXP3EZ+gS2y5mI4a VWxkHwIjtv0FSLTT416t5k6VGs/+2vOlbLVeVntFnKgTtB0FD2ATiH5hPoAe43ZRxIvtBs i0jwoE7NWyFUWuZe5mCLX5x1bLRwzZV/av+9YusBm+/T8gO35xPU4AROhrfbRJ8kVFk5kG /9NASxG6+MYfgTI7/vgyCJGa3kWIKHtV3Su/OM4abgb3TpIj8Pq4yzrJ8t/MKWEAasigG1 kCryX0OfOLK+3+s0Z6KPE9QFnEyrFR2Bkvathd1r2NO4OaAzG28qQNB6FDGtsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704841224; a=rsa-sha256; cv=none; b=og+S7gJOjR013GSSRjNTqA2IRSyPDcGj8hjq0txaKi6fjATbJ/keUNHXpUqNv5NfAHqmVT 5kIFRGZjLpPCDi4NRq+KEQfaXN90iLxvAiQEKb2IgfRwQ48a6WtbzHd+bj97Lkqu/8J1xn traHRmf/SJ1X7ShIsFY7v6G0j6vaznwZDwvyaeVLSzCeOBxBwJjRYRhwxse4oUZ9++a8vr qKH9I/oFffhABBybxFr9rxmKf46OD3leTaG2Tu8GTpq7tiDfiXcPHacs0wvI6N18d/7Jdg 2BxsxGEtKAFyqBUs2E/UlQSHSSPzlpeP67tLPWqzq4CbpN7cD0FKEo35vGdSoA== 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 4T8mc7606Sz18pQ; Tue, 9 Jan 2024 23:00:23 +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 409N0N0F095398; Tue, 9 Jan 2024 23:00:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409N0N7R095395; Tue, 9 Jan 2024 23:00:23 GMT (envelope-from git) Date: Tue, 9 Jan 2024 23:00:23 GMT Message-Id: <202401092300.409N0N7R095395@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: 13f345cdecd3 - main - powerpc64/SYS.h: implement _SYSCALL_BODY() macro 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: 13f345cdecd3e208b9226e3b1dcc39737ab2881b Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=13f345cdecd3e208b9226e3b1dcc39737ab2881b commit 13f345cdecd3e208b9226e3b1dcc39737ab2881b Author: Brooks Davis AuthorDate: 2024-01-09 19:37:42 +0000 Commit: Brooks Davis CommitDate: 2024-01-09 22:59:29 +0000 powerpc64/SYS.h: implement _SYSCALL_BODY() macro Add _SYSCALL_BODY() macro which invokes the syscall via _SYCALL() and calls cerror as required. Use to implement PSEUDO() and RSYSCALL(). Reviewed by: jhibbits Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43322 --- lib/libc/powerpc64/SYS.h | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/lib/libc/powerpc64/SYS.h b/lib/libc/powerpc64/SYS.h index dccd08b63541..bf8bc6cc0e27 100644 --- a/lib/libc/powerpc64/SYS.h +++ b/lib/libc/powerpc64/SYS.h @@ -40,11 +40,7 @@ li 0,(SYS_##name); \ sc -#define PSEUDO(name) \ - .text; \ - .align 2; \ -ENTRY(__sys_##name); \ - WEAK_REFERENCE(__sys_##name, _##name); \ +#define _SYSCALL_BODY(name) \ _SYSCALL(name); \ bnslr; \ mflr %r0; \ @@ -55,7 +51,14 @@ ENTRY(__sys_##name); \ addi %r1,%r1,48; \ ld %r0,16(%r1); \ mtlr %r0; \ - blr; \ + blr + +#define PSEUDO(name) \ + .text; \ + .align 2; \ +ENTRY(__sys_##name); \ + WEAK_REFERENCE(__sys_##name, _##name); \ + _SYSCALL_BODY(name); \ END(__sys_##name) #define RSYSCALL(name) \ @@ -64,16 +67,5 @@ END(__sys_##name) ENTRY(__sys_##name); \ WEAK_REFERENCE(__sys_##name, name); \ WEAK_REFERENCE(__sys_##name, _##name); \ - _SYSCALL(name); \ - bnslr; \ - \ - mflr %r0; \ - std %r0,16(%r1); \ - stdu %r1,-48(%r1); \ - bl CNAME(HIDENAME(cerror)); \ - nop; \ - addi %r1,%r1,48; \ - ld %r0,16(%r1); \ - mtlr %r0; \ - blr; \ + _SYSCALL_BODY(name); \ END(__sys_##name)