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]
Other format: [Raw text]

SUBREG_BYTE question


I need to know the exact meaning of the SUBREG_BYTE field of a SUBREG.

Suppose I have a big-endian target, an SImode (which is the word size)
register, and I want to use the part of the register in a narrower mode.
Should SUBREG_BYTE be zero, or should it be equal to the offset that
would be used if the value were in memory?

The problem I have is that I've got two testcases, and in one of these I
get (subreg:HI (reg:SI xyz) 0) for the lowpart, and in the other I get
(subreg:QI (reg:SI abc) 3).  Fixing one breaks the other.  Which one is
correct?


Bernd


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