From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9104 Path: news.gmane.org!not-for-mail From: Mark Mossberg Newsgroups: gmane.linux.lib.musl.general Subject: Possible redundant `mov` in i386/x86_64 longjmp()? Date: Tue, 12 Jan 2016 17:49:03 -0500 Message-ID: <670761BD-D04A-4F3E-84F9-9AA6F66FB9FD@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1452643014 4839 80.91.229.3 (12 Jan 2016 23:56:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Jan 2016 23:56:54 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9117-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 13 00:56:54 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aJ8o2-0006ri-1q for gllmg-musl@m.gmane.org; Wed, 13 Jan 2016 00:56:54 +0100 Original-Received: (qmail 19460 invoked by uid 550); 12 Jan 2016 23:56:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 17941 invoked from network); 12 Jan 2016 22:49:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=svvAzgnQuGsnyUA8BOIE/H+n1nJsngVnLhH2h1VJ3jQ=; b=vI7ZQRcYS2qJ8YtnAYMss0YgQ3oRt9qsrlkjFlA4eBxxONQwePFOZsS0Dk8zk9JorP IER390T3CVDbxw1luoMzNFI1yK3oSsx1JMVavQJJjTvnw3n478kOiWtOBnEYU7ynlrvy WLVvbvDQlUDnLlQhZ2jdkd5wL6aktgb0wg/8HfEUCegypStoxEPkA2GoPTzAUU70V2bt mJNBEAMtdBi5vYHP63bNRi9rJpf/VEkPtjMq0gZrmx4U6z4azAvS64kkIqCiv1A47GF0 uq30e4YYnDjfsXaLjFNkAcWc3Th2dbNxlzPEUDokqRmzwnRSsk6D9P8GUlXbkHzaCYHD 2lvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:content-transfer-encoding :subject:message-id:date:to:mime-version; bh=svvAzgnQuGsnyUA8BOIE/H+n1nJsngVnLhH2h1VJ3jQ=; b=Vlac0vDx0JofUT5AKUcTALtX8yMh4ZScW/mGqavifBS4otTXCjNAJ04mdbFO5QD4+q izV2UcJkXQMuxyJU8+LJNbxazAJHVRobdNcv4fYlHdzf7SfCxeSV5g9DXNtf+M7ygbiF aUbVHPXf9LSnlUHotBS8mUvioHbDEIaXjSbW3RlCViSjs9tf8e59KZoOCDCjBXYzabLN 0D327Z6kKPqb31cqkifKi5mj7iFIpv8i73U/CUKiG/mvB5RBlGP/Z0k8FlxSy7sBg4Y1 6Th7wNYgcC+Uk68ud+jefaptBdLEAl17ljKAl6aPQvB/c4dgOgKzB9d7dfuBOzr6RfYW YZxw== X-Gm-Message-State: ALoCoQnJ7IWTrG/UrMvOXUzvJQjvq7m6J8Jj/exo+dq3ArPPX3lPJUx/UfKypsD5ApenGrMtCNzu70O5b2BnxGU9gi9UQCGjJQ== X-Received: by 10.50.150.5 with SMTP id ue5mr19093658igb.50.1452638946700; Tue, 12 Jan 2016 14:49:06 -0800 (PST) X-Mailer: Apple Mail (2.2104) Xref: news.gmane.org gmane.linux.lib.musl.general:9104 Archived-At: Hi all, I was recently perusing musl=E2=80=99s implementation of longjmp() for = i386 and I saw that esp was restored via: mov 16(%edx),%ecx mov %ecx,%esp To me, it seems like the intermediary mov to %ecx is unnecessary. Could = the code instead be the following? mov 16(%edx), %esp Thanks, Mark=