comparison src/cpu/x86/vm/interp_masm_x86_64.cpp @ 14726:92aa6797d639

Backed out merge changeset: b51e29501f30 Backed out merge revision to its first parent (8f483e200405)
author Doug Simon <doug.simon@oracle.com>
date Mon, 24 Mar 2014 21:30:43 +0100
parents b51e29501f30
children
comparison
equal deleted inserted replaced
14719:0bdd0d157040 14726:92aa6797d639
269 // skip past the header 269 // skip past the header
270 addptr(cache, in_bytes(ConstantPoolCache::base_offset())); 270 addptr(cache, in_bytes(ConstantPoolCache::base_offset()));
271 addptr(cache, tmp); // construct pointer to cache entry 271 addptr(cache, tmp); // construct pointer to cache entry
272 } 272 }
273 273
274 void InterpreterMacroAssembler::get_method_counters(Register method,
275 Register mcs, Label& skip) {
276 Label has_counters;
277 movptr(mcs, Address(method, Method::method_counters_offset()));
278 testptr(mcs, mcs);
279 jcc(Assembler::notZero, has_counters);
280 call_VM(noreg, CAST_FROM_FN_PTR(address,
281 InterpreterRuntime::build_method_counters), method);
282 movptr(mcs, Address(method,Method::method_counters_offset()));
283 testptr(mcs, mcs);
284 jcc(Assembler::zero, skip); // No MethodCounters allocated, OutOfMemory
285 bind(has_counters);
286 }
287
274 // Load object from cpool->resolved_references(index) 288 // Load object from cpool->resolved_references(index)
275 void InterpreterMacroAssembler::load_resolved_reference_at_index( 289 void InterpreterMacroAssembler::load_resolved_reference_at_index(
276 Register result, Register index) { 290 Register result, Register index) {
277 assert_different_registers(result, index); 291 assert_different_registers(result, index);
278 // convert from field index to resolved_references() index and from 292 // convert from field index to resolved_references() index and from
659 pop(ret_addr); // get return address 673 pop(ret_addr); // get return address
660 mov(rsp, rbx); // set sp to sender sp 674 mov(rsp, rbx); // set sp to sender sp
661 } 675 }
662 676
663 #endif // C_INTERP 677 #endif // C_INTERP
664
665 void InterpreterMacroAssembler::get_method_counters(Register method,
666 Register mcs, Label& skip) {
667 Label has_counters;
668 movptr(mcs, Address(method, Method::method_counters_offset()));
669 testptr(mcs, mcs);
670 jcc(Assembler::notZero, has_counters);
671 call_VM(noreg, CAST_FROM_FN_PTR(address,
672 InterpreterRuntime::build_method_counters), method);
673 movptr(mcs, Address(method,Method::method_counters_offset()));
674 testptr(mcs, mcs);
675 jcc(Assembler::zero, skip); // No MethodCounters allocated, OutOfMemory
676 bind(has_counters);
677 }
678
679 678
680 // Lock object 679 // Lock object
681 // 680 //
682 // Args: 681 // Args:
683 // c_rarg1: BasicObjectLock to be used for locking 682 // c_rarg1: BasicObjectLock to be used for locking
1470 } 1469 }
1471 } 1470 }
1472 1471
1473 void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { 1472 void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) {
1474 } 1473 }
1475
1476 // Jump if ((*counter_addr += increment) & mask) satisfies the condition.
1477 void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
1478 int increment, int mask,
1479 Register scratch, bool preloaded,
1480 Condition cond, Label* where) {
1481 if (!preloaded) {
1482 movl(scratch, counter_addr);
1483 }
1484 incrementl(scratch, increment);
1485 movl(counter_addr, scratch);
1486 andl(scratch, mask);
1487 jcc(cond, *where);
1488 }
1489 #endif // !CC_INTERP 1474 #endif // !CC_INTERP
1490 1475
1491 1476
1492 void InterpreterMacroAssembler::notify_method_entry() { 1477 void InterpreterMacroAssembler::notify_method_entry() {
1493 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to 1478 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to
1552 r15_thread, c_rarg1); 1537 r15_thread, c_rarg1);
1553 NOT_CC_INTERP(pop(state)); 1538 NOT_CC_INTERP(pop(state));
1554 } 1539 }
1555 } 1540 }
1556 1541
1542 // Jump if ((*counter_addr += increment) & mask) satisfies the condition.
1543 void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
1544 int increment, int mask,
1545 Register scratch, bool preloaded,
1546 Condition cond, Label* where) {
1547 if (!preloaded) {
1548 movl(scratch, counter_addr);
1549 }
1550 incrementl(scratch, increment);
1551 movl(counter_addr, scratch);
1552 andl(scratch, mask);
1553 jcc(cond, *where);
1554 }