This is the mail archive of the gcc@gcc.gnu.org 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]

Re: Feature request: ability to describe x86 register halves as contraints.




  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


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