@@ -99,9 +99,9 @@ void InterpreterMacroAssembler::check_and_handle_popframe(Register java_thread)
9999 // This method is only called just after the call into the vm in
100100 // call_VM_base, so the arg registers are available.
101101 lwu (t1, Address (xthread, JavaThread::popframe_condition_offset ()));
102- andi (t0, t1, JavaThread::popframe_pending_bit);
102+ test_bit (t0, t1, exact_log2 ( JavaThread::popframe_pending_bit) );
103103 beqz (t0, L);
104- andi (t0, t1, JavaThread::popframe_processing_bit);
104+ test_bit (t0, t1, exact_log2 ( JavaThread::popframe_processing_bit) );
105105 bnez (t0, L);
106106 // Call Interpreter::remove_activation_preserving_args_entry() to get the
107107 // address of the same-named entrypoint in the generated interpreter code.
@@ -523,7 +523,7 @@ void InterpreterMacroAssembler::dispatch_base(TosState state,
523523 if (needs_thread_local_poll) {
524524 NOT_PRODUCT (block_comment (" Thread-local Safepoint poll" ));
525525 ld (t1, Address (xthread, JavaThread::polling_word_offset ()));
526- andi (t1, t1, SafepointMechanism::poll_bit ());
526+ test_bit (t1, t1, exact_log2 ( SafepointMechanism::poll_bit () ));
527527 bnez (t1, safepoint);
528528 }
529529 if (table == Interpreter::dispatch_table (state)) {
@@ -620,7 +620,7 @@ void InterpreterMacroAssembler::remove_activation(
620620 // get method access flags
621621 ld (x11, Address (fp, frame::interpreter_frame_method_offset * wordSize));
622622 ld (x12, Address (x11, Method::access_flags_offset ()));
623- andi (t0, x12, JVM_ACC_SYNCHRONIZED);
623+ test_bit (t0, x12, exact_log2 ( JVM_ACC_SYNCHRONIZED) );
624624 beqz (t0, unlocked);
625625
626626 // Don't unlock anything if the _do_not_unlock_if_synchronized flag
@@ -805,7 +805,7 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
805805 if (DiagnoseSyncOnValueBasedClasses != 0 ) {
806806 load_klass (tmp, obj_reg);
807807 lwu (tmp, Address (tmp, Klass::access_flags_offset ()));
808- andi (tmp, tmp, JVM_ACC_IS_VALUE_BASED_CLASS);
808+ test_bit (tmp, tmp, exact_log2 ( JVM_ACC_IS_VALUE_BASED_CLASS) );
809809 bnez (tmp, slow_case);
810810 }
811811
@@ -1671,7 +1671,7 @@ void InterpreterMacroAssembler::profile_obj_type(Register obj, const Address& md
16711671 // do. The unknown bit may have been
16721672 // set already but no need to check.
16731673
1674- andi (t0, obj, TypeEntries::type_unknown);
1674+ test_bit (t0, obj, exact_log2 ( TypeEntries::type_unknown) );
16751675 bnez (t0, next);
16761676 // already unknown. Nothing to do anymore.
16771677
@@ -1927,10 +1927,10 @@ void InterpreterMacroAssembler::get_method_counters(Register method,
19271927}
19281928
19291929#ifdef ASSERT
1930- void InterpreterMacroAssembler::verify_access_flags (Register access_flags, uint32_t flag_bits ,
1930+ void InterpreterMacroAssembler::verify_access_flags (Register access_flags, uint32_t flag ,
19311931 const char * msg, bool stop_by_hit) {
19321932 Label L;
1933- andi (t0, access_flags, flag_bits );
1933+ test_bit (t0, access_flags, exact_log2 (flag) );
19341934 if (stop_by_hit) {
19351935 beqz (t0, L);
19361936 } else {
0 commit comments