This is the mail archive of the gcc-patches@gcc.gnu.org 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: Ping: java: Align data in .rodata.jutf8.* sections.


On 04/30/2010 01:50 PM, Tom Tromey wrote:
"David" == David Daney<ddaney@caviumnetworks.com> writes:

David> So it has been a little while since I sent this patch: David> http://gcc.gnu.org/ml/java-patches/2009-q1/msg00044.html David> I still think it is a good idea, and would re-test it on the trunk.

I looked at this.  I don't know what it means to set DECL_USER_ALIGN
when there is no explicit alignment on the decl.  Is this ok?

There is no source decl. We generate these things as a side effect of compiling string constants.


My feeling is that gcj is acting in the role of a USER as our proxy when it is emitting things that are part of the runtime. The java language doesn't allow the programmer to specify alignments, but we as authors of the runtime do know how these data structures should be aligned. If we were emitting C instead of assembly, we would be emitting __attribute__ ((aligned (??))), so DECL_USER_ALIGN is appropiate.

That's my take on it.

(This isn't an area of gcc I know well.)

Also it is missing a space before the open paren.

Right, I will fix that one.




Assuming the generated tree is ok, it seems fine to me.


Tom

Thanks,


I will wait a few more days to see if there are other comments and if not re-test and commit it.

David Daney


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