Mercurial > hg > graal-compiler
diff src/cpu/x86/vm/interp_masm_x86_64.cpp @ 14704:b51e29501f30
Merged with jdk9/dev/hotspot changeset 9486a41de3b7
author | twisti |
---|---|
date | Tue, 18 Mar 2014 20:19:10 -0700 |
parents | 096c224171c4 d3f14809b051 |
children | 92aa6797d639 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/interp_masm_x86_64.cpp Thu Mar 20 22:30:26 2014 +0100 +++ b/src/cpu/x86/vm/interp_masm_x86_64.cpp Tue Mar 18 20:19:10 2014 -0700 @@ -271,20 +271,6 @@ addptr(cache, tmp); // construct pointer to cache entry } -void InterpreterMacroAssembler::get_method_counters(Register method, - Register mcs, Label& skip) { - Label has_counters; - movptr(mcs, Address(method, Method::method_counters_offset())); - testptr(mcs, mcs); - jcc(Assembler::notZero, has_counters); - call_VM(noreg, CAST_FROM_FN_PTR(address, - InterpreterRuntime::build_method_counters), method); - movptr(mcs, Address(method,Method::method_counters_offset())); - testptr(mcs, mcs); - jcc(Assembler::zero, skip); // No MethodCounters allocated, OutOfMemory - bind(has_counters); -} - // Load object from cpool->resolved_references(index) void InterpreterMacroAssembler::load_resolved_reference_at_index( Register result, Register index) { @@ -676,6 +662,21 @@ #endif // C_INTERP +void InterpreterMacroAssembler::get_method_counters(Register method, + Register mcs, Label& skip) { + Label has_counters; + movptr(mcs, Address(method, Method::method_counters_offset())); + testptr(mcs, mcs); + jcc(Assembler::notZero, has_counters); + call_VM(noreg, CAST_FROM_FN_PTR(address, + InterpreterRuntime::build_method_counters), method); + movptr(mcs, Address(method,Method::method_counters_offset())); + testptr(mcs, mcs); + jcc(Assembler::zero, skip); // No MethodCounters allocated, OutOfMemory + bind(has_counters); +} + + // Lock object // // Args: @@ -1471,6 +1472,20 @@ void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { } + +// Jump if ((*counter_addr += increment) & mask) satisfies the condition. +void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr, + int increment, int mask, + Register scratch, bool preloaded, + Condition cond, Label* where) { + if (!preloaded) { + movl(scratch, counter_addr); + } + incrementl(scratch, increment); + movl(counter_addr, scratch); + andl(scratch, mask); + jcc(cond, *where); +} #endif // !CC_INTERP @@ -1539,16 +1554,3 @@ } } -// Jump if ((*counter_addr += increment) & mask) satisfies the condition. -void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr, - int increment, int mask, - Register scratch, bool preloaded, - Condition cond, Label* where) { - if (!preloaded) { - movl(scratch, counter_addr); - } - incrementl(scratch, increment); - movl(counter_addr, scratch); - andl(scratch, mask); - jcc(cond, *where); -}