Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address review feedbacks
  • Loading branch information
fanyang-mono committed May 26, 2022
commit 3425bdf5c42b20ffe91db365bdbf1304b8255bf7
2 changes: 1 addition & 1 deletion src/mono/mono/mini/mini-amd64.c
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,7 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
return linfo;
}

if ((t->type == MONO_TYPE_GENERICINST) && !cfg->full_aot) {
if ((t->type == MONO_TYPE_GENERICINST) && !cfg->full_aot && !sig->pinvoke) {
MonoClass *klass = mono_class_from_mono_type_internal (t);
if (m_class_is_simd_type (klass)) {
linfo->args [i].storage = LLVMArgVtypeInSIMDReg;
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/mini-arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -2522,7 +2522,7 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
break;
}
case ArgVtypeInIRegs:
if ((t->type == MONO_TYPE_GENERICINST) && !cfg->full_aot) {
if ((t->type == MONO_TYPE_GENERICINST) && !cfg->full_aot && !sig->pinvoke) {
MonoClass *klass = mono_class_from_mono_type_internal (t);
if (m_class_is_simd_type (klass)) {
lainfo->storage = LLVMArgVtypeInSIMDReg;
Expand Down
1 change: 0 additions & 1 deletion src/mono/mono/mini/mini-generic-sharing.c
Original file line number Diff line number Diff line change
Expand Up @@ -3566,7 +3566,6 @@ mono_method_is_generic_sharable_full (MonoMethod *method, gboolean allow_type_va
}
}
}

}

if (mono_class_is_ginst (method->klass)) {
Expand Down
4 changes: 2 additions & 2 deletions src/mono/mono/mini/mini-llvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,7 @@ sig_to_llvm_sig_full (EmitContext *ctx, MonoMethodSignature *sig, LLVMCallInfo *
break;
case LLVMArgVtypeInSIMDReg: {
MonoClass *klass = mono_class_from_mono_type_internal (sig->params [i]);
param_types [pindex ++] = simd_class_to_llvm_type (ctx, klass);;
param_types [pindex ++] = simd_class_to_llvm_type (ctx, klass);
break;
}
case LLVMArgVtypeByVal:
Expand Down Expand Up @@ -3931,7 +3931,7 @@ emit_entry_bb (EmitContext *ctx, LLVMBuilderRef builder)
LLVMValueRef arg = LLVMGetParam (ctx->lmethod, pindex);

ctx->addresses [reg] = build_alloca_address (ctx, ainfo->type);
LLVMBuildStore (builder, arg, convert (ctx, ctx->addresses [reg]->value, LLVMPointerType (LLVMTypeOf (arg), 0)));
LLVMBuildStore (builder, arg, build_ptr_cast (builder, ctx->addresses [reg]->value, pointer_type(LLVMTypeOf (arg))));
break;
}
case LLVMArgVtypeByVal: {
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/mini.h
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ typedef enum {
LLVMArgInFPReg,
/* Valuetype passed in 1-2 consecutive register */
LLVMArgVtypeInReg,
/* Pass Vector128 in SIMD registers */
/* Pass vector types in SIMD registers */
LLVMArgVtypeInSIMDReg,
LLVMArgVtypeByVal,
LLVMArgVtypeRetAddr, /* On on cinfo->ret */
Expand Down