RFR(M): 8138952: C1: Distinguish between PPC32 and PPC64

Christian Thalinger christian.thalinger at oracle.com
Fri Nov 13 04:47:32 UTC 2015

I remember having looked at this before.


-#ifdef PPC
+#if defined(PPC)

-#endif // PPC

Please undo these changes.


     case lir_null_check:
       if (GenerateCompilerNullChecks) {
+#ifdef PPC64
+        if (!TrapBasedNullChecks) {
+          assert(op->in_opr()->is_single_cpu(), "expected");
+          explicit_null_check(op->in_opr()->as_register(), op->info());
+          break;
+        }

Do we really need the ifdef?  Shouldn’t the code work on other architectures too?  I see that TrapBasedNullChecks is false on all architectures except PPC:

src/closed/cpu/arm/vm/globals_arm.hpp:19:define_pd_global(bool,  TrapBasedNullChecks,      false); // Not needed
src/cpu/aarch64/vm/globals_aarch64.hpp:40:define_pd_global(bool, TrapBasedNullChecks,  false);
src/cpu/ppc/vm/globals_ppc.hpp:41:define_pd_global(bool, TrapBasedNullChecks,   true);
src/cpu/sparc/vm/globals_sparc.hpp:45:define_pd_global(bool, TrapBasedNullChecks,         false); // Not needed on sparc.
src/cpu/x86/vm/globals_x86.hpp:39:define_pd_global(bool, TrapBasedNullChecks,      false); // Not needed on x86.
src/cpu/zero/vm/globals_zero.hpp:40:define_pd_global(bool,  TrapBasedNullChecks,  false);

Shouldn’t all be true?

> On Nov 12, 2015, at 12:07 AM, Doerr, Martin <martin.doerr at sap.com> wrote:
> Hi,
> we already have a local openjdk with C1 on PPC64. However, we can’t contribute it without these shared code changes.
> This one should not change anything for PPC32 but change the defines as needed for PPC64.
> Can someone review and sponsor, please?
> Best regards,
>   Martin
> From: Doerr, Martin 
> Sent: Dienstag, 3. November 2015 16:13
> To: hotspot-compiler-dev at openjdk.java.net
> Subject: RFR(M): 8138952: C1: Distinguish between PPC32 and PPC64
> Hi,
> The shared C1 code currently uses many preprocessor directives which have been designed to work for the PPC32 port. In order to support our C1 port on PPC64 as well, some #ifdef etc. need modification.
> Webrev is here:
> http://cr.openjdk.java.net/~mdoerr/8138952_c1_PPC64_defs/webrev.01/ <http://cr.openjdk.java.net/~mdoerr/8138952_c1_PPC64_defs/webrev.01/>
> PPC is defined if either PPC32 and PPC64 is defined so we use it for code which is used by both ports.
> I made the following changes to webrev.00:
> I changed c1_LIR.hpp to use PPC for the method defined twice.
> I removed the modification of the defines in c1_Compilation.hpp (it’s not needed).
> Please review this change.  I need a sponsor, please.
> Best regards,
>   Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20151112/eaf8c342/attachment-0001.html>

More information about the hotspot-compiler-dev mailing list