[cfe-commits] r143596 - /cfe/trunk/lib/CodeGen/TargetInfo.cpp

Hatanaka, Akira ahatanaka at mips.com
Thu Nov 3 16:15:28 PDT 2011

Thanks for the information, that is a better solution.

From: Eli Friedman [eli.friedman at gmail.com]
Sent: Wednesday, November 02, 2011 6:27 PM
To: Hatanaka, Akira
Cc: cfe-commits at cs.uiuc.edu
Subject: Re: [cfe-commits] r143596 - /cfe/trunk/lib/CodeGen/TargetInfo.cpp

On Wed, Nov 2, 2011 at 6:09 PM, Hatanaka, Akira <ahatanaka at mips.com> wrote:
> Yes, that should be 40-bits.
> The structure with sub-doubleword fields was needed to handle packed structures whose size is not a multiple of 64. When I test it with the program below, a full double word load is used to load the last field of struct S4 instead of a byte load. Is this legal? It seems incorrect to me to load from a memory location outside the global g2.

Oh, I see... no, that's not legal (at least, not in the general case).
 x86-64 uses a trick to get around this for cases like "struct { char
x[13]; }": the last parameter has the type i40.


More information about the cfe-commits mailing list