From nobody Tue Jul 11 12:12:17 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 4R0frK4Qv9z2tn7S; Tue, 11 Jul 2023 12:12:17 +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 4R0frK411Wz3tpL; Tue, 11 Jul 2023 12:12:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689077537; 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=uYZ5REesjLwEGu23TfmY6iOXeQwK35mfR5+bAML8B5Q=; b=KQuKaFThIPkwtm0xdWi5Po96xFi+vx/X+qFxxe95h/PapzfbqlITvx88a/RFuD7ZtxIK1Y 2ZdOozTRvDjTelY3C3VbDTcgwefvpry1rBMCImdts7n+Ae3a84Yl9IkGbNuAomzspK0Q9Q aM+VMRAJrfxzs+57A5/GtzAy2qt2O4sUtGRRPSHdT83SR9TYgKQeVjrrOZ4dkUjPY8/5aS ZuV0ZV6PJviRMzwPWOGcpCgQ/mkcPe2tGSqCvXGd2OcT6vtgfIKfp3BVBAP4ceP7rdZq0l guoF1WKvj3YvieRpfVhATGnCTErG246LbqDOUCUgOm4UugMAhYRfG58xfKIP9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689077537; 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=uYZ5REesjLwEGu23TfmY6iOXeQwK35mfR5+bAML8B5Q=; b=EswhIXZbLlRp4iTv4kM001uZ9QltYINdQ+398OFP1zd0SYI7lD2sb4HNRlY9DSmej7AQc3 oAQ05xEQfWn8zdW/T7X87TDTD+IvOMWUU9LwlHeWldiUiihLcq6H6tuO/45EEmblg1/ktJ XJCTYsUu1IkV2AGZtMwTT+RQfauBDH2LKq+dR5MQms9Y7bu9j3kX61JqeNNoHehFm4+AUA saPwLyRzfzrJoRW7eTKUddPjXsZaReFRfx4KkWKn2XQaLjwF4+53iZkXyGAKGZf202PGsi NKzfh9KwFapFzpXg2w0c0K/ZS/bdjQGkjHsoPwYcBqfvShaMBRwD/dd23GJoPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689077537; a=rsa-sha256; cv=none; b=uRKlRBRf1jpCtD1zMFU5/Ka+CZPisV3zmAflpNjUcRFWNdVzjwvPiw/JE/zTeHaZc9dYPU mnXYJ25cWWc884JtNAtjN9HP1bzaOP79Te+6w63zmW5sTXWRI22s6Q4lzO3lqfZjYSu3qq aK9prALAJms8Sw/SHhSfxMWZExtXBFh2kFXsPvR0SqNWn4TfxzjpjoL+uT2iF/GEIWqVSv H69Ctz2NITKHgAyR5e5p4QgasT2OYhpPS/P4OEaOfZJMzRCgh1PCr08EB/cl+Zr6jrlq15 Z3r8MXUT5Cb1kBUFCvUpFovsocJR047Jjm1MKTQBf8LoZLK4QOOHhaKQQPkQ1g== 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 4R0frK355dzQsp; Tue, 11 Jul 2023 12:12:17 +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 36BCCHh7024267; Tue, 11 Jul 2023 12:12:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36BCCHgt024266; Tue, 11 Jul 2023 12:12:17 GMT (envelope-from git) Date: Tue, 11 Jul 2023 12:12:17 GMT Message-Id: <202307111212.36BCCHgt024266@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: 86c63225ea21 - main - rtld: Microoptimize rtld_start on i386 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: 86c63225ea21f2b4c0926bde9d9d4da1ec891b06 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=86c63225ea21f2b4c0926bde9d9d4da1ec891b06 commit 86c63225ea21f2b4c0926bde9d9d4da1ec891b06 Author: Dmitry Chagin AuthorDate: 2023-07-11 12:10:08 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-11 12:10:08 +0000 rtld: Microoptimize rtld_start on i386 Initial stack pointer is preserved in calle-saved %esi, use it bellow to pass initial stack pointer to _rtld(). Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40950 --- libexec/rtld-elf/i386/rtld_start.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libexec/rtld-elf/i386/rtld_start.S b/libexec/rtld-elf/i386/rtld_start.S index 87dca0e5b66b..6dbae220d89c 100644 --- a/libexec/rtld-elf/i386/rtld_start.S +++ b/libexec/rtld-elf/i386/rtld_start.S @@ -31,7 +31,6 @@ .type .rtld_start,@function .rtld_start: xorl %ebp,%ebp # Clear frame pointer for good form - movl %esp,%eax # Save initial stack pointer movl %esp,%esi # Save initial stack pointer andl $0xfffffff0,%esp # Align stack pointer subl $16,%esp # A place to store exit procedure addr @@ -41,7 +40,7 @@ subl $4,%esp # Keep stack aligned pushl %ecx # Pass address of obj_main pushl %ebx # Pass address of exit proc - pushl %eax # Pass initial stack pointer to rtld + pushl %esi # Pass initial stack pointer to rtld call _rtld # Call rtld(sp); returns entry point addl $16,%esp # Remove arguments from stack popl %edx # Get exit procedure address