8183571: PPC64 build broken after 8178499
authormdoerr
Wed, 05 Jul 2017 17:19:37 +0200
changeset 46628 d19bf13a5655
parent 46627 8e1eae187d4d
child 46629 8eeacdc76bf2
8183571: PPC64 build broken after 8178499 Reviewed-by: simonis
hotspot/src/cpu/ppc/vm/c1_Runtime1_ppc.cpp
hotspot/src/cpu/ppc/vm/frame_ppc.hpp
hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp
hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
--- a/hotspot/src/cpu/ppc/vm/c1_Runtime1_ppc.cpp	Tue Jul 04 17:33:40 2017 +0100
+++ b/hotspot/src/cpu/ppc/vm/c1_Runtime1_ppc.cpp	Wed Jul 05 17:19:37 2017 +0200
@@ -288,6 +288,7 @@
     __ ld(R5_ARG3, frame_size_in_bytes + padding + 8, R1_SP);
     case 1:
     __ ld(R4_ARG2, frame_size_in_bytes + padding + 0, R1_SP);
+    case 0:
     call_offset = __ call_RT(noreg, noreg, target);
     break;
     default: Unimplemented(); break;
@@ -338,6 +339,7 @@
     __ ld(R5_ARG3, frame_size_in_bytes + padding + 8, R1_SP);
     case 1:
     __ ld(R4_ARG2, frame_size_in_bytes + padding + 0, R1_SP);
+    case 0:
     call_offset = __ call_RT(result, noreg, target);
     break;
     default: Unimplemented(); break;
--- a/hotspot/src/cpu/ppc/vm/frame_ppc.hpp	Tue Jul 04 17:33:40 2017 +0100
+++ b/hotspot/src/cpu/ppc/vm/frame_ppc.hpp	Wed Jul 05 17:19:37 2017 +0200
@@ -82,13 +82,7 @@
  public:
 
   // C frame layout
-
-  enum {
-    // stack alignment
-    alignment_in_bytes = 16,
-    // log_2(16*8 bits) = 7.
-    log_2_of_alignment_in_bits = 7
-  };
+  static const int alignment_in_bytes = 16;
 
   // ABI_MINFRAME:
   struct abi_minframe {
--- a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp	Tue Jul 04 17:33:40 2017 +0100
+++ b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp	Wed Jul 05 17:19:37 2017 +0200
@@ -874,7 +874,7 @@
 
   // Adapter needs TOP_IJAVA_FRAME_ABI.
   const int adapter_size = frame::top_ijava_frame_abi_size +
-      align_up(total_args_passed * wordSize, frame::alignment_in_bytes);
+                           align_up(total_args_passed * wordSize, frame::alignment_in_bytes);
 
   // regular (verified) c2i entry point
   c2i_entrypoint = __ pc();
@@ -2204,8 +2204,7 @@
     // disallows any pending_exception.
 
     // Save argument registers and leave room for C-compatible ABI_REG_ARGS.
-    int frame_size = frame::abi_reg_args_size +
-        align_up(total_c_args * wordSize, frame::alignment_in_bytes);
+    int frame_size = frame::abi_reg_args_size + align_up(total_c_args * wordSize, frame::alignment_in_bytes);
     __ mr(R11_scratch1, R1_SP);
     RegisterSaver::push_frame_and_save_argument_registers(masm, R12_scratch2, frame_size, total_c_args, out_regs, out_regs2);
 
--- a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp	Tue Jul 04 17:33:40 2017 +0100
+++ b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp	Wed Jul 05 17:19:37 2017 +0200
@@ -81,7 +81,7 @@
             UINTX_FORMAT " on this machine", PowerArchitecturePPC64);
 
   // Power 8: Configure Data Stream Control Register.
-  if (has_mfdscr()) {
+  if (PowerArchitecturePPC64 >= 8 && has_mfdscr()) {
     config_dscr();
   }
 
@@ -698,7 +698,7 @@
   // Execute code. Illegal instructions will be replaced by 0 in the signal handler.
   VM_Version::_is_determine_features_test_running = true;
   // We must align the first argument to 16 bytes because of the lqarx check.
-  (*test)(align_up(mid_of_test_area, 16), (uint64_t)0);
+  (*test)(align_up((address)mid_of_test_area, 16), 0);
   VM_Version::_is_determine_features_test_running = false;
 
   // determine which instructions are legal.