--- a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp Tue Jan 20 09:45:11 2015 +0100
+++ b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp Wed Jan 21 10:51:35 2015 +0100
@@ -1374,6 +1374,7 @@
}
void InterpreterMacroAssembler::test_invocation_counter_for_mdp(Register invocation_count,
+ Register method_counters,
Register Rtmp,
Label &profile_continue) {
assert(ProfileInterpreter, "must be profiling interpreter");
@@ -1386,9 +1387,8 @@
br_notnull_short(ImethodDataPtr, Assembler::pn, done);
// Test to see if we should create a method data oop
- AddressLiteral profile_limit((address) &InvocationCounter::InterpreterProfileLimit);
- sethi(profile_limit, Rtmp);
- ld(Rtmp, profile_limit.low10(), Rtmp);
+ Address profile_limit(method_counters, MethodCounters::interpreter_profile_limit_offset());
+ ld(profile_limit, Rtmp);
cmp(invocation_count, Rtmp);
// Use long branches because call_VM() code and following code generated by
// test_backedge_count_for_osr() is large in debug VM.
@@ -2375,6 +2375,7 @@
#ifndef CC_INTERP
void InterpreterMacroAssembler::test_backedge_count_for_osr( Register backedge_count,
+ Register method_counters,
Register branch_bcp,
Register Rtmp ) {
Label did_not_overflow;
@@ -2382,8 +2383,8 @@
assert_different_registers(backedge_count, Rtmp, branch_bcp);
assert(UseOnStackReplacement,"Must UseOnStackReplacement to test_backedge_count_for_osr");
- AddressLiteral limit(&InvocationCounter::InterpreterBackwardBranchLimit);
- load_contents(limit, Rtmp);
+ Address limit(method_counters, in_bytes(MethodCounters::interpreter_backward_branch_limit_offset()));
+ ld(limit, Rtmp);
cmp_and_br_short(backedge_count, Rtmp, Assembler::lessUnsigned, Assembler::pt, did_not_overflow);
// When ProfileInterpreter is on, the backedge_count comes from the
@@ -2500,17 +2501,13 @@
// Jump if ((*counter_addr += increment) & mask) satisfies the condition.
void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
- int increment, int mask,
+ int increment, Address mask_addr,
Register scratch1, Register scratch2,
Condition cond, Label *where) {
ld(counter_addr, scratch1);
add(scratch1, increment, scratch1);
- if (is_simm13(mask)) {
- andcc(scratch1, mask, G0);
- } else {
- set(mask, scratch2);
- andcc(scratch1, scratch2, G0);
- }
+ ld(mask_addr, scratch2);
+ andcc(scratch1, scratch2, G0);
br(cond, false, Assembler::pn, *where);
delayed()->st(scratch1, counter_addr);
}