use of com.oracle.svm.core.graal.llvm.util.LLVMIRBuilder.InlineAssemblyConstraint.Type in project graal by oracle.
the class LLVMGenerator method getLLVMFunctionArgTypes.
private LLVMTypeRef[] getLLVMFunctionArgTypes(ResolvedJavaMethod method, boolean forMainFunction) {
ResolvedJavaType receiver = method.hasReceiver() ? method.getDeclaringClass() : null;
JavaType[] javaParameterTypes = method.getSignature().toParameterTypes(receiver);
LLVMTypeRef[] parameterTypes = Arrays.stream(javaParameterTypes).map(type -> getLLVMStackType(getTypeKind(type.resolve(null), forMainFunction))).toArray(LLVMTypeRef[]::new);
LLVMTypeRef[] newParameterTypes = parameterTypes;
if (!isEntryPoint(method) && SpecialRegister.count() > 0) {
newParameterTypes = new LLVMTypeRef[SpecialRegister.count() + parameterTypes.length];
for (SpecialRegister reg : SpecialRegister.registers()) {
newParameterTypes[reg.index] = builder.wordType();
}
System.arraycopy(parameterTypes, 0, newParameterTypes, SpecialRegister.count(), parameterTypes.length);
}
return newParameterTypes;
}
Aggregations