Mercurial > hg > truffle
comparison src/cpu/x86/vm/interp_masm_x86_64.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 | b51e29501f30 |
comparison
equal
deleted
inserted
replaced
14675:bb4db06fd36f | 14676:d3f14809b051 |
---|---|
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 |
1421 } | 1422 } |
1422 } | 1423 } |
1423 | 1424 |
1424 void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { | 1425 void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { |
1425 } | 1426 } |
1427 | |
1428 // Jump if ((*counter_addr += increment) & mask) satisfies the condition. | |
1429 void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr, | |
1430 int increment, int mask, | |
1431 Register scratch, bool preloaded, | |
1432 Condition cond, Label* where) { | |
1433 if (!preloaded) { | |
1434 movl(scratch, counter_addr); | |
1435 } | |
1436 incrementl(scratch, increment); | |
1437 movl(counter_addr, scratch); | |
1438 andl(scratch, mask); | |
1439 jcc(cond, *where); | |
1440 } | |
1426 #endif // !CC_INTERP | 1441 #endif // !CC_INTERP |
1427 | 1442 |
1428 | 1443 |
1429 void InterpreterMacroAssembler::notify_method_entry() { | 1444 void InterpreterMacroAssembler::notify_method_entry() { |
1430 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to | 1445 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to |
1489 r15_thread, c_rarg1); | 1504 r15_thread, c_rarg1); |
1490 NOT_CC_INTERP(pop(state)); | 1505 NOT_CC_INTERP(pop(state)); |
1491 } | 1506 } |
1492 } | 1507 } |
1493 | 1508 |
1494 // Jump if ((*counter_addr += increment) & mask) satisfies the condition. | |
1495 void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr, | |
1496 int increment, int mask, | |
1497 Register scratch, bool preloaded, | |
1498 Condition cond, Label* where) { | |
1499 if (!preloaded) { | |
1500 movl(scratch, counter_addr); | |
1501 } | |
1502 incrementl(scratch, increment); | |
1503 movl(counter_addr, scratch); | |
1504 andl(scratch, mask); | |
1505 jcc(cond, *where); | |
1506 } |