8191769: AARCH64: Fix hint instructions encoding
authordchuyko
Tue, 28 Nov 2017 15:42:15 +0300
changeset 48141 bafb0db43bfe
parent 48140 ae61a5eb9da4
child 48142 b7fc502cb8aa
8191769: AARCH64: Fix hint instructions encoding Reviewed-by: adinn
src/hotspot/cpu/aarch64/assembler_aarch64.hpp
--- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp	Tue Nov 28 12:23:03 2017 +0100
+++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp	Tue Nov 28 15:42:15 2017 +0300
@@ -985,12 +985,33 @@
   }
 
   void hint(int imm) {
-    system(0b00, 0b011, 0b0010, imm, 0b000);
+    system(0b00, 0b011, 0b0010, 0b0000, imm);
   }
 
   void nop() {
     hint(0);
   }
+
+  void yield() {
+    hint(1);
+  }
+
+  void wfe() {
+    hint(2);
+  }
+
+  void wfi() {
+    hint(3);
+  }
+
+  void sev() {
+    hint(4);
+  }
+
+  void sevl() {
+    hint(5);
+  }
+
   // we only provide mrs and msr for the special purpose system
   // registers where op1 (instr[20:19]) == 11 and, (currently) only
   // use it for FPSR n.b msr has L (instr[21]) == 0 mrs has L == 1