changeset 46627:8e1eae187d4d

8183547: AArch64: Better instruction sequence for stack bangs Reviewed-by: shade, adinn
author aph
date Tue, 04 Jul 2017 17:33:40 +0100
parents 0eb948496d9b
children d19bf13a5655
files hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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