On Wed, 5 Dec 2001, John Baldwin wrote:

> 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:
> > ...
> > 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"?

Neither seems to be in gcc/config/i386/i386.h.  I think "cc" is generic, so
using it in clobber lists is not wrong.

> Look at PR
> gnu/32365 which seems to indicate that "cc" does, in fact, represent "eflags"
> in the clobber list.

That gives a hint about where to look for the clobbering conventions.  From

! /* Set the cc_status for the results of an insn whose pattern is EXP.
!    On the 80386, we assume that only test and compare insns, as well
!    as SI, HI, & DI mode ADD, SUB, NEG, AND, IOR, XOR, BSF, ASHIFT,
!    ASHIFTRT, and LSHIFTRT instructions set the condition codes usefully.
!    Also, we assume that jumps, moves and sCOND don't affect the condition
!    codes.  All else clobbers the condition codes, by assumption.
!    We assume that ALL integer add, minus, etc. instructions effect the
!    condition codes.  This MUST be consistent with i386.md.
!    We don't record any float test or compare - the redundant test &
!    compare check in final.c does not handle stack-like regs correctly. */
! void
! notice_update_cc (exp)
!      rtx exp;

Application asms are apparently in the "All else" set.

The bug in the PR could probably be fixed without updating this function
by using leal instead of addl to adjust the stack.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to