Mercurial > hg > truffle
comparison src/share/vm/opto/output.cpp @ 10168:a6e09d6dd8e5
8003853: specify offset of IC load in java_to_interp stub
Summary: refactored code to allow platform-specific differences
Reviewed-by: dlong, twisti
Contributed-by: Goetz Lindenmaier <goetz.lindenmaier@sap.com>
author | dlong |
---|---|
date | Wed, 24 Apr 2013 20:55:28 -0400 |
parents | 0a8c2ea3902d |
children | e10e43e58e92 |
comparison
equal
deleted
inserted
replaced
10106:42a42da29fd7 | 10168:a6e09d6dd8e5 |
---|---|
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "asm/assembler.inline.hpp" | 26 #include "asm/assembler.inline.hpp" |
27 #include "code/compiledIC.hpp" | |
27 #include "code/debugInfo.hpp" | 28 #include "code/debugInfo.hpp" |
28 #include "code/debugInfoRec.hpp" | 29 #include "code/debugInfoRec.hpp" |
29 #include "compiler/compileBroker.hpp" | 30 #include "compiler/compileBroker.hpp" |
30 #include "compiler/oopMap.hpp" | 31 #include "compiler/oopMap.hpp" |
31 #include "memory/allocation.inline.hpp" | 32 #include "memory/allocation.inline.hpp" |
39 #include "opto/subnode.hpp" | 40 #include "opto/subnode.hpp" |
40 #include "opto/type.hpp" | 41 #include "opto/type.hpp" |
41 #include "runtime/handles.inline.hpp" | 42 #include "runtime/handles.inline.hpp" |
42 #include "utilities/xmlstream.hpp" | 43 #include "utilities/xmlstream.hpp" |
43 | 44 |
44 extern uint size_java_to_interp(); | |
45 extern uint reloc_java_to_interp(); | |
46 extern uint size_exception_handler(); | 45 extern uint size_exception_handler(); |
47 extern uint size_deopt_handler(); | 46 extern uint size_deopt_handler(); |
48 | 47 |
49 #ifndef PRODUCT | 48 #ifndef PRODUCT |
50 #define DEBUG_ARG(x) , x | 49 #define DEBUG_ARG(x) , x |
387 // Handle machine instruction nodes | 386 // Handle machine instruction nodes |
388 if (nj->is_Mach()) { | 387 if (nj->is_Mach()) { |
389 MachNode *mach = nj->as_Mach(); | 388 MachNode *mach = nj->as_Mach(); |
390 blk_size += (mach->alignment_required() - 1) * relocInfo::addr_unit(); // assume worst case padding | 389 blk_size += (mach->alignment_required() - 1) * relocInfo::addr_unit(); // assume worst case padding |
391 reloc_size += mach->reloc(); | 390 reloc_size += mach->reloc(); |
392 if( mach->is_MachCall() ) { | 391 if (mach->is_MachCall()) { |
393 MachCallNode *mcall = mach->as_MachCall(); | 392 MachCallNode *mcall = mach->as_MachCall(); |
394 // This destination address is NOT PC-relative | 393 // This destination address is NOT PC-relative |
395 | 394 |
396 mcall->method_set((intptr_t)mcall->entry_point()); | 395 mcall->method_set((intptr_t)mcall->entry_point()); |
397 | 396 |
398 if( mcall->is_MachCallJava() && mcall->as_MachCallJava()->_method ) { | 397 if (mcall->is_MachCallJava() && mcall->as_MachCallJava()->_method) { |
399 stub_size += size_java_to_interp(); | 398 stub_size += CompiledStaticCall::to_interp_stub_size(); |
400 reloc_size += reloc_java_to_interp(); | 399 reloc_size += CompiledStaticCall::reloc_to_interp_stub(); |
401 } | 400 } |
402 } else if (mach->is_MachSafePoint()) { | 401 } else if (mach->is_MachSafePoint()) { |
403 // If call/safepoint are adjacent, account for possible | 402 // If call/safepoint are adjacent, account for possible |
404 // nop to disambiguate the two safepoints. | 403 // nop to disambiguate the two safepoints. |
405 // ScheduleAndBundle() can rearrange nodes in a block, | 404 // ScheduleAndBundle() can rearrange nodes in a block, |