This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Feature request: ability to describe x86 register halves as contraints.
- To: Bill Currie <bcurrie at tssc dot co dot nz>
- Subject: Re: Feature request: ability to describe x86 register halves as contraints.
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 30 Jun 1998 16:21:11 -0600
- cc: ak at muc dot de, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <359962C1.6A80@tssc.co.nz>you write:
> Jeffrey A Law wrote:
> > First there'd have to be a way to describe hi/lo halves of registers
> > in RTL. I'm not aware of any such mechanism.
>
> Couldn't (subreg:QI (reg:HI 0) 1) or (subreg:QI (reg:SI 0) 1) be used to
> represent AH? Trouble is, someone will have to teach egcs to use such
> constructs (I'm not well versed on the operation of trees yet,
> especially tree->rtl conversion)
Nope -- the constant at the end refers to a word sized object -- on
the x86 words are 32bits.
SUBREGs already have a well defined meaning. I don't suggest overloading
another meaning on them.
> Also, how difficult would it be to add eiter a new machine mode or a new
> flag/interpretation of existing flags to represent halves of registers?
It's not a question of modes or flags, but of how to represent to the
compiler via the RTL how to access parts of a register.
jeff