未验证 提交 6ad78ff7 编写于 作者: F Fan Yang 提交者: GitHub

[Mono] Support get_Count and get_AllBitsSet for mini JIT on Arm64 (#84180)

* Support get_Count and get_AllBitsSet

* nint and nuint are 8 bytes on arm64 as well.

* Fix syntax
上级 7b645f78
......@@ -497,6 +497,7 @@ atomic_store_r4: dest:b src1:f len:28
atomic_store_r8: dest:b src1:f len:24
xbinop: dest:x src1:x src2:x len:8 clob:1
xzero: dest:x len:4
xones: dest:x len:8
xmove: dest:x src1:x len:4
xconst: dest:x len:10
xcompare: dest:x src1:x src2:x len:4
......
......@@ -3910,6 +3910,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_XZERO:
arm_neon_eor_16b (code, dreg, dreg, dreg);
break;
case OP_XONES:
arm_neon_eor_16b (code, dreg, dreg, dreg);
arm_neon_not_16b (code, dreg, dreg);
break;
case OP_XEXTRACT:
code = emit_xextract (code, VREG_FULL, ins->inst_c0, dreg, sreg1);
break;
......
......@@ -387,7 +387,7 @@ emit_simd_ins_for_binary_op (MonoCompile *cfg, MonoClass *klass, MonoMethodSigna
case SN_Multiply:
case SN_op_Multiply: {
#ifdef TARGET_ARM64
if (!COMPILE_LLVM (cfg) && (arg_type == MONO_TYPE_I8 || arg_type == MONO_TYPE_U8))
if (!COMPILE_LLVM (cfg) && (arg_type == MONO_TYPE_I8 || arg_type == MONO_TYPE_U8 || arg_type == MONO_TYPE_I || arg_type == MONO_TYPE_U))
return NULL;
#endif
if (fsig->params [1]->type != MONO_TYPE_GENERICINST)
......@@ -1950,32 +1950,10 @@ emit_vector64_vector128_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
return NULL;
#endif
// FIXME: This limitation could be removed once everything here are supported by mini JIT on arm64
// FIXME: Support Vector64 for mini JIT on arm64
#ifdef TARGET_ARM64
if (!COMPILE_LLVM (cfg)) {
if (!COMPILE_LLVM (cfg) && (size != 16))
return NULL;
if (size != 16)
return NULL;
switch (id) {
case SN_get_One:
case SN_get_Zero:
case SN_op_OnesComplement:
case SN_op_UnaryNegation:
case SN_op_UnaryPlus:
case SN_op_Addition:
case SN_op_Subtraction:
case SN_op_BitwiseAnd:
case SN_op_BitwiseOr:
case SN_op_ExclusiveOr:
case SN_op_Equality:
case SN_op_Inequality:
case SN_op_Division:
case SN_op_Multiply:
break;
default:
return NULL;
}
}
#endif
switch (id) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册