From owner-freebsd-current Wed Dec 5 15:21:29 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 57F3237B416; Wed, 5 Dec 2001 15:21:25 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id KAA13445; Thu, 6 Dec 2001 10:21:22 +1100 Date: Thu, 6 Dec 2001 10:21:48 +1100 (EST) From: Bruce Evans X-X-Sender: To: John Baldwin Cc: Subject: Re: Patch Review: i386 asm cleanups in the kernel In-Reply-To: Message-ID: <20011206095911.R13351-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 5 Dec 2001, John Baldwin wrote: Review of what I can see and quote easily. > The patch is at http://www.FreeBSD.org/~jhb/patches/i386_asm.patch. Mostly it > does the following: This URL appears to be well formed ;-). > - Add missing "cc" clobbers in constraints Does this have any effect (for i386's) except to create a lot of clutter Even i386.md doesn't use it. gcc.info says: ! If your assembler instruction can alter the condition code register, ! add `cc' to the list of clobbered registers. GNU CC on some machines ! represents the condition codes as a specific hardware register; `cc' ! serves to name this register. On other machines, the condition code is ! handled differently, and specifying `cc' has no effect. But it is ! valid no matter what the machine. ! ! ... ! Here we will concern ourselves with determining the effect of an ! insn on the condition code and will limit ourselves to the following ! possible effects: The condition code can be set unpredictably ! (clobbered), not be changed, be set to agree with the results of the ! operation, or only changed if the item previously set into the ! condition code has been modified. ! ! Here is part of a sample `md' file for such a machine: ! ! (define_attr "type" "load,store,arith,fp,branch" (const_string "arith")) ! ! (define_attr "cc" "clobber,unchanged,set,change0" None of i386.md, alpha.md or sparc.md do this. i386's and alphas have a cc0 register, but it is only mentioned for instructsions whose main (only?) effect is to to set the condition codes. > - Use the "+" modifier for output operands rather than using "0", "1", etc. > to list operands in both input and output sections. > - Fix the atomic operations to accept the contraints type on v so we can use > "iq" rather than "ir" for char operations (this last came from Peter Jeremy > and bde). OK. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message