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

8285303: riscv: Incorrect register mask in call_native_base #18

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,24 +585,14 @@ void MacroAssembler::emit_static_call_stub() {
void MacroAssembler::call_VM_leaf_base(address entry_point,
int number_of_arguments,
Label *retaddr) {
call_native_base(entry_point, retaddr);
}

void MacroAssembler::call_native(address entry_point, Register arg_0) {
pass_arg0(this, arg_0);
call_native_base(entry_point);
}

void MacroAssembler::call_native_base(address entry_point, Label *retaddr) {
Label E, L;
int32_t offset = 0;
push_reg(0x80000040, sp); // push << t0 & xmethod >> to sp
push_reg(RegSet::of(t0, xmethod), sp); // push << t0 & xmethod >> to sp
movptr_with_offset(t0, entry_point, offset);
jalr(x1, t0, offset);
if (retaddr != NULL) {
bind(*retaddr);
}
pop_reg(0x80000040, sp); // pop << t0 & xmethod >> from sp
pop_reg(RegSet::of(t0, xmethod), sp); // pop << t0 & xmethod >> from sp
}

void MacroAssembler::call_VM_leaf(address entry_point, int number_of_arguments) {
Expand Down
7 changes: 0 additions & 7 deletions src/hotspot/cpu/riscv/macroAssembler_riscv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,6 @@ class MacroAssembler: public Assembler {
// thread in the default location (xthread)
void reset_last_Java_frame(bool clear_fp);

void call_native(address entry_point,
Register arg_0);
void call_native_base(
address entry_point, // the entry point
Label* retaddr = NULL
);

virtual void call_VM_leaf_base(
address entry_point, // the entry point
int number_of_arguments, // the number of arguments to pop after the call
Expand Down