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 1 commit
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,13 +1855,20 @@ void MacroAssembler::increment(Address dst, int value)
str(rscratch1, dst);
}

RegSet MacroAssembler::save_all_registers() {
RegSet regs = RegSet::range(r0, r30);
#ifdef R18_RESERVED
regs -= r18_tls;
#endif
return regs;
}

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

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

// Push lots of registers in the bit set supplied. Don't push sp.
@@ -464,6 +464,7 @@ class MacroAssembler: public Assembler {
void push_fp(FloatRegSet regs, Register stack) { if (regs.bits()) push_fp(regs.bits(), stack); }
void pop_fp(FloatRegSet regs, Register stack) { if (regs.bits()) pop_fp(regs.bits(), stack); }

static RegSet save_all_registers();
static RegSet call_clobbered_registers();

// Push and pop everything that might be clobbered by a native