This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "cc" clobber

David Wohlferd wrote:
> On 1/26/2016 4:31 PM, Bernd Schmidt wrote:
> > On 01/27/2016 12:12 AM, David Wohlferd wrote:
> >> I started by just commenting out the code in ix86_md_asm_adjust that
> >> unconditionally clobbered the flags.  I figured this would allow the
> >> 'normal' "cc" handling to occur.  But apparently there is no 'normal'
> >> "cc" handling.
> >
> > I have a dim memory that there's a difference between the "cc" and 
> > "CC" spellings. You might want to check that.
> I checked, but my scan of the current code isn't turning up anything for 
> "CC" related to clobbers either.
> While presumably "cc" did something at one time, apparently now it's 
> just an unenforced comment (on extended asm).  Not a problem, just a bit 
> of a surprise.

I think on many targets a clobber "cc" works because the backend
actually defines a register named "cc" to correspond to the flags.
Therefore the normal handling of clobbering named hard registers
catches this case as well.

This doesn't work on i386 because there the flags register is called
"flags" in the back end.


  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]