8183547: AArch64: Better instruction sequence for stack bangs
authoraph
Tue, 04 Jul 2017 17:33:40 +0100
changeset 46627 8e1eae187d4d
parent 46626 0eb948496d9b
child 46628 d19bf13a5655
8183547: AArch64: Better instruction sequence for stack bangs Reviewed-by: shade, adinn
hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Wed Jul 05 09:38:47 2017 +0000
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Tue Jul 04 17:33:40 2017 +0100
@@ -949,8 +949,8 @@
   void bang_stack_with_offset(int offset) {
     // stack grows down, caller passes positive offset
     assert(offset > 0, "must bang with negative offset");
-    mov(rscratch2, -offset);
-    str(zr, Address(sp, rscratch2));
+    sub(rscratch2, sp, offset);
+    str(zr, Address(rscratch2));
   }
 
   // Writes to stack successive pages until offset reached to check for