comparison src/cpu/x86/vm/interp_masm_x86_32.cpp @ 14676:d3f14809b051

8036146: make CPP interpreter build again Summary: fix build of CPP interpreter on x86 and sparc Reviewed-by: kvn
author roland
date Wed, 05 Mar 2014 15:14:25 +0100
parents ea79ab313e98
children 92aa6797d639
comparison
equal deleted inserted replaced
14675:bb4db06fd36f 14676:d3f14809b051
264 // skip past the header 264 // skip past the header
265 addptr(cache, in_bytes(ConstantPoolCache::base_offset())); 265 addptr(cache, in_bytes(ConstantPoolCache::base_offset()));
266 addptr(cache, tmp); // construct pointer to cache entry 266 addptr(cache, tmp); // construct pointer to cache entry
267 } 267 }
268 268
269 void InterpreterMacroAssembler::get_method_counters(Register method,
270 Register mcs, Label& skip) {
271 Label has_counters;
272 movptr(mcs, Address(method, Method::method_counters_offset()));
273 testptr(mcs, mcs);
274 jcc(Assembler::notZero, has_counters);
275 call_VM(noreg, CAST_FROM_FN_PTR(address,
276 InterpreterRuntime::build_method_counters), method);
277 movptr(mcs, Address(method,Method::method_counters_offset()));
278 testptr(mcs, mcs);
279 jcc(Assembler::zero, skip); // No MethodCounters allocated, OutOfMemory
280 bind(has_counters);
281 }
282
283 // Load object from cpool->resolved_references(index) 269 // Load object from cpool->resolved_references(index)
284 void InterpreterMacroAssembler::load_resolved_reference_at_index( 270 void InterpreterMacroAssembler::load_resolved_reference_at_index(
285 Register result, Register index) { 271 Register result, Register index) {
286 assert_different_registers(result, index); 272 assert_different_registers(result, index);
287 // convert from field index to resolved_references() index and from 273 // convert from field index to resolved_references() index and from
676 } 662 }
677 } 663 }
678 664
679 #endif /* !CC_INTERP */ 665 #endif /* !CC_INTERP */
680 666
667 void InterpreterMacroAssembler::get_method_counters(Register method,
668 Register mcs, Label& skip) {
669 Label has_counters;
670 movptr(mcs, Address(method, Method::method_counters_offset()));
671 testptr(mcs, mcs);
672 jcc(Assembler::notZero, has_counters);
673 call_VM(noreg, CAST_FROM_FN_PTR(address,
674 InterpreterRuntime::build_method_counters), method);
675 movptr(mcs, Address(method,Method::method_counters_offset()));
676 testptr(mcs, mcs);
677 jcc(Assembler::zero, skip); // No MethodCounters allocated, OutOfMemory
678 bind(has_counters);
679 }
680
681 681
682 // Lock object 682 // Lock object
683 // 683 //
684 // Argument: rdx : Points to BasicObjectLock to be used for locking. Must 684 // Argument: rdx : Points to BasicObjectLock to be used for locking. Must
685 // be initialized with object to lock 685 // be initialized with object to lock
1357 #ifndef CC_INTERP 1357 #ifndef CC_INTERP
1358 void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { 1358 void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) {
1359 if (state == ftos || state == dtos) MacroAssembler::verify_FPU(stack_depth); 1359 if (state == ftos || state == dtos) MacroAssembler::verify_FPU(stack_depth);
1360 } 1360 }
1361 1361
1362 // Jump if ((*counter_addr += increment) & mask) satisfies the condition.
1363 void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
1364 int increment, int mask,
1365 Register scratch, bool preloaded,
1366 Condition cond, Label* where) {
1367 if (!preloaded) {
1368 movl(scratch, counter_addr);
1369 }
1370 incrementl(scratch, increment);
1371 movl(counter_addr, scratch);
1372 andl(scratch, mask);
1373 jcc(cond, *where);
1374 }
1362 #endif /* CC_INTERP */ 1375 #endif /* CC_INTERP */
1363 1376
1364 1377
1365 void InterpreterMacroAssembler::notify_method_entry() { 1378 void InterpreterMacroAssembler::notify_method_entry() {
1366 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to 1379 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to
1428 CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), 1441 CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit),
1429 rbx, rcx); 1442 rbx, rcx);
1430 NOT_CC_INTERP(pop(state)); 1443 NOT_CC_INTERP(pop(state));
1431 } 1444 }
1432 } 1445 }
1433
1434 // Jump if ((*counter_addr += increment) & mask) satisfies the condition.
1435 void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
1436 int increment, int mask,
1437 Register scratch, bool preloaded,
1438 Condition cond, Label* where) {
1439 if (!preloaded) {
1440 movl(scratch, counter_addr);
1441 }
1442 incrementl(scratch, increment);
1443 movl(counter_addr, scratch);
1444 andl(scratch, mask);
1445 jcc(cond, *where);
1446 }