From nobody Fri Jul 07 16:56:20 2023 X-Original-To: dev-commits-src-all@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 4QyKKw2sFtz4m4Dx; Fri, 7 Jul 2023 16:56:20 +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 4QyKKw2FTHz4SSb; Fri, 7 Jul 2023 16:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748980; 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=S4UdtKMexkebzplj/nhp7Ac0du4ZlSYHPuQpQMYF9xM=; b=hooR7dxinvi+Fo/GlIMbiAnvq44IC/u7pR8CpMT3/Woz84Dm1445IV/iJXoQwcNdHYUui1 XtQLiQI/Ce5iaFaEv7mCYaxJvOzn/gXtU9GOdrm4oZwvaqKJXDtk2jmVImk9mb4rqUihf7 7ByaP55BVfp7prG1uvJwkOFsP7jlFOyPPYhMUCo/mftjONS9VD92IGojLYKdD6+m3XclRA 2Fzp77/Wuehtc3nlKrGdIakXiq2YpUQEu6cUVxjb3JRJKTpDLK9D7fibRBxGxoIr/gAVpx x4wSQtOx94CrMryFGFol4c/yr3TsP0TuN9Xmf0G38e+gEIDiWdXWjllhz0d+uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688748980; 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=S4UdtKMexkebzplj/nhp7Ac0du4ZlSYHPuQpQMYF9xM=; b=jTHeT60pSEN2oeexHzB6eASLudY3Ch8MRWBCTzounFl5I8UpLEOKe8uoFiKkzy7Qq8xBnG bdg9WYShAy3DwLOkv2exb7MPGzPuJQdEkda9bq2gjTL5/7+zLo6yX+u4W1MmhWsd7n1B7H AgHjtiQtDrR65+ljZaN+1h6Cdpbrrlc3nGVG+K9hz0W9Pmu74g1jKXHxVEkciHYJxmY2NZ +CtA993WLWnXkDKiTab03nZAEWVzzxl5qN3PLQB2iSIdcZ53XDei63I5HmJlMUynT9fTt1 mWggSXASue+b29UXPzYugEq+OfPnrU7cAGvSHAPQis23BGRIrB5X/UNSC6QM3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688748980; a=rsa-sha256; cv=none; b=N9BBg/XfEQWjEHC0UqBmAC3h3pux5I3+yiILuZVxiVGg31S3YXs9boqXvcOyhRvj0BjNoT bwR9usD9UsThtR8mbHwcIGKZ20S4yJoH8QYpZFFkI+0KTqb/KjICoWKqALb68FE/vOl+Ps nRmIzbiGmZLExkBz41DWUalXQME8SfNUNiJUOe0qNB1aeFEfcltScjnvK+xryGCzr65iW+ vLIscUVwfX5h2Y6zLzDxGLj8QIaQypAI04zoP14SDGvnbfzYeiwrB7jNT5PXAcdptEjYix LgtTNqlD6zP0h1Ns/vp6bNTWioLzGBw4MzGU53hnDFhUAefjN6YCJgmK+3wIvA== 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 4QyKKw1JwyzmhW; Fri, 7 Jul 2023 16:56:20 +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 367GuKTk013836; Fri, 7 Jul 2023 16:56:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367GuKfr013835; Fri, 7 Jul 2023 16:56:20 GMT (envelope-from git) Date: Fri, 7 Jul 2023 16:56:20 GMT Message-Id: <202307071656.367GuKfr013835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 5645dfb41ae0 - main - rtld: Sligtly optimizing .rtld_start on aarch64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5645dfb41ae0d5ca0acdee8a2a6646787b33e03f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5645dfb41ae0d5ca0acdee8a2a6646787b33e03f commit 5645dfb41ae0d5ca0acdee8a2a6646787b33e03f Author: Dmitry Chagin AuthorDate: 2023-07-07 16:55:08 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-07 16:55:08 +0000 rtld: Sligtly optimizing .rtld_start on aarch64 Use the LDP (load pair registers) instruction to load entry point arguments from the stack. Reviewed by: Differential Revision: https://reviews.freebsd.org/D40843 --- libexec/rtld-elf/aarch64/rtld_start.S | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libexec/rtld-elf/aarch64/rtld_start.S b/libexec/rtld-elf/aarch64/rtld_start.S index 196559d9d2bc..4f0bef0233b0 100644 --- a/libexec/rtld-elf/aarch64/rtld_start.S +++ b/libexec/rtld-elf/aarch64/rtld_start.S @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); ENTRY(.rtld_start) mov x19, x0 /* Put ps_strings in a callee-saved register */ - mov x20, sp /* And the stack pointer */ sub sp, sp, #16 /* Make room for obj_main & exit proc */ @@ -40,11 +39,9 @@ ENTRY(.rtld_start) add x2, x1, #8 /* obj_main */ bl _rtld /* Call the loader */ mov x8, x0 /* Backup the entry point */ + ldp x2, x1, [sp], #16 /* Load cleanup, obj_main */ - ldr x2, [sp] /* Load cleanup */ - ldr x1, [sp, #8] /* Load obj_main */ mov x0, x19 /* Restore ps_strings */ - mov sp, x20 /* Restore the stack pointer */ br x8 /* Jump to the entry point */ END(.rtld_start)