Sync simd opcode definitions spec (#3290)
Remove undefined simd opcodes.
This commit is contained in:
@ -3452,16 +3452,6 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index)
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_i32x4_narrow_i64x2_s:
|
||||
case SIMD_i32x4_narrow_i64x2_u:
|
||||
{
|
||||
if (!aot_compile_simd_i32x4_narrow_i64x2(
|
||||
comp_ctx, func_ctx,
|
||||
SIMD_i32x4_narrow_i64x2_s == opcode))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_i32x4_extend_low_i16x8_s:
|
||||
case SIMD_i32x4_extend_high_i16x8_s:
|
||||
{
|
||||
@ -3501,16 +3491,6 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index)
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_i32x4_add_sat_s:
|
||||
case SIMD_i32x4_add_sat_u:
|
||||
{
|
||||
if (!aot_compile_simd_i32x4_saturate(
|
||||
comp_ctx, func_ctx, V128_ADD,
|
||||
opcode == SIMD_i32x4_add_sat_s))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_i32x4_sub:
|
||||
{
|
||||
if (!aot_compile_simd_i32x4_arith(comp_ctx, func_ctx,
|
||||
@ -3519,16 +3499,6 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index)
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_i32x4_sub_sat_s:
|
||||
case SIMD_i32x4_sub_sat_u:
|
||||
{
|
||||
if (!aot_compile_simd_i32x4_saturate(
|
||||
comp_ctx, func_ctx, V128_SUB,
|
||||
opcode == SIMD_i32x4_add_sat_s))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_i32x4_mul:
|
||||
{
|
||||
if (!aot_compile_simd_i32x4_arith(comp_ctx, func_ctx,
|
||||
@ -3565,13 +3535,6 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index)
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_i32x4_avgr_u:
|
||||
{
|
||||
if (!aot_compile_simd_i32x4_avgr_u(comp_ctx, func_ctx))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_i32x4_extmul_low_i16x8_s:
|
||||
case SIMD_i32x4_extmul_high_i16x8_s:
|
||||
{
|
||||
@ -3728,13 +3691,6 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index)
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_f32x4_round:
|
||||
{
|
||||
if (!aot_compile_simd_f32x4_round(comp_ctx, func_ctx))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_f32x4_sqrt:
|
||||
{
|
||||
if (!aot_compile_simd_f32x4_sqrt(comp_ctx, func_ctx))
|
||||
@ -3788,13 +3744,6 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index)
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_f64x2_round:
|
||||
{
|
||||
if (!aot_compile_simd_f64x2_round(comp_ctx, func_ctx))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
case SIMD_f64x2_sqrt:
|
||||
{
|
||||
if (!aot_compile_simd_f64x2_sqrt(comp_ctx, func_ctx))
|
||||
|
||||
@ -226,15 +226,6 @@ aot_compile_simd_i16x8_narrow_i32x4(AOTCompContext *comp_ctx,
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
aot_compile_simd_i32x4_narrow_i64x2(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx, bool is_signed)
|
||||
{
|
||||
/* TODO: x86 intrinsics */
|
||||
return simd_integer_narrow_common(comp_ctx, func_ctx, e_sat_i64x2,
|
||||
is_signed);
|
||||
}
|
||||
|
||||
enum integer_extend_type {
|
||||
e_ext_i8x16,
|
||||
e_ext_i16x8,
|
||||
|
||||
@ -20,10 +20,6 @@ bool
|
||||
aot_compile_simd_i16x8_narrow_i32x4(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx, bool is_signed);
|
||||
|
||||
bool
|
||||
aot_compile_simd_i32x4_narrow_i64x2(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx, bool is_signed);
|
||||
|
||||
bool
|
||||
aot_compile_simd_i16x8_extend_i8x16(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx, bool is_low,
|
||||
|
||||
@ -129,20 +129,6 @@ aot_compile_simd_f64x2_abs(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx)
|
||||
"llvm.fabs.v2f64");
|
||||
}
|
||||
|
||||
bool
|
||||
aot_compile_simd_f32x4_round(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx)
|
||||
{
|
||||
return simd_float_intrinsic(comp_ctx, func_ctx, V128_f32x4_TYPE,
|
||||
"llvm.round.v4f32");
|
||||
}
|
||||
|
||||
bool
|
||||
aot_compile_simd_f64x2_round(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx)
|
||||
{
|
||||
return simd_float_intrinsic(comp_ctx, func_ctx, V128_f64x2_TYPE,
|
||||
"llvm.round.v2f64");
|
||||
}
|
||||
|
||||
bool
|
||||
aot_compile_simd_f32x4_sqrt(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx)
|
||||
{
|
||||
|
||||
@ -32,14 +32,6 @@ aot_compile_simd_f32x4_abs(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx);
|
||||
bool
|
||||
aot_compile_simd_f64x2_abs(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx);
|
||||
|
||||
bool
|
||||
aot_compile_simd_f32x4_round(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx);
|
||||
|
||||
bool
|
||||
aot_compile_simd_f64x2_round(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx);
|
||||
|
||||
bool
|
||||
aot_compile_simd_f32x4_sqrt(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx);
|
||||
|
||||
|
||||
@ -243,7 +243,6 @@ aot_compile_simd_i64x2_abs(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx)
|
||||
enum integer_avgr_u {
|
||||
e_avgr_u_i8x16,
|
||||
e_avgr_u_i16x8,
|
||||
e_avgr_u_i32x4,
|
||||
};
|
||||
|
||||
/* TODO: try int_x86_mmx_pavg_b and int_x86_mmx_pavg_w */
|
||||
@ -257,9 +256,8 @@ simd_v128_avg(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
LLVMTypeRef vector_type[] = {
|
||||
V128_i8x16_TYPE,
|
||||
V128_i16x8_TYPE,
|
||||
V128_i32x4_TYPE,
|
||||
};
|
||||
unsigned lanes[] = { 16, 8, 4 };
|
||||
unsigned lanes[] = { 16, 8 };
|
||||
|
||||
if (!(rhs = simd_pop_v128_and_bitcast(comp_ctx, func_ctx,
|
||||
vector_type[itype], "rhs"))
|
||||
@ -325,13 +323,6 @@ aot_compile_simd_i16x8_avgr_u(AOTCompContext *comp_ctx,
|
||||
return simd_v128_avg(comp_ctx, func_ctx, e_avgr_u_i16x8);
|
||||
}
|
||||
|
||||
bool
|
||||
aot_compile_simd_i32x4_avgr_u(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx)
|
||||
{
|
||||
return simd_v128_avg(comp_ctx, func_ctx, e_avgr_u_i32x4);
|
||||
}
|
||||
|
||||
bool
|
||||
aot_compile_simd_i32x4_dot_i16x8(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx)
|
||||
|
||||
@ -76,10 +76,6 @@ bool
|
||||
aot_compile_simd_i16x8_avgr_u(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx);
|
||||
|
||||
bool
|
||||
aot_compile_simd_i32x4_avgr_u(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx);
|
||||
|
||||
bool
|
||||
aot_compile_simd_i32x4_dot_i16x8(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx);
|
||||
|
||||
@ -64,18 +64,3 @@ aot_compile_simd_i16x8_saturate(AOTCompContext *comp_ctx,
|
||||
is_signed ? intrinsics[arith_op][0]
|
||||
: intrinsics[arith_op][1]);
|
||||
}
|
||||
|
||||
bool
|
||||
aot_compile_simd_i32x4_saturate(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx,
|
||||
V128Arithmetic arith_op, bool is_signed)
|
||||
{
|
||||
char *intrinsics[][2] = {
|
||||
{ "llvm.sadd.sat.v4i32", "llvm.uadd.sat.v4i32" },
|
||||
{ "llvm.ssub.sat.v4i32", "llvm.usub.sat.v4i32" },
|
||||
};
|
||||
|
||||
return simd_sat_int_arith(comp_ctx, func_ctx, V128_i16x8_TYPE,
|
||||
is_signed ? intrinsics[arith_op][0]
|
||||
: intrinsics[arith_op][1]);
|
||||
}
|
||||
|
||||
@ -22,10 +22,6 @@ aot_compile_simd_i16x8_saturate(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx,
|
||||
V128Arithmetic arith_op, bool is_signed);
|
||||
|
||||
bool
|
||||
aot_compile_simd_i32x4_saturate(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx,
|
||||
V128Arithmetic arith_op, bool is_signed);
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user