use of com.oracle.svm.core.graal.llvm.util.LLVMIRBuilder.InlineAssemblyConstraint in project graal by oracle.
the class LLVMGenerator method buildInlineGetRegister.
private LLVMValueRef buildInlineGetRegister(String registerName) {
LLVMTypeRef inlineAsmType = builder.functionType(builder.rawPointerType());
String asmSnippet = LLVMTargetSpecific.get().getRegisterInlineAsm(registerName);
InlineAssemblyConstraint outputConstraint = new InlineAssemblyConstraint(Type.Output, Location.namedRegister(LLVMTargetSpecific.get().getLLVMRegisterName(registerName)));
LLVMValueRef getRegister = builder.buildInlineAsm(inlineAsmType, asmSnippet, false, false, outputConstraint);
LLVMValueRef call = builder.buildCall(getRegister);
builder.setCallSiteAttribute(call, Attribute.GCLeafFunction);
return call;
}
use of com.oracle.svm.core.graal.llvm.util.LLVMIRBuilder.InlineAssemblyConstraint in project graal by oracle.
the class LLVMGenerator method buildInlineJump.
/* Inline assembly */
private void buildInlineJump(LLVMValueRef address) {
LLVMTypeRef inlineAsmType = builder.functionType(builder.voidType(), builder.rawPointerType());
String asmSnippet = LLVMTargetSpecific.get().getJumpInlineAsm();
InlineAssemblyConstraint inputConstraint = new InlineAssemblyConstraint(Type.Input, Location.register());
LLVMValueRef jump = builder.buildInlineAsm(inlineAsmType, asmSnippet, true, false, inputConstraint);
LLVMValueRef call = builder.buildCall(jump, address);
builder.setCallSiteAttribute(call, Attribute.GCLeafFunction);
}
Aggregations