This is the mail archive of the
mailing list for the GCC project.
Re: "cc" clobber
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: dw at LimeGreenSocks dot com (David Wohlferd)
- Cc: bernds_cb1 at t-online dot de (Bernd Schmidt), gcc at gcc dot gnu dot org (gcc at gcc dot gnu dot org)
- Date: Mon, 1 Feb 2016 15:58:56 +0100 (CET)
- Subject: Re: "cc" clobber
- Authentication-results: sourceware.org; auth=none
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