[trunk] Addition to subreg section of rtl.text.

Kenneth Zadeck zadeck@naturalbridge.com
Sun Mar 16 17:04:00 GMT 2008


Jeff, DJ and Richard,

Richard Sandiford and I have taken on the task of trying to fully 
explain subregs in the gcc docs.   This is an area where that 
traditionally has been very confusing to outsiders and even insiders who 
were not rtl maintainers.   As the community of active developers has 
evolved, the complexity of this area is problematic to people new to the 
community. 

We have attached a draft of the new section, however, there are many 
issues that we still do not understand.   Could you please review the 
draft and take a few moments to answer the remaining questions?   Also, 
if there are other subtleties that we have missed, please feel free to 
point us in the proper direction.

Of course, we also invite anyone in the community with experience here 
to comment.  All help is appreciated.

1) Is it possible to have a MODE_PARTIAL_INT inner register that is 
bigger than a word? If so, what restrictions (if any) apply to subregs 
that access the partial word? Is the inner register implicitly extended 
so that it is a whole number of words? If not, are we effectively 
allowing non-contiguous byte ranges when WORDS_BIG_ENDIAN != 
BYTES_BIG_ENDIAN?

E.g., suppose we have a 16-bit WORDS_BIG_ENDIAN, !BYTES_BIG_ENDIAN 
target in which PSImode is a 24-bit value. Is the layout of 0x543210 
"45..0123"?

2) Is it possible for the outer register in a normal subreg to be a 
superword MODE_PARTIAL_INT? (Our rules say "no".)

3) What about things like 80-bit FP modes on a 32-bit or 64-bit target? 
Is it valid to refer to pieces of an 80-bit FP pseudo? If so, are the 
rules we've got here right?

4) Do stores to subregs of hardreg invalidate just the registers 
mentioned in the outer mode or do they invalidate the entire set of 
registers mentioned in the inner mode? (our rules say only the outer mode).

Thanks in advance,

Kenny
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: subregs.txt
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20080316/3e0ce6b8/attachment.txt>


More information about the Gcc mailing list