RFR(S): 8080684: PPC64: Fix little-endian build after "8077838: Recent developments for ppc"
asmundak at google.com
Wed May 20 01:25:58 UTC 2015
It fails to compile because the code still references FileDescriptor,
even if ABI_ELFv2 is defined.
The revised patch which succeeds is here:
(it's for jdk8u-dev branch)
but IMHO the proposed change isn't semantically right --
if a method is called emit_fd, it should create a FileDescriptor.
I am not sure that rationale behind this patch is right -- a
compile-time error is usually easy to fix and verify that the semantics
is correct while fixing it, whereas runtime error usually requires
On Tue, May 19, 2015 at 9:41 AM, Volker Simonis
<volker.simonis at gmail.com> wrote:
> can I please get a review for the following fix of the ppc64le build.
> @Sasha, Tiago: I would be also especially interested if somebody with
> a little-endian ppc64 system can check if the fix really works there
> as I have currently no access to such a system.
> Following the details:
> On big-endian ppc64 we need so called 'function descriptors' instead
> of simple pointers in order to call functions. That's why the
> Assembler class on ppc64 offers an 'emit_fd()' method which can be
> used to create such a function descriptor.
> On little-endian ppc64 the ABI was changed (i.e. ABI_ELFv2) and
> function descriptors have been removed. That's why the before
> mentioned 'emit_fd()' is being excluded from the build with the help
> of preprocessor macros if the HotSpot is being build in a little
> endian environment:
> #if !defined(ABI_ELFv2)
> inline address emit_fd(...)
> The drawback of this approach is that every call site which uses
> 'emit_fd()' has to conditionally handle the case where 'emit_fd()'
> isn't present as well. This was exactly the problem with change
> "8077838: Recent developments for ppc" which introduced an
> unconditional call to 'emit_fd()' in 'VM_Version::config_dscr() which
> lead to a build failure on little endian.
> A better approach would be to make 'emit_fd()' available on both,
> little- and big-endian platforms and handle the difference internally,
> within the function itself. On little-endian, the function will just
> return the current PC without emitting any code at all while the
> big-endian variant emits the required function descriptor.
> Thank you and best regards,
More information about the hotspot-dev