Date: Wed, 05 Dec 2001 15:54:06 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Bruce Evans <bde@zeta.org.au> Cc: current@FreeBSD.ORG Subject: Re: Patch Review: i386 asm cleanups in the kernel Message-ID: <XFMail.011205155406.jhb@FreeBSD.org> In-Reply-To: <20011206095911.R13351-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 05-Dec-01 Bruce Evans wrote: >> - 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. Hmm, so how does one clobber "eflags" if "cc" isn't "eflags"? Look at PR gnu/32365 which seems to indicate that "cc" does, in fact, represent "eflags" in the clobber list. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.011205155406.jhb>