RFR: 8224828: aarch64: save and restore the rflags register in push_CPU_state and pop_CPU_state

Yangfei (Felix) felix.yang at huawei.com
Fri May 31 03:09:22 UTC 2019


> On 5/30/19 7:31 AM, Yangfei (Felix) wrote:
> > New webrev: http://cr.openjdk.java.net/~fyang/8224828/webrev.01
> > This is tested in the same environment for 24 hours, no failure witnessed.
> > Also passed jtreg hotspot test with an aarch64 fastdebug build.  OK ?
> 
> OK, thanks.

Pushed. 

> > Should I also push this change to the aarch64 8u repo?
> 
> If you mark the bug with the label jdk8u-fix-request, I'll ack that, then it
> can be pushed.

As Andrew Hughes pointed out on the JBS, jdk8u-fix-request is not necessary for aarch64/jdk8u-shenandoah.  I only added the jdk11u-fix-request label. 
For aarch64/jdk8u-shenandoah repo, I simply paste the backport patch below.  If you approve this 8u backport, I will prepare a webrev, upload it and push it. 


8u backport patch:

diff -r a31ff0acf39b src/cpu/aarch64/vm/aarch64.ad
--- a/src/cpu/aarch64/vm/aarch64.ad     Tue May 28 11:15:11 2019 -0400
+++ b/src/cpu/aarch64/vm/aarch64.ad     Sat Jun 01 11:06:30 2019 +0800
@@ -15101,9 +15101,10 @@
 // TODO
 // provide a near and far version of this code

-instruct safePoint(iRegP poll)
+instruct safePoint(rFlagsReg cr, iRegP poll)
 %{
   match(SafePoint poll);
+  effect(KILL cr);

   format %{
     "ldrw zr, [$poll]\t# Safepoint: poll for GC"
diff -r a31ff0acf39b src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
--- a/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp      Tue May 28 11:15:11 2019 -0400
+++ b/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp      Sat Jun 01 11:06:30 2019 +0800
@@ -127,7 +127,7 @@
   int frame_size_in_words = frame_size_in_bytes / wordSize;
   *total_frame_words = frame_size_in_words;

-  // Save registers, fpu state, and flags.
+  // Save Integer and Float registers.

   __ enter();
   __ push_CPU_state(save_vectors);
@@ -2855,7 +2855,7 @@
   bool cause_return = (poll_type == POLL_AT_RETURN);
   bool save_vectors = (poll_type == POLL_AT_VECTOR_LOOP);

-  // Save registers, fpu state, and flags
+  // Save Integer and Float registers.
   map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, save_vectors);

   // The following is basically a call_VM.  However, we need the precise


More information about the hotspot-runtime-dev mailing list