Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
14647:8f483e200405 | 14704:b51e29501f30 |
---|---|
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 | |
288 // Load object from cpool->resolved_references(index) | 274 // Load object from cpool->resolved_references(index) |
289 void InterpreterMacroAssembler::load_resolved_reference_at_index( | 275 void InterpreterMacroAssembler::load_resolved_reference_at_index( |
290 Register result, Register index) { | 276 Register result, Register index) { |
291 assert_different_registers(result, index); | 277 assert_different_registers(result, index); |
292 // convert from field index to resolved_references() index and from | 278 // convert from field index to resolved_references() index and from |
673 pop(ret_addr); // get return address | 659 pop(ret_addr); // get return address |
674 mov(rsp, rbx); // set sp to sender sp | 660 mov(rsp, rbx); // set sp to sender sp |
675 } | 661 } |
676 | 662 |
677 #endif // C_INTERP | 663 #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 | |
678 | 679 |
679 // Lock object | 680 // Lock object |
680 // | 681 // |
681 // Args: | 682 // Args: |
682 // c_rarg1: BasicObjectLock to be used for locking | 683 // c_rarg1: BasicObjectLock to be used for locking |
1469 } | 1470 } |
1470 } | 1471 } |
1471 | 1472 |
1472 void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { | 1473 void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { |
1473 } | 1474 } |
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 } | |
1474 #endif // !CC_INTERP | 1489 #endif // !CC_INTERP |
1475 | 1490 |
1476 | 1491 |
1477 void InterpreterMacroAssembler::notify_method_entry() { | 1492 void InterpreterMacroAssembler::notify_method_entry() { |
1478 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to | 1493 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to |
1537 r15_thread, c_rarg1); | 1552 r15_thread, c_rarg1); |
1538 NOT_CC_INTERP(pop(state)); | 1553 NOT_CC_INTERP(pop(state)); |
1539 } | 1554 } |
1540 } | 1555 } |
1541 | 1556 |
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 } |