[aarch64-port-dev ] Miscellaneous small HotSpot patches

Andrew Haley aph at redhat.com
Fri Jul 19 04:42:37 PDT 2013


A couple of minor fixes.

Andrew.


changeset:   4752:88c01e23c818
tag:         tip
user:        aph
date:        Fri Jul 19 12:41:02 2013 +0100
files:       src/cpu/aarch64/vm/aarch64_call.cpp src/cpu/aarch64/vm/icache_aarch64.cpp src/cpu/aarch64/vm/macroAssembler_aarch64.cpp src/cpu/aarch64/vm/macroAssembler_aarch64.hpp src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp src/share/vm/c1/c1_Runtime1.cpp
description:
Small HotSpot fixes.
Use dsb not dmb: dmb doesn't flush the write buffer.
Pass buffered to AArch64Simulator's constructor.


diff -r 8980d9014b2d -r 88c01e23c818 src/cpu/aarch64/vm/aarch64_call.cpp
--- a/src/cpu/aarch64/vm/aarch64_call.cpp	Fri Jul 19 12:39:14 2013 +0100
+++ b/src/cpu/aarch64/vm/aarch64_call.cpp	Fri Jul 19 12:41:02 2013 +0100
@@ -128,10 +128,7 @@
   int gp_arg_count = calltype & 0xf;
   int fp_arg_count = (calltype >> 4) & 0xf;
   int return_type = (calltype >> 8) & 0x3;
-  if (UseSimulatorCache) {
-    AArch64Simulator::useCache = 1;
-  }
-  AArch64Simulator *sim = AArch64Simulator::current();
+  AArch64Simulator *sim = AArch64Simulator::get_current(UseSimulatorCache);
   // set up initial sim pc, sp and fp registers
   sim->init(*cursor++, (u_int64_t)sp, (u_int64_t)fp);
   u_int64_t *return_slot = cursor++;
diff -r 8980d9014b2d -r 88c01e23c818 src/cpu/aarch64/vm/icache_aarch64.cpp
--- a/src/cpu/aarch64/vm/icache_aarch64.cpp	Fri Jul 19 12:39:14 2013 +0100
+++ b/src/cpu/aarch64/vm/icache_aarch64.cpp	Fri Jul 19 12:41:02 2013 +0100
@@ -67,7 +67,6 @@

   address loop = __ pc();
   __ dsb(Assembler::SY);
-  __ dmb(Assembler::SY);
   __ isb();
   // args 1 and 2 identify the start address and size of the flush
   // region but we cannot use them on ARM. the stub is supposed to
diff -r 8980d9014b2d -r 88c01e23c818 src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Fri Jul 19 12:39:14 2013 +0100
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Fri Jul 19 12:41:02 2013 +0100
@@ -184,7 +184,7 @@
 }

 void MacroAssembler::serialize_memory(Register thread, Register tmp) {
-  dmb(Assembler::SY);
+  dsb(Assembler::SY);
 }


diff -r 8980d9014b2d -r 88c01e23c818 src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Fri Jul 19 12:39:14 2013 +0100
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Fri Jul 19 12:41:02 2013 +0100
@@ -1262,13 +1262,13 @@

     // Handle simple cases first
     if (order_constraint == StoreStore) {
-      dmb(ST);
+      dsb(ST);
     } else if (order_constraint == LoadLoad
 	|| order_constraint == LoadStore
 	|| order_constraint == (LoadLoad | LoadStore)) {
-      dmb(LD);
+      dsb(LD);
     } else {
-      dmb(SY);
+      dsb(SY);
     }
   }

diff -r 8980d9014b2d -r 88c01e23c818 src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
--- a/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp	Fri Jul 19 12:39:14 2013 +0100
+++ b/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp	Fri Jul 19 12:41:02 2013 +0100
@@ -705,7 +705,7 @@

   if (name) {
     generate_i2c_adapter_name(name, total_args_passed, sig_bt);
-    sim = AArch64Simulator::current();
+    sim = AArch64Simulator::get_current(UseSimulatorCache);
     sim->notifyCompile(name, i2c_entry);
   }
 #endif
@@ -1924,7 +1924,7 @@
   if(os::is_MP()) {
     if (UseMembar) {
       // Force this write out before the read below
-      __ dmb(Assembler::SY);
+      __ dsb(Assembler::SY);
     } else {
       // Write serialization page so VM thread can do a pseudo remote membar.
       // We use the current thread pointer to calculate a thread specific
diff -r 8980d9014b2d -r 88c01e23c818 src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp
--- a/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp	Fri Jul 19 12:39:14 2013 +0100
+++ b/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp	Fri Jul 19 12:41:02 2013 +0100
@@ -958,7 +958,7 @@
   if (os::is_MP()) {
     if (UseMembar) {
       // Force this write out before the read below
-      __ dmb(Assembler::SY);
+      __ dsb(Assembler::SY);
     } else {
       // Write serialization page so VM thread can do a pseudo remote membar.
       // We use the current thread pointer to calculate a thread specific
diff -r 8980d9014b2d -r 88c01e23c818 src/share/vm/c1/c1_Runtime1.cpp
--- a/src/share/vm/c1/c1_Runtime1.cpp	Fri Jul 19 12:39:14 2013 +0100
+++ b/src/share/vm/c1/c1_Runtime1.cpp	Fri Jul 19 12:41:02 2013 +0100
@@ -239,7 +239,7 @@
     char *name = new char[len];

     // tell the sim about the new stub code
-    AArch64Simulator *simulator = AArch64Simulator::current();
+    AArch64Simulator *simulator = AArch64Simulator::get_current(UseSimulatorCache);
     strncpy(name, name_for(id), len);
     // replace spaces with underscore so we can write to file and reparse
     for (char *p = strpbrk(name, " "); p; p = strpbrk(p, " ")) {




More information about the aarch64-port-dev mailing list