Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8274795: AArch64: avoid spilling and restoring r18 in macro assembler #5828

Closed
wants to merge 5 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1855,15 +1855,6 @@ void MacroAssembler::increment(Address dst, int value)
str(rscratch1, dst);
}


void MacroAssembler::pusha() {
push(0x7fffffff, sp);
}

void MacroAssembler::popa() {
pop(0x7fffffff, sp);
}

// Push lots of registers in the bit set supplied. Don't push sp.
// Return the number of words pushed
int MacroAssembler::push(unsigned int bitset, Register stack) {
@@ -1106,10 +1106,6 @@ class MacroAssembler: public Assembler {
void push(Register src);
void pop(Register dst);

// push all registers onto the stack
void pusha();
void popa();

void repne_scan(Register addr, Register value, Register count,
Register scratch);
void repne_scanw(Register addr, Register value, Register count,
@@ -1397,11 +1397,19 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
__ cmp(rscratch1, (u1)StackOverflow::stack_guard_yellow_reserved_disabled);
__ br(Assembler::NE, no_reguard);

__ pusha(); // XXX only save smashed registers
__ push(RegSet::range(r0, r30), sp);
__ mov(c_rarg0, rthread);
__ mov(rscratch2, CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages));
__ blr(rscratch2);
__ popa(); // XXX only restore smashed registers

__ pop(RegSet::range(r0, r17), sp);
#ifdef R18_RESERVED
__ ldp(zr, r19, Address(__ post(sp, 2 * wordSize)));
__ pop(RegSet::range(r20, r30), sp);
#else
__ pop(RegSet::range(r18, r30), sp);
#endif

__ bind(no_reguard);
}