RE: [RFC] DW_OP_piece vs. DW_OP_bit_piece on a Register

Matthew Fortune <[email protected]>
Newsgroups gmane.comp.gdb.devel,gmane.comp.gcc.devel
Message-ID <[email protected]>
Andreas Arnez <[email protected]> writes:
> 6 Summary of Open Questions
> ===========================
> 
>   1. Out of the standard interpretations discussed under "options"
>      (section 4) above, which do we want to settle on?  Or is the
>      "preferred" interpretation missing from that list?
>   2. Should pieces fully or partially outside their underlying objects
>      be considered valid or invalid?  If valid, how should they be
>      aligned and padded?  In any case, what is the suggested treatment
>      by a DWARF consumer?

My dwarf knowledge is not brilliant but I have had to recently consider
it for MIPS floating point ABI changes aka FPXX and friends. I don't know
exactly where this fits in to your whole description but in case it has
a bearing on this we now have the following uses of DW_OP_piece:

1) double precision data split over two 32-bit FPRs
Uses a pair of 32-bit DW_OP_piece (ordered depending on endianness).

2) double precision data in one 64-bit FPR
No need for DW_OP_piece.

3) double precision data that may be in two 32-bit FPRs or may be in
   one 64-bit FPR depending on hardware mode
Uses a single 64-bit DW_OP_piece on the even numbered register. 

I'm guilty of not actually finishing this off and doing the GDB side but
the theory seemed OK when I did it! From your description this behaviour
best matches DW_OP_piece having ABI dependent behaviour which would make
it acceptable. These three variations can potentially exist in the same
program albeit that (1) and (3) can't appear in a single shared library
or executable. It's all a little strange but the whole floating point
MIPS o32 ABI is pretty complex now.

Matthew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.