8075045: AARCH64: Stack banging should use store rather than load
Summary: Change stack bangs to use a store rather than a load
Reviewed-by: dholmes
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp Mon Mar 16 14:27:33 2015 -0700
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp Tue Mar 17 14:03:05 2015 +0000
@@ -872,7 +872,7 @@
// stack grows down, caller passes positive offset
assert(offset > 0, "must bang with negative offset");
mov(rscratch2, -offset);
- ldr(zr, Address(sp, rscratch2));
+ str(zr, Address(sp, rscratch2));
}
// Writes to stack successive pages until offset reached to check for
--- a/hotspot/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp Mon Mar 16 14:27:33 2015 -0700
+++ b/hotspot/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp Tue Mar 17 14:03:05 2015 +0000
@@ -858,7 +858,7 @@
const int page_size = os::vm_page_size();
for (int pages = start_page; pages <= StackShadowPages ; pages++) {
__ sub(rscratch2, sp, pages*page_size);
- __ ldr(zr, Address(rscratch2));
+ __ str(zr, Address(rscratch2));
}
}
}