This is the mail archive of the gcc-patches@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] |
On 12/04/13 00:49, Bernd Edlinger wrote:
Presumably to satisfy the consecutive bitfields are a single memory location stuff from C++11. Thus the bitregion representation (C++11) must totally encompass the original COMPONENT_REF. I can certainly see how that holds immediately after the call to get_bit_range.Regarding the consistency of bitregion_start/end , they should either both be zero, or bitregion_start <= bitpos && bitpos+bitsize-1 <= bitregion_end
When we adjust the address, we're just accounting for the bit position (bitpos). ie, if bitpos was 16 and TO_RTX was (plus (reg) (32)). We change TO_RTX to (plus (reg) (48)). This is ultimately meant to simplify the resulting insns we generate by folding the bitpos adjustment into the address computation. In effect, this results in accessing a subobject rather than the full object. Presumably this is kosher for C++11's memory model (I really don't know).
*If* it is OK to access the subobject like this in C++11's memory model, then is is necessary for bitregion_{start,end} to encompass the original object, or should it be made consistent with the bitpos/bitsize? And that seems to me to be the fundamental question. What is really the purpose of the bitregion_{start,end} representation? If it must represent the C++ object, then ISTM we don't want to mess with it. If it doesn't, then why did we bother building this alternate representation to begin with?
Jeff
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |