This is the mail archive of the 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]

Re: [PATCH] Introduce abi_word_mode

On 09/10/2006, at 3:34 PM, Ulrich Weigand wrote:

(I apologize for duplicate messages, I used a broken mailer ...)
Ian Lance Taylor <> wrote on 10/09/2006 10:31:02 PM:

The use in unwind-generic.h most likely does have to be the size of a
register.  The requirement for ABI compliance in this case when the
size of a register changes has already led to the introduction of the
undocumented target hook TARGET_EH_RETURN_FILTER_MODE, which would be
subsumed by Andreas's proposed patch.

Yes, except that TARGET_EH_RETURN_FILTER_MODE only takes are of one side of the ABI interface -- it allows to compile the application in 64-bit mode, but it doesn't allow to compile libgcc in 64-bit mode.

Anyway, that's actually a good example, since the use of mode (word)
in the unwind code reflects the *size* of a general purpose register
for unwind purposes, i.e. what's the size of a saved register on the
stack, in the DWARF-2 structures etc.

Except that you then have to explain what a "general purpose register" is, and you're constrained in that explanation by the need for all such registers to have the same size.

If you actually look at the way the unwind code uses the word size, you see that it needs to have these properties:

- it must be at least as large as a pointer
- it must be at least as large as the size of any register which may be used as in an index
- it must be at least as large as the size of any register used in a DWARF expression
- it must be at least as large as the size of any register computed by a DWARF expression

It turns out that this is a property of the ABI---the first two amount to the size of a pointer, the second two amount to the largest call-saved integer register size---but it really has nothing to do with the machine's 'true' word size.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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