From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8595 Path: news.gmane.org!not-for-mail From: Alex Dowad Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH 2/3] When generating CFI for i386 asm, don't mistake an FDIV instruction for DIV Date: Fri, 2 Oct 2015 12:02:02 +0200 Message-ID: <1443780123-6493-2-git-send-email-alexinbeijing@gmail.com> References: <1443780123-6493-1-git-send-email-alexinbeijing@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1443780157 7667 80.91.229.3 (2 Oct 2015 10:02:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2015 10:02:37 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8608-gllmg-musl=m.gmane.org@lists.openwall.com Fri Oct 02 12:02:35 2015 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 1ZhxAg-0004gj-Fh for gllmg-musl@m.gmane.org; Fri, 02 Oct 2015 12:02:34 +0200 Original-Received: (qmail 30509 invoked by uid 550); 2 Oct 2015 10:02:32 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 30121 invoked from network); 2 Oct 2015 10:02:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=mEG8I802IBwGiIOZOAPe4r5lBAkXXx4YKbOaLA8rv18=; b=D60eKEf3T3/Ttfw2VVuEIt1x7j41jlkLrIsdTqv2cYjJpbLx+oxJ4WRmOzZrIxIhWa 3XqRuMPpotHGESkxKqsY0ONtwdFqFsA/EVZHZQ4QvRgBx3+fZqTh1xp/0sS3fYi07xih efDMGxmxbAz4Bm1iBUuncqk3QMU7DkxzX3hOMgUGYvkLT3HQ6NqWR3DT7f69k0T+RCky 1NkX8R9BTM7+wb18dMeZycXVtOkuHNPINfnmoPDtzGjm2/QYP//iH2mCXCEnXHIarWXW dCo+v4GCZFnKZQbBJWuINGx2RoRCkY41fJij4RGrLvVwtEhytyIyyJx30nac0tBcuLsQ 6smA== X-Received: by 10.194.22.69 with SMTP id b5mr14735315wjf.157.1443780130913; Fri, 02 Oct 2015 03:02:10 -0700 (PDT) X-Mailer: git-send-email 2.0.0.GIT In-Reply-To: <1443780123-6493-1-git-send-email-alexinbeijing@gmail.com> Xref: news.gmane.org gmane.linux.lib.musl.general:8595 Archived-At: ...that would cause the script to erroneously conclude that the values of EAX and EDX have been overwritten. Probably won't make a difference, but it's just as well to get it right... --- tools/add-cfi.i386.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/add-cfi.i386.awk b/tools/add-cfi.i386.awk index b8bdd7f..2da1899 100644 --- a/tools/add-cfi.i386.awk +++ b/tools/add-cfi.i386.awk @@ -190,7 +190,7 @@ function trashed(register) { } /i?mul [^,]*$/ { trashed("eax"); trashed("edx") } /i?mul %e(ax|bx|cx|dx|si|di|bp),/ { trashed(get_reg1()) } -/i?div/ { trashed("eax"); trashed("edx") } +/^i?div/ { trashed("eax"); trashed("edx") } /(dec|inc|not|neg|pop) %e(ax|bx|cx|dx|si|di|bp)/ { trashed(get_reg()) } /cpuid/ { trashed("eax"); trashed("ebx"); trashed("ecx"); trashed("edx") } -- 2.0.0.GIT