This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


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

Re: Alpha vs. new ABI


Jeff> Isn't that the reason gcj now enforces a minimum of ptr
Jeff> alignment on the data member of arrays?  I know Alex made that
Jeff> change for the new ABI, but I don't remember exactly why.

I didn't realize a change had been made here recently.  Alex, what
gives?

>> In the runtime we could implement this by putting
>> __attribute__((aligned (something))) on the `data' field.
>> `something' would be chosen to be maximal alignment for the platform.
>> Maybe just `8' would suffice for now.

Jeff> That'll waste 4 bytes on x86.

Interesting -- I didn't realize that doubles only had to be aligned on
a 4 byte boundary there.

Last time this came up people seemed indifferent to the space wasted
by forcing maximal alignment for every array.  Maybe another 4 bytes
doesn't matter.

Of course if it is easy I'd prefer to find a solution that does the
right thing on each platform.  I don't know if you can use
`__alignof__' inside an attribute though.

Jeff> Whatever the case, the alignment specified in array.h should
Jeff> _exactly_ match the behavior in the frontend.  Right now it
Jeff> doesn't.

Definitely.  And I think we need to fix this before gcc 3.0, since it
is the only thing keeping the alpha port from working.  Alex said
today that he'd look into it.

Tom

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