Mercurial > hg > truffle
comparison src/cpu/x86/vm/interp_masm_x86_32.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 | d3f14809b051 |
children |
comparison
equal
deleted
inserted
replaced
14719:0bdd0d157040 | 14726:92aa6797d639 |
---|---|
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 | |
269 // Load object from cpool->resolved_references(index) | 283 // Load object from cpool->resolved_references(index) |
270 void InterpreterMacroAssembler::load_resolved_reference_at_index( | 284 void InterpreterMacroAssembler::load_resolved_reference_at_index( |
271 Register result, Register index) { | 285 Register result, Register index) { |
272 assert_different_registers(result, index); | 286 assert_different_registers(result, index); |
273 // convert from field index to resolved_references() index and from | 287 // convert from field index to resolved_references() index and from |
662 } | 676 } |
663 } | 677 } |
664 | 678 |
665 #endif /* !CC_INTERP */ | 679 #endif /* !CC_INTERP */ |
666 | 680 |
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 } | |
1375 #endif /* CC_INTERP */ | 1362 #endif /* CC_INTERP */ |
1376 | 1363 |
1377 | 1364 |
1378 void InterpreterMacroAssembler::notify_method_entry() { | 1365 void InterpreterMacroAssembler::notify_method_entry() { |
1379 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to | 1366 // Whenever JVMTI is interp_only_mode, method entry/exit events are sent to |
1441 CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), | 1428 CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), |
1442 rbx, rcx); | 1429 rbx, rcx); |
1443 NOT_CC_INTERP(pop(state)); | 1430 NOT_CC_INTERP(pop(state)); |
1444 } | 1431 } |
1445 } | 1432 } |
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 } |