8310020: MacroAssembler::call_VM(_leaf) doesn't consistently check for conflict with C calling convention.

Reviewed-by: thartmann, fyang, mdoerr, amitkumar
This commit is contained in:
Damon Fenacci 2023-06-20 07:40:46 +00:00 committed by Amit Kumar
parent 79069c5e74
commit 087887286d
5 changed files with 72 additions and 90 deletions

View File

@ -1019,7 +1019,7 @@ void MacroAssembler::call_VM(Register oop_result,
Register arg_1,
Register arg_2,
bool check_exceptions) {
assert(arg_1 != c_rarg2, "smashed arg");
assert_different_registers(arg_1, c_rarg2);
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
call_VM_helper(oop_result, entry_point, 2, check_exceptions);
@ -1031,11 +1031,10 @@ void MacroAssembler::call_VM(Register oop_result,
Register arg_2,
Register arg_3,
bool check_exceptions) {
assert(arg_1 != c_rarg3, "smashed arg");
assert(arg_2 != c_rarg3, "smashed arg");
assert_different_registers(arg_1, c_rarg2, c_rarg3);
assert_different_registers(arg_2, c_rarg3);
pass_arg3(this, arg_3);
assert(arg_1 != c_rarg2, "smashed arg");
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
@ -1066,7 +1065,7 @@ void MacroAssembler::call_VM(Register oop_result,
Register arg_2,
bool check_exceptions) {
assert(arg_1 != c_rarg2, "smashed arg");
assert_different_registers(arg_1, c_rarg2);
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
call_VM(oop_result, last_java_sp, entry_point, 2, check_exceptions);
@ -1079,10 +1078,9 @@ void MacroAssembler::call_VM(Register oop_result,
Register arg_2,
Register arg_3,
bool check_exceptions) {
assert(arg_1 != c_rarg3, "smashed arg");
assert(arg_2 != c_rarg3, "smashed arg");
assert_different_registers(arg_1, c_rarg2, c_rarg3);
assert_different_registers(arg_2, c_rarg3);
pass_arg3(this, arg_3);
assert(arg_1 != c_rarg2, "smashed arg");
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
call_VM(oop_result, last_java_sp, entry_point, 3, check_exceptions);
@ -1586,6 +1584,7 @@ void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0) {
}
void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0, Register arg_1) {
assert_different_registers(arg_1, c_rarg0);
pass_arg0(this, arg_0);
pass_arg1(this, arg_1);
call_VM_leaf_base(entry_point, 2);
@ -1593,6 +1592,8 @@ void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0, Register
void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0,
Register arg_1, Register arg_2) {
assert_different_registers(arg_1, c_rarg0);
assert_different_registers(arg_2, c_rarg0, c_rarg1);
pass_arg0(this, arg_0);
pass_arg1(this, arg_1);
pass_arg2(this, arg_2);
@ -1606,31 +1607,27 @@ void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0) {
void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1) {
assert(arg_0 != c_rarg1, "smashed arg");
assert_different_registers(arg_0, c_rarg1);
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
MacroAssembler::call_VM_leaf_base(entry_point, 2);
}
void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1, Register arg_2) {
assert(arg_0 != c_rarg2, "smashed arg");
assert(arg_1 != c_rarg2, "smashed arg");
assert_different_registers(arg_0, c_rarg1, c_rarg2);
assert_different_registers(arg_1, c_rarg2);
pass_arg2(this, arg_2);
assert(arg_0 != c_rarg1, "smashed arg");
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
MacroAssembler::call_VM_leaf_base(entry_point, 3);
}
void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1, Register arg_2, Register arg_3) {
assert(arg_0 != c_rarg3, "smashed arg");
assert(arg_1 != c_rarg3, "smashed arg");
assert(arg_2 != c_rarg3, "smashed arg");
assert_different_registers(arg_0, c_rarg1, c_rarg2, c_rarg3);
assert_different_registers(arg_1, c_rarg2, c_rarg3);
assert_different_registers(arg_2, c_rarg3);
pass_arg3(this, arg_3);
assert(arg_0 != c_rarg2, "smashed arg");
assert(arg_1 != c_rarg2, "smashed arg");
pass_arg2(this, arg_2);
assert(arg_0 != c_rarg1, "smashed arg");
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
MacroAssembler::call_VM_leaf_base(entry_point, 4);

View File

@ -1249,8 +1249,8 @@ void MacroAssembler::call_VM(Register oop_result, address entry_point, Register
void MacroAssembler::call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2,
bool check_exceptions) {
// R3_ARG1 is reserved for the thread
assert_different_registers(arg_2, R4_ARG2);
mr_if_needed(R4_ARG2, arg_1);
assert(arg_2 != R4_ARG2, "smashed argument");
mr_if_needed(R5_ARG3, arg_2);
call_VM(oop_result, entry_point, check_exceptions);
}
@ -1258,8 +1258,9 @@ void MacroAssembler::call_VM(Register oop_result, address entry_point, Register
void MacroAssembler::call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2, Register arg_3,
bool check_exceptions) {
// R3_ARG1 is reserved for the thread
assert_different_registers(arg_2, R4_ARG2);
assert_different_registers(arg_3, R4_ARG2, R5_ARG3);
mr_if_needed(R4_ARG2, arg_1);
assert(arg_2 != R4_ARG2, "smashed argument");
mr_if_needed(R5_ARG3, arg_2);
mr_if_needed(R6_ARG4, arg_3);
call_VM(oop_result, entry_point, check_exceptions);
@ -1275,17 +1276,17 @@ void MacroAssembler::call_VM_leaf(address entry_point, Register arg_1) {
}
void MacroAssembler::call_VM_leaf(address entry_point, Register arg_1, Register arg_2) {
assert_different_registers(arg_2, R3_ARG1);
mr_if_needed(R3_ARG1, arg_1);
assert(arg_2 != R3_ARG1, "smashed argument");
mr_if_needed(R4_ARG2, arg_2);
call_VM_leaf(entry_point);
}
void MacroAssembler::call_VM_leaf(address entry_point, Register arg_1, Register arg_2, Register arg_3) {
assert_different_registers(arg_2, R3_ARG1);
assert_different_registers(arg_3, R3_ARG1, R4_ARG2);
mr_if_needed(R3_ARG1, arg_1);
assert(arg_2 != R3_ARG1, "smashed argument");
mr_if_needed(R4_ARG2, arg_2);
assert(arg_3 != R3_ARG1 && arg_3 != R4_ARG2, "smashed argument");
mr_if_needed(R5_ARG3, arg_3);
call_VM_leaf(entry_point);
}

View File

@ -136,7 +136,7 @@ void MacroAssembler::call_VM(Register oop_result,
Register arg_1,
Register arg_2,
bool check_exceptions) {
assert(arg_1 != c_rarg2, "smashed arg");
assert_different_registers(arg_1, c_rarg2);
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
call_VM_helper(oop_result, entry_point, 2, check_exceptions);
@ -148,11 +148,10 @@ void MacroAssembler::call_VM(Register oop_result,
Register arg_2,
Register arg_3,
bool check_exceptions) {
assert(arg_1 != c_rarg3, "smashed arg");
assert(arg_2 != c_rarg3, "smashed arg");
assert_different_registers(arg_1, c_rarg2, c_rarg3);
assert_different_registers(arg_2, c_rarg3);
pass_arg3(this, arg_3);
assert(arg_1 != c_rarg2, "smashed arg");
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
@ -183,7 +182,7 @@ void MacroAssembler::call_VM(Register oop_result,
Register arg_2,
bool check_exceptions) {
assert(arg_1 != c_rarg2, "smashed arg");
assert_different_registers(arg_1, c_rarg2);
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
call_VM(oop_result, last_java_sp, entry_point, 2, check_exceptions);
@ -196,10 +195,9 @@ void MacroAssembler::call_VM(Register oop_result,
Register arg_2,
Register arg_3,
bool check_exceptions) {
assert(arg_1 != c_rarg3, "smashed arg");
assert(arg_2 != c_rarg3, "smashed arg");
assert_different_registers(arg_1, c_rarg2, c_rarg3);
assert_different_registers(arg_2, c_rarg3);
pass_arg3(this, arg_3);
assert(arg_1 != c_rarg2, "smashed arg");
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
call_VM(oop_result, last_java_sp, entry_point, 3, check_exceptions);
@ -668,6 +666,7 @@ void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0) {
}
void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0, Register arg_1) {
assert_different_registers(arg_1, c_rarg0);
pass_arg0(this, arg_0);
pass_arg1(this, arg_1);
call_VM_leaf_base(entry_point, 2);
@ -675,6 +674,8 @@ void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0, Register
void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0,
Register arg_1, Register arg_2) {
assert_different_registers(arg_1, c_rarg0);
assert_different_registers(arg_2, c_rarg0, c_rarg1);
pass_arg0(this, arg_0);
pass_arg1(this, arg_1);
pass_arg2(this, arg_2);
@ -688,31 +689,28 @@ void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0) {
void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1) {
assert(arg_0 != c_rarg1, "smashed arg");
assert_different_registers(arg_0, c_rarg1);
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
MacroAssembler::call_VM_leaf_base(entry_point, 2);
}
void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1, Register arg_2) {
assert(arg_0 != c_rarg2, "smashed arg");
assert(arg_1 != c_rarg2, "smashed arg");
assert_different_registers(arg_0, c_rarg1, c_rarg2);
assert_different_registers(arg_1, c_rarg2);
pass_arg2(this, arg_2);
assert(arg_0 != c_rarg1, "smashed arg");
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
MacroAssembler::call_VM_leaf_base(entry_point, 3);
}
void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1, Register arg_2, Register arg_3) {
assert(arg_0 != c_rarg3, "smashed arg");
assert(arg_1 != c_rarg3, "smashed arg");
assert(arg_2 != c_rarg3, "smashed arg");
assert_different_registers(arg_0, c_rarg1, c_rarg2, c_rarg3);
assert_different_registers(arg_1, c_rarg2, c_rarg3);
assert_different_registers(arg_2, c_rarg3);
pass_arg3(this, arg_3);
assert(arg_0 != c_rarg2, "smashed arg");
assert(arg_1 != c_rarg2, "smashed arg");
pass_arg2(this, arg_2);
assert(arg_0 != c_rarg1, "smashed arg");
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
MacroAssembler::call_VM_leaf_base(entry_point, 4);

View File

@ -2231,8 +2231,8 @@ void MacroAssembler::call_VM(Register oop_result, address entry_point, Register
void MacroAssembler::call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2, bool check_exceptions) {
// Z_ARG1 is reserved for the thread.
assert_different_registers(arg_2, Z_ARG2);
lgr_if_needed(Z_ARG2, arg_1);
assert(arg_2 != Z_ARG2, "smashed argument");
lgr_if_needed(Z_ARG3, arg_2);
call_VM(oop_result, entry_point, check_exceptions);
}
@ -2240,10 +2240,10 @@ void MacroAssembler::call_VM(Register oop_result, address entry_point, Register
void MacroAssembler::call_VM(Register oop_result, address entry_point, Register arg_1, Register arg_2,
Register arg_3, bool check_exceptions) {
// Z_ARG1 is reserved for the thread.
assert_different_registers(arg_3, Z_ARG2, Z_ARG3);
assert_different_registers(arg_2, Z_ARG2);
lgr_if_needed(Z_ARG2, arg_1);
assert(arg_2 != Z_ARG2, "smashed argument");
lgr_if_needed(Z_ARG3, arg_2);
assert(arg_3 != Z_ARG2 && arg_3 != Z_ARG3, "smashed argument");
lgr_if_needed(Z_ARG4, arg_3);
call_VM(oop_result, entry_point, check_exceptions);
}
@ -2258,10 +2258,10 @@ void MacroAssembler::call_VM_static(Register oop_result, address entry_point, bo
void MacroAssembler::call_VM_static(Register oop_result, address entry_point, Register arg_1, Register arg_2,
Register arg_3, bool check_exceptions) {
// Z_ARG1 is reserved for the thread.
assert_different_registers(arg_3, Z_ARG2, Z_ARG3);
assert_different_registers(arg_2, Z_ARG2);
lgr_if_needed(Z_ARG2, arg_1);
assert(arg_2 != Z_ARG2, "smashed argument");
lgr_if_needed(Z_ARG3, arg_2);
assert(arg_3 != Z_ARG2 && arg_3 != Z_ARG3, "smashed argument");
lgr_if_needed(Z_ARG4, arg_3);
call_VM_static(oop_result, entry_point, check_exceptions);
}
@ -2282,8 +2282,8 @@ void MacroAssembler::call_VM(Register oop_result, Register last_java_sp, address
void MacroAssembler::call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1,
Register arg_2, bool check_exceptions) {
// Z_ARG1 is reserved for the thread.
assert_different_registers(arg_2, Z_ARG2);
lgr_if_needed(Z_ARG2, arg_1);
assert(arg_2 != Z_ARG2, "smashed argument");
lgr_if_needed(Z_ARG3, arg_2);
call_VM(oop_result, last_java_sp, entry_point, check_exceptions);
}
@ -2291,10 +2291,10 @@ void MacroAssembler::call_VM(Register oop_result, Register last_java_sp, address
void MacroAssembler::call_VM(Register oop_result, Register last_java_sp, address entry_point, Register arg_1,
Register arg_2, Register arg_3, bool check_exceptions) {
// Z_ARG1 is reserved for the thread.
assert_different_registers(arg_3, Z_ARG2, Z_ARG3);
assert_different_registers(arg_2, Z_ARG2);
lgr_if_needed(Z_ARG2, arg_1);
assert(arg_2 != Z_ARG2, "smashed argument");
lgr_if_needed(Z_ARG3, arg_2);
assert(arg_3 != Z_ARG2 && arg_3 != Z_ARG3, "smashed argument");
lgr_if_needed(Z_ARG4, arg_3);
call_VM(oop_result, last_java_sp, entry_point, check_exceptions);
}
@ -2312,17 +2312,17 @@ void MacroAssembler::call_VM_leaf(address entry_point, Register arg_1) {
}
void MacroAssembler::call_VM_leaf(address entry_point, Register arg_1, Register arg_2) {
assert_different_registers(arg_2, Z_ARG1);
if (arg_1 != noreg) lgr_if_needed(Z_ARG1, arg_1);
assert(arg_2 != Z_ARG1, "smashed argument");
if (arg_2 != noreg) lgr_if_needed(Z_ARG2, arg_2);
call_VM_leaf(entry_point);
}
void MacroAssembler::call_VM_leaf(address entry_point, Register arg_1, Register arg_2, Register arg_3) {
assert_different_registers(arg_3, Z_ARG1, Z_ARG2);
assert_different_registers(arg_2, Z_ARG1);
if (arg_1 != noreg) lgr_if_needed(Z_ARG1, arg_1);
assert(arg_2 != Z_ARG1, "smashed argument");
if (arg_2 != noreg) lgr_if_needed(Z_ARG2, arg_2);
assert(arg_3 != Z_ARG1 && arg_3 != Z_ARG2, "smashed argument");
if (arg_3 != noreg) lgr_if_needed(Z_ARG3, arg_3);
call_VM_leaf(entry_point);
}
@ -2341,17 +2341,17 @@ void MacroAssembler::call_VM_leaf_static(address entry_point, Register arg_1) {
}
void MacroAssembler::call_VM_leaf_static(address entry_point, Register arg_1, Register arg_2) {
assert_different_registers(arg_2, Z_ARG1);
if (arg_1 != noreg) lgr_if_needed(Z_ARG1, arg_1);
assert(arg_2 != Z_ARG1, "smashed argument");
if (arg_2 != noreg) lgr_if_needed(Z_ARG2, arg_2);
call_VM_leaf_static(entry_point);
}
void MacroAssembler::call_VM_leaf_static(address entry_point, Register arg_1, Register arg_2, Register arg_3) {
assert_different_registers(arg_3, Z_ARG1, Z_ARG2);
assert_different_registers(arg_2, Z_ARG1);
if (arg_1 != noreg) lgr_if_needed(Z_ARG1, arg_1);
assert(arg_2 != Z_ARG1, "smashed argument");
if (arg_2 != noreg) lgr_if_needed(Z_ARG2, arg_2);
assert(arg_3 != Z_ARG1 && arg_3 != Z_ARG2, "smashed argument");
if (arg_3 != noreg) lgr_if_needed(Z_ARG3, arg_3);
call_VM_leaf_static(entry_point);
}

View File

@ -1391,7 +1391,7 @@ void MacroAssembler::call_VM(Register oop_result,
bind(C);
LP64_ONLY(assert(arg_1 != c_rarg2, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_1, c_rarg2));
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
@ -1413,13 +1413,10 @@ void MacroAssembler::call_VM(Register oop_result,
bind(C);
LP64_ONLY(assert(arg_1 != c_rarg3, "smashed arg"));
LP64_ONLY(assert(arg_2 != c_rarg3, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_1, c_rarg2, c_rarg3));
LP64_ONLY(assert_different_registers(arg_2, c_rarg3));
pass_arg3(this, arg_3);
LP64_ONLY(assert(arg_1 != c_rarg2, "smashed arg"));
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
call_VM_helper(oop_result, entry_point, 3, check_exceptions);
ret(0);
@ -1452,7 +1449,7 @@ void MacroAssembler::call_VM(Register oop_result,
Register arg_2,
bool check_exceptions) {
LP64_ONLY(assert(arg_1 != c_rarg2, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_1, c_rarg2));
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
call_VM(oop_result, last_java_sp, entry_point, 2, check_exceptions);
@ -1465,10 +1462,9 @@ void MacroAssembler::call_VM(Register oop_result,
Register arg_2,
Register arg_3,
bool check_exceptions) {
LP64_ONLY(assert(arg_1 != c_rarg3, "smashed arg"));
LP64_ONLY(assert(arg_2 != c_rarg3, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_1, c_rarg2, c_rarg3));
LP64_ONLY(assert_different_registers(arg_2, c_rarg3));
pass_arg3(this, arg_3);
LP64_ONLY(assert(arg_1 != c_rarg2, "smashed arg"));
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
call_VM(oop_result, last_java_sp, entry_point, 3, check_exceptions);
@ -1499,7 +1495,7 @@ void MacroAssembler::super_call_VM(Register oop_result,
Register arg_2,
bool check_exceptions) {
LP64_ONLY(assert(arg_1 != c_rarg2, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_1, c_rarg2));
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
super_call_VM(oop_result, last_java_sp, entry_point, 2, check_exceptions);
@ -1512,10 +1508,9 @@ void MacroAssembler::super_call_VM(Register oop_result,
Register arg_2,
Register arg_3,
bool check_exceptions) {
LP64_ONLY(assert(arg_1 != c_rarg3, "smashed arg"));
LP64_ONLY(assert(arg_2 != c_rarg3, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_1, c_rarg2, c_rarg3));
LP64_ONLY(assert_different_registers(arg_2, c_rarg3));
pass_arg3(this, arg_3);
LP64_ONLY(assert(arg_1 != c_rarg2, "smashed arg"));
pass_arg2(this, arg_2);
pass_arg1(this, arg_1);
super_call_VM(oop_result, last_java_sp, entry_point, 3, check_exceptions);
@ -1657,31 +1652,27 @@ void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0) {
void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0, Register arg_1) {
LP64_ONLY(assert(arg_0 != c_rarg1, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_0, c_rarg1));
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
call_VM_leaf(entry_point, 2);
}
void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0, Register arg_1, Register arg_2) {
LP64_ONLY(assert(arg_0 != c_rarg2, "smashed arg"));
LP64_ONLY(assert(arg_1 != c_rarg2, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_0, c_rarg1, c_rarg2));
LP64_ONLY(assert_different_registers(arg_1, c_rarg2));
pass_arg2(this, arg_2);
LP64_ONLY(assert(arg_0 != c_rarg1, "smashed arg"));
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
call_VM_leaf(entry_point, 3);
}
void MacroAssembler::call_VM_leaf(address entry_point, Register arg_0, Register arg_1, Register arg_2, Register arg_3) {
LP64_ONLY(assert(arg_0 != c_rarg3, "smashed arg"));
LP64_ONLY(assert(arg_1 != c_rarg3, "smashed arg"));
LP64_ONLY(assert(arg_2 != c_rarg3, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_0, c_rarg1, c_rarg2, c_rarg3));
LP64_ONLY(assert_different_registers(arg_1, c_rarg2, c_rarg3));
LP64_ONLY(assert_different_registers(arg_2, c_rarg3));
pass_arg3(this, arg_3);
LP64_ONLY(assert(arg_0 != c_rarg2, "smashed arg"));
LP64_ONLY(assert(arg_1 != c_rarg2, "smashed arg"));
pass_arg2(this, arg_2);
LP64_ONLY(assert(arg_0 != c_rarg1, "smashed arg"));
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
call_VM_leaf(entry_point, 3);
@ -1693,32 +1684,27 @@ void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0) {
}
void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1) {
LP64_ONLY(assert(arg_0 != c_rarg1, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_0, c_rarg1));
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
MacroAssembler::call_VM_leaf_base(entry_point, 2);
}
void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1, Register arg_2) {
LP64_ONLY(assert(arg_0 != c_rarg2, "smashed arg"));
LP64_ONLY(assert(arg_1 != c_rarg2, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_0, c_rarg1, c_rarg2));
LP64_ONLY(assert_different_registers(arg_1, c_rarg2));
pass_arg2(this, arg_2);
LP64_ONLY(assert(arg_0 != c_rarg1, "smashed arg"));
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
MacroAssembler::call_VM_leaf_base(entry_point, 3);
}
void MacroAssembler::super_call_VM_leaf(address entry_point, Register arg_0, Register arg_1, Register arg_2, Register arg_3) {
LP64_ONLY(assert(arg_0 != c_rarg3, "smashed arg"));
LP64_ONLY(assert(arg_1 != c_rarg3, "smashed arg"));
LP64_ONLY(assert(arg_2 != c_rarg3, "smashed arg"));
LP64_ONLY(assert_different_registers(arg_0, c_rarg1, c_rarg2, c_rarg3));
LP64_ONLY(assert_different_registers(arg_1, c_rarg2, c_rarg3));
LP64_ONLY(assert_different_registers(arg_2, c_rarg3));
pass_arg3(this, arg_3);
LP64_ONLY(assert(arg_0 != c_rarg2, "smashed arg"));
LP64_ONLY(assert(arg_1 != c_rarg2, "smashed arg"));
pass_arg2(this, arg_2);
LP64_ONLY(assert(arg_0 != c_rarg1, "smashed arg"));
pass_arg1(this, arg_1);
pass_arg0(this, arg_0);
MacroAssembler::call_VM_leaf_base(entry_point, 4);