From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8599 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 3/3] Add script to add CFI directives to asm files in debug builds of x86_64 Date: Fri, 2 Oct 2015 06:19:21 -0400 Message-ID: <20151002101921.GS8645@brightrain.aerifal.cx> References: <1443780123-6493-1-git-send-email-alexinbeijing@gmail.com> <1443780123-6493-3-git-send-email-alexinbeijing@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1443781182 23870 80.91.229.3 (2 Oct 2015 10:19:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2015 10:19:42 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8611-gllmg-musl=m.gmane.org@lists.openwall.com Fri Oct 02 12:19:39 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 1ZhxRA-000592-1A for gllmg-musl@m.gmane.org; Fri, 02 Oct 2015 12:19:36 +0200 Original-Received: (qmail 11501 invoked by uid 550); 2 Oct 2015 10:19:34 -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 11481 invoked from network); 2 Oct 2015 10:19:33 -0000 Content-Disposition: inline In-Reply-To: <1443780123-6493-3-git-send-email-alexinbeijing@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8599 Archived-At: On Fri, Oct 02, 2015 at 12:02:03PM +0200, Alex Dowad wrote: > +# this does NOT exhaustively check for all possible instructions which could > +# overwrite a register value inherited from the caller (just the common ones) > +/mov.*,%r(ax|bx|cx|dx|si|di|bp|8|9|10|11|12|13|14|15)/ { trashed(get_reg2()) } > +/(add|addl|sub|subl|and|or|xor|lea|sal|sar|shl|shr) %r(ax|bx|cx|dx|si|di|bp|8|9|10|11|12|13|14|15),/ { > + trashed(get_reg1()) > +} This looks wrong but maybe it's already wrong in existing code. Why are you marking the first operand as trashed rather than the second? Rich