Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion src/mono/mono/mini/mini-llvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -11304,7 +11304,7 @@ MONO_RESTORE_WARNING
break;
}
#endif
#if defined(TARGET_ARM64) || defined(TARGET_AMD64)
#if defined(TARGET_ARM64) || defined(TARGET_AMD64) || defined(TARGET_WASM)
case OP_BSL: {
LLVMTypeRef ret_t = LLVMTypeOf (rhs);
LLVMValueRef select = bitcast_to_integral (ctx, lhs);
Expand All @@ -11317,6 +11317,8 @@ MONO_RESTORE_WARNING
values [ins->dreg] = result;
break;
}
#endif
#if defined(TARGET_ARM64) || defined(TARGET_AMD64)
case OP_NEGATION:
case OP_NEGATION_SCALAR: {
gboolean scalar = ins->opcode == OP_NEGATION_SCALAR;
Expand Down
5 changes: 4 additions & 1 deletion src/mono/mono/mini/mini-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,6 @@ MINI_OP(OP_WASM_ONESCOMPLEMENT, "wasm_onescomplement", XREG, XREG, NONE)
#endif

#if defined(TARGET_ARM64) || defined(TARGET_AMD64)
MINI_OP3(OP_BSL, "bitwise_select", XREG, XREG, XREG, XREG)
MINI_OP(OP_NEGATION, "negate", XREG, XREG, NONE)
MINI_OP(OP_NEGATION_SCALAR, "negate_scalar", XREG, XREG, NONE)
MINI_OP(OP_ONES_COMPLEMENT, "ones_complement", XREG, XREG, NONE)
Expand All @@ -1783,3 +1782,7 @@ MINI_OP(OP_CVT_SI_FP, "convert_si_to_fp", XREG, XREG, NONE)
MINI_OP(OP_CVT_UI_FP_SCALAR, "convert_ui_to_fp_scalar", XREG, XREG, NONE)
MINI_OP(OP_CVT_SI_FP_SCALAR, "convert_si_to_fp_scalar", XREG, XREG, NONE)
#endif // TARGET_ARM64 || TARGET_AMD64

#if defined(TARGET_ARM64) || defined(TARGET_AMD64) || defined(TARGET_WASM)
MINI_OP3(OP_BSL, "bitwise_select", XREG, XREG, XREG, XREG)
#endif // TARGET_ARM64 || TARGET_AMD64 || TARGET_WASM
2 changes: 1 addition & 1 deletion src/mono/mono/mini/simd-intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
#endif
}
case SN_ConditionalSelect: {
#if defined(TARGET_ARM64) || defined(TARGET_AMD64)
#if defined(TARGET_ARM64) || defined(TARGET_AMD64) || defined(TARGET_WASM)
if (!is_element_type_primitive (fsig->params [0]))
return NULL;
return emit_simd_ins_for_sig (cfg, klass, OP_BSL, -1, arg0_type, fsig, args);
Expand Down