[PATCH] D34618: [LLD] Add basic 64-bit SPARC support
Fedor Sergeev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 26 11:37:28 PDT 2017
fedor.sergeev added inline comments.
================
Comment at: lld/ELF/Arch/SPARCV9.cpp:44
+
+ PageSize = 8192;
+ DefaultMaxPageSize = 0x100000;
----------------
kettenis wrote:
> ruiu wrote:
> > Is SPARC always 8k page?
> Yes, for SPARV9 the minumum page size is 8k. Older (32-bit only) SPARV7 processor supported smaller page sizes. That hardware is now more than 20 years old and pretty much dead. OpenBSD doesn't support 32-bit SPARC anymore, so I didn't write any code for it. But if somebody else is interested in doing that, bits of the SPARCV9 code could be re-used.
Yep, 8K page size is minimum.
As for 32-bit SPARC - we on Solaris will be rather interested in getting V8 code later.
Thanks for doing V9! :)
================
Comment at: lld/ELF/SyntheticSections.cpp:1093
add({DT_PLTRELSZ, In<ELFT>::RelaPlt->getParent()->Size});
- add({Config->EMachine == EM_MIPS ? DT_MIPS_PLTGOT : DT_PLTGOT,
- InX::GotPlt});
+ switch (Config->EMachine) {
+ case EM_MIPS:
----------------
kettenis wrote:
> ruiu wrote:
> > nit: since there are only three choices, I'd do it with if ~ else if ~ else ~.
> I think the switch here is better. Future support for 32-bit SPARC would straightforward that way.
Agreed, please, keep the switch.
https://reviews.llvm.org/D34618
More information about the llvm-commits
mailing list