This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


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

Re: [Bug] subword handling for DI modes


Ben Elliston writes:
 >    While I don't have a fix for this problem, let me make the observation
 >    that the interpretation of the subword number (the last argument) is
 >    pretty iffy.  Some cgen code interprets it an endian-dependent manner
 >    (as in "0th subword as laid out in memory"), and some other code in
 >    endian-independent (as in "0th among least->most significant
 >    subwords").
 > 
 > I think the manual describes this predicament.

It does.
IIRC (but I wouldn't bet the farm on it) the rules follow gcc's SUBREG.

 >    I think the endinan-independent interpretation is more useful, but to
 >    switch over to it would require a fair bit of testing.  Still, it's
 >    important to fix this one way or the other.
 > 
 > I agree -- my preferred usage is for (subword <mode> 0) to give me bits 0 to
 > sizeof(mode) - 1.  I hope it can be fixed soon.

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