Skip to content

Commit e9c1905

Browse files
committed
8253740: [PPC64] Minor interpreter cleanup
Reviewed-by: lucy
1 parent b1448da commit e9c1905

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

src/hotspot/cpu/ppc/interp_masm_ppc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class InterpreterMacroAssembler: public MacroAssembler {
211211

212212
// Object locking
213213
void lock_object (Register lock_reg, Register obj_reg);
214-
void unlock_object(Register lock_reg, bool check_for_exceptions = true);
214+
void unlock_object(Register lock_reg);
215215

216216
// Interpreter profiling operations
217217
void set_method_data_pointer_for_bcp();

src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -878,8 +878,7 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
878878
//
879879
void InterpreterMacroAssembler::lock_object(Register monitor, Register object) {
880880
if (UseHeavyMonitors) {
881-
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter),
882-
monitor, /*check_for_exceptions=*/true);
881+
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter), monitor);
883882
} else {
884883
// template code:
885884
//
@@ -980,8 +979,7 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) {
980979
// None of the above fast optimizations worked so we have to get into the
981980
// slow case of monitor enter.
982981
bind(slow_case);
983-
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter),
984-
monitor, /*check_for_exceptions=*/true);
982+
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter), monitor);
985983
// }
986984
align(32, 12);
987985
bind(done);
@@ -995,7 +993,7 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) {
995993
// which must be initialized with the object to lock.
996994
//
997995
// Throw IllegalMonitorException if object is not locked by current thread.
998-
void InterpreterMacroAssembler::unlock_object(Register monitor, bool check_for_exceptions) {
996+
void InterpreterMacroAssembler::unlock_object(Register monitor) {
999997
if (UseHeavyMonitors) {
1000998
call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), monitor);
1001999
} else {
@@ -2401,8 +2399,7 @@ void InterpreterMacroAssembler::notify_method_entry() {
24012399
lwz(R0, in_bytes(JavaThread::interp_only_mode_offset()), R16_thread);
24022400
cmpwi(CCR0, R0, 0);
24032401
beq(CCR0, jvmti_post_done);
2404-
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_method_entry),
2405-
/*check_exceptions=*/true);
2402+
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_method_entry));
24062403

24072404
bind(jvmti_post_done);
24082405
}
@@ -2437,8 +2434,7 @@ void InterpreterMacroAssembler::notify_method_exit(bool is_native_method, TosSta
24372434
cmpwi(CCR0, R0, 0);
24382435
beq(CCR0, jvmti_post_done);
24392436
if (!is_native_method) { push(state); } // Expose tos to GC.
2440-
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_method_exit),
2441-
/*check_exceptions=*/check_exceptions);
2437+
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_method_exit), check_exceptions);
24422438
if (!is_native_method) { pop(state); }
24432439

24442440
align(32, 12);

src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,9 +1549,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
15491549
// Handle exceptions
15501550

15511551
if (synchronized) {
1552-
// Don't check for exceptions since we're still in the i2n frame. Do that
1553-
// manually afterwards.
1554-
__ unlock_object(R26_monitor, false); // Can also unlock methods.
1552+
__ unlock_object(R26_monitor); // Can also unlock methods.
15551553
}
15561554

15571555
// Reset active handles after returning from native.
@@ -1592,9 +1590,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
15921590
BIND(exception_return_sync_check);
15931591

15941592
if (synchronized) {
1595-
// Don't check for exceptions since we're still in the i2n frame. Do that
1596-
// manually afterwards.
1597-
__ unlock_object(R26_monitor, false); // Can also unlock methods.
1593+
__ unlock_object(R26_monitor); // Can also unlock methods.
15981594
}
15991595
BIND(exception_return_sync_check_already_unlocked);
16001596

@@ -2105,7 +2101,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
21052101
// Detect such a case in the InterpreterRuntime function and return the member name argument, or NULL.
21062102
__ ld(R4_ARG2, 0, R18_locals);
21072103
__ call_VM(R4_ARG2, CAST_FROM_FN_PTR(address, InterpreterRuntime::member_name_arg_or_null), R4_ARG2, R19_method, R14_bcp);
2108-
__ restore_interpreter_state(R11_scratch1, /*bcp_and_mdx_only*/ true);
2104+
21092105
__ cmpdi(CCR0, R4_ARG2, 0);
21102106
__ beq(CCR0, L_done);
21112107
__ std(R4_ARG2, wordSize, R15_esp);

0 commit comments

Comments
 (0)