< prev index next >

src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaCallSiteRelocationSymbol.java

Print this page
rev 47466 : 8132547: [AOT] support invokedynamic instructions
Reviewed-by: iveresov, kvn


 107         addExtLinkageGotContainerRelocation(binaryContainer, gotMoveSymbolName, gotMetaOffset, stub.getMovOffset());
 108 
 109         if (isVirtualCall) {
 110             // Nothing.
 111         } else {
 112             // Add relocation to GOT cell for c2i adapter jump.
 113             // The c2i jump instruction loads destination address from this GOT cell.
 114             // This GOT cell is initialized with -1 and will be updated
 115             // by JVM runtime call resolution code.
 116             String gotC2ISymbolName = relocationSymbolName("got.c2i", mi, call, callSiteRelocation);
 117             addExtLinkageGotContainerRelocation(binaryContainer, gotC2ISymbolName, gotStartOffset + 8, stub.getC2IJumpOffset());
 118         }
 119     }
 120 
 121     /**
 122      * Returns the name of the resolve method for this particular call.
 123      */
 124     private static String getResolveSymbolName(CompiledMethodInfo mi, Call call) {
 125         String resolveSymbolName;
 126         if (CallInfo.isStaticCall(call)) {

 127             resolveSymbolName = BinaryContainer.getResolveStaticEntrySymbolName();
 128         } else if (CallInfo.isSpecialCall(call)) {
 129             resolveSymbolName = BinaryContainer.getResolveOptVirtualEntrySymbolName();
 130         } else if (CallInfo.isOptVirtualCall(mi, call)) {
 131             resolveSymbolName = BinaryContainer.getResolveOptVirtualEntrySymbolName();
 132         } else if (CallInfo.isVirtualCall(mi, call)) {
 133             resolveSymbolName = BinaryContainer.getResolveVirtualEntrySymbolName();
 134         } else {
 135             throw new InternalError("Unknown call type in " + mi.asTag() + " @ " + call.pcOffset + " for call" + call.target);
 136         }
 137         return resolveSymbolName;
 138     }
 139 
 140 }


 107         addExtLinkageGotContainerRelocation(binaryContainer, gotMoveSymbolName, gotMetaOffset, stub.getMovOffset());
 108 
 109         if (isVirtualCall) {
 110             // Nothing.
 111         } else {
 112             // Add relocation to GOT cell for c2i adapter jump.
 113             // The c2i jump instruction loads destination address from this GOT cell.
 114             // This GOT cell is initialized with -1 and will be updated
 115             // by JVM runtime call resolution code.
 116             String gotC2ISymbolName = relocationSymbolName("got.c2i", mi, call, callSiteRelocation);
 117             addExtLinkageGotContainerRelocation(binaryContainer, gotC2ISymbolName, gotStartOffset + 8, stub.getC2IJumpOffset());
 118         }
 119     }
 120 
 121     /**
 122      * Returns the name of the resolve method for this particular call.
 123      */
 124     private static String getResolveSymbolName(CompiledMethodInfo mi, Call call) {
 125         String resolveSymbolName;
 126         if (CallInfo.isStaticCall(call)) {
 127             assert mi.hasMark(call, MarkId.INVOKESTATIC);
 128             resolveSymbolName = BinaryContainer.getResolveStaticEntrySymbolName();
 129         } else if (CallInfo.isSpecialCall(call)) {
 130             resolveSymbolName = BinaryContainer.getResolveOptVirtualEntrySymbolName();
 131         } else if (CallInfo.isOptVirtualCall(mi, call)) {
 132             resolveSymbolName = BinaryContainer.getResolveOptVirtualEntrySymbolName();
 133         } else if (CallInfo.isVirtualCall(mi, call)) {
 134             resolveSymbolName = BinaryContainer.getResolveVirtualEntrySymbolName();
 135         } else {
 136             throw new InternalError("Unknown call type in " + mi.asTag() + " @ " + call.pcOffset + " for call" + call.target);
 137         }
 138         return resolveSymbolName;
 139     }
 140 
 141 }
< prev index next >