This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: inline asm clobbers
- From: Ian Lance Taylor <iant at google dot com>
- To: David Wohlferd <dw at limegreensocks dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 11 Mar 2015 18:19:12 -0700
- Subject: Re: inline asm clobbers
- Authentication-results: sourceware.org; auth=none
- References: <5500C898 dot 3000601 at LimeGreenSocks dot com> <CAKOQZ8yG4fPx8Ce3JiZMtW8MwXAMFk5W3_JAJ=b2WMQ4mXDDdA at mail dot gmail dot com> <5500E31C dot 4080707 at LimeGreenSocks dot com>
On Wed, Mar 11, 2015 at 5:51 PM, David Wohlferd <dw@limegreensocks.com> wrote:
>
> The reason I believe the order can change is this comment from i386.h:
>
> /* Order in which to allocate registers. Each register must be
> listed once, even those in FIXED_REGISTERS. List frame pointer
> late and fixed registers last. Note that, in general, we prefer
> registers listed in CALL_USED_REGISTERS, keeping the others
> available for storage of persistent values.
>
> The ADJUST_REG_ALLOC_ORDER actually overwrite the order,
> so this is just empty initializer for array. */
That is REG_ALLOC_ORDER. The index that appears in an asm statement
is the hard register number. REG_ALLOC_ORDER is an array holding hard
register numbers. The hard register numbers can change in principle,
by changing the source code, but I actually can't recall that ever
happening.
Ian