< prev index next >
src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
Print this page
rev 48751 : 8196064: AArch64: Merging ld/st into ldp/stp in macro-assembler
Reviewed-by: duke
@@ -148,15 +148,23 @@
strw(scratch, a);
}
void bind(Label& L) {
Assembler::bind(L);
- code()->clear_last_membar();
+ code()->clear_last_insn();
}
void membar(Membar_mask_bits order_constraint);
+ using Assembler::ldr;
+ using Assembler::str;
+
+ void ldr(Register Rx, const Address &adr);
+ void ldrw(Register Rw, const Address &adr);
+ void str(Register Rx, const Address &adr);
+ void strw(Register Rx, const Address &adr);
+
// Frame creation and destruction shared between JITs.
void build_frame(int framesize);
void remove_frame(int framesize);
virtual void _call_Unimplemented(address call_site) {
@@ -1289,10 +1297,21 @@
private:
// Returns an address on the stack which is reachable with a ldr/str of size
// Uses rscratch2 if the address is not directly reachable
Address spill_address(int size, int offset, Register tmp=rscratch2);
+ bool merge_alignment_check(Register base, size_t size, long cur_offset, long prev_offset) const;
+
+ // Check whether two loads/stores can be merged into ldp/stp.
+ bool ldst_can_merge(Register rx, const Address &adr, size_t cur_size_in_bytes, bool is_store) const;
+
+ // Merge current load/store with previous load/store into ldp/stp.
+ void merge_ldst(Register rx, const Address &adr, size_t cur_size_in_bytes, bool is_store);
+
+ // Try to merge two loads/stores into ldp/stp. If success, returns true else false.
+ bool try_merge_ldst(Register rt, const Address &adr, size_t cur_size_in_bytes, bool is_store);
+
public:
void spill(Register Rx, bool is64, int offset) {
if (is64) {
str(Rx, spill_address(8, offset));
} else {
< prev index next >