switch (t->type) {
case MONO_TYPE_U1:
case MONO_TYPE_U2:
+ case MONO_TYPE_CHAR:
case MONO_TYPE_U4:
case MONO_TYPE_U8:
return TRUE;
type_to_llvm_arg_type (EmitContext *ctx, MonoType *t)
{
LLVMTypeRef ptype = type_to_llvm_type (ctx, t);
-
+
+ /*
+ * This works on all abis except arm64/ios which passes multiple
+ * arguments in one stack slot.
+ */
+#ifndef TARGET_ARM64
if (ptype == LLVMInt8Type () || ptype == LLVMInt16Type ()) {
/*
* LLVM generates code which only sets the lower bits, while JITted
*/
ptype = LLVMInt32Type ();
}
+#endif
return ptype;
}
ctx->values [reg] = LLVMBuildLoad (builder, ctx->addresses [reg], "");
}
} else {
- ctx->values [reg] = convert (ctx, ctx->values [reg], llvm_type_to_stack_type (type_to_llvm_type (ctx, sig->params [i])));
+ ctx->values [reg] = convert_full (ctx, ctx->values [reg], llvm_type_to_stack_type (type_to_llvm_type (ctx, sig->params [i])), type_is_unsigned (ctx, sig->params [i]));
}
}