Implement SIMD latest opcodes and update LLVM to 13.0 (#758)

Implement the latest SIMD opcodes and update LLVM 13.0,
update the llvm build scripts, update the sample workloads‘ build scripts,
and build customized wasi-sdk to build some workloads.
Also refine the CI rules.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Wenyong Huang
2021-09-17 19:12:57 +08:00
committed by GitHub
parent 7e60a5db8d
commit 7be0d385a6
82 changed files with 5266 additions and 4698 deletions

View File

@ -296,18 +296,18 @@ typedef enum WASMMiscEXTOpcode {
typedef enum WASMSimdEXTOpcode {
/* memory instruction */
SIMD_v128_load = 0x00,
SIMD_i16x8_load8x8_s = 0x01,
SIMD_i16x8_load8x8_u = 0x02,
SIMD_i32x4_load16x4_s = 0x03,
SIMD_i32x4_load16x4_u = 0x04,
SIMD_i64x2_load32x2_s = 0x05,
SIMD_i64x2_load32x2_u = 0x06,
SIMD_v8x16_load_splat = 0x07,
SIMD_v16x8_load_splat = 0x08,
SIMD_v32x4_load_splat = 0x09,
SIMD_v64x2_load_splat = 0x0a,
SIMD_v128_store = 0x0b,
SIMD_v128_load = 0x00,
SIMD_v128_load8x8_s = 0x01,
SIMD_v128_load8x8_u = 0x02,
SIMD_v128_load16x4_s = 0x03,
SIMD_v128_load16x4_u = 0x04,
SIMD_v128_load32x2_s = 0x05,
SIMD_v128_load32x2_u = 0x06,
SIMD_v128_load8_splat = 0x07,
SIMD_v128_load16_splat = 0x08,
SIMD_v128_load32_splat = 0x09,
SIMD_v128_load64_splat = 0x0a,
SIMD_v128_store = 0x0b,
/* basic operation */
SIMD_v128_const = 0x0c,
@ -391,107 +391,170 @@ typedef enum WASMSimdEXTOpcode {
SIMD_f64x2_ge = 0x4c,
/* v128 operation */
SIMD_v128_not = 0x4d,
SIMD_v128_and = 0x4e,
SIMD_v128_andnot = 0x4f,
SIMD_v128_or = 0x50,
SIMD_v128_xor = 0x51,
SIMD_v128_not = 0x4d,
SIMD_v128_and = 0x4e,
SIMD_v128_andnot = 0x4f,
SIMD_v128_or = 0x50,
SIMD_v128_xor = 0x51,
SIMD_v128_bitselect = 0x52,
SIMD_v128_any_true = 0x53,
/* Load Lane Operation */
SIMD_v128_load8_lane = 0x54,
SIMD_v128_load16_lane = 0x55,
SIMD_v128_load32_lane = 0x56,
SIMD_v128_load64_lane = 0x57,
SIMD_v128_store8_lane = 0x58,
SIMD_v128_store16_lane = 0x59,
SIMD_v128_store32_lane = 0x5a,
SIMD_v128_store64_lane = 0x5b,
SIMD_v128_load32_zero = 0x5c,
SIMD_v128_load64_zero = 0x5d,
/* Float conversion */
SIMD_f32x4_demote_f64x2_zero = 0x5e,
SIMD_f64x2_promote_low_f32x4_zero = 0x5f,
/* i8x16 Operation */
SIMD_i8x16_abs = 0x60,
SIMD_i8x16_neg = 0x61,
SIMD_i8x16_any_true = 0x62,
SIMD_i8x16_popcnt = 0x62,
SIMD_i8x16_all_true = 0x63,
SIMD_i8x16_bitmask = 0x64,
SIMD_i8x16_narrow_i16x8_s = 0x65,
SIMD_i8x16_narrow_i16x8_u = 0x66,
SIMD_f32x4_ceil = 0x67,
SIMD_f32x4_floor = 0x68,
SIMD_f32x4_trunc = 0x69,
SIMD_f32x4_nearest = 0x6a,
SIMD_i8x16_shl = 0x6b,
SIMD_i8x16_shr_s = 0x6c,
SIMD_i8x16_shr_u = 0x6d,
SIMD_i8x16_add = 0x6e,
SIMD_i8x16_add_saturate_s = 0x6f,
SIMD_i8x16_add_saturate_u = 0x70,
SIMD_i8x16_add_sat_s = 0x6f,
SIMD_i8x16_add_sat_u = 0x70,
SIMD_i8x16_sub = 0x71,
SIMD_i8x16_sub_saturate_s = 0x72,
SIMD_i8x16_sub_saturate_u = 0x73,
SIMD_i8x16_sub_sat_s = 0x72,
SIMD_i8x16_sub_sat_u = 0x73,
SIMD_f64x2_ceil = 0x74,
SIMD_f64x2_floor = 0x75,
SIMD_i8x16_min_s = 0x76,
SIMD_i8x16_min_u = 0x77,
SIMD_i8x16_max_s = 0x78,
SIMD_i8x16_max_u = 0x79,
SIMD_f64x2_trunc = 0x7a,
SIMD_i8x16_avgr_u = 0x7b,
SIMD_i16x8_extadd_pairwise_i8x16_s = 0x7c,
SIMD_i16x8_extadd_pairwise_i8x16_u = 0x7d,
SIMD_i32x4_extadd_pairwise_i16x8_s = 0x7e,
SIMD_i32x4_extadd_pairwise_i16x8_u = 0x7f,
/* i16x8 operation */
SIMD_i16x8_abs = 0x80,
SIMD_i16x8_neg = 0x81,
SIMD_i16x8_any_true = 0x82,
SIMD_i16x8_q15mulr_sat_s = 0x82,
SIMD_i16x8_all_true = 0x83,
SIMD_i16x8_bitmask = 0x84,
SIMD_i16x8_narrow_i32x4_s = 0x85,
SIMD_i16x8_narrow_i32x4_u = 0x86,
SIMD_i16x8_widen_low_i8x16_s = 0x87,
SIMD_i16x8_widen_high_i8x16_s = 0x88,
SIMD_i16x8_widen_low_i8x16_u = 0x89,
SIMD_i16x8_widen_high_i8x16_u = 0x8a,
SIMD_i16x8_extend_low_i8x16_s = 0x87,
SIMD_i16x8_extend_high_i8x16_s = 0x88,
SIMD_i16x8_extend_low_i8x16_u = 0x89,
SIMD_i16x8_extend_high_i8x16_u = 0x8a,
SIMD_i16x8_shl = 0x8b,
SIMD_i16x8_shr_s = 0x8c,
SIMD_i16x8_shr_u = 0x8d,
SIMD_i16x8_add = 0x8e,
SIMD_i16x8_add_saturate_s = 0x8f,
SIMD_i16x8_add_saturate_u = 0x90,
SIMD_i16x8_add_sat_s = 0x8f,
SIMD_i16x8_add_sat_u = 0x90,
SIMD_i16x8_sub = 0x91,
SIMD_i16x8_sub_saturate_s = 0x92,
SIMD_i16x8_sub_saturate_u = 0x93,
SIMD_i16x8_sub_sat_s = 0x92,
SIMD_i16x8_sub_sat_u = 0x93,
SIMD_f64x2_nearest = 0x94,
SIMD_i16x8_mul = 0x95,
SIMD_i16x8_min_s = 0x96,
SIMD_i16x8_min_u = 0x97,
SIMD_i16x8_max_s = 0x98,
SIMD_i16x8_max_u = 0x99,
/* placeholder = 0x9a */
SIMD_i16x8_avgr_u = 0x9b,
SIMD_i16x8_extmul_low_i8x16_s = 0x9c,
SIMD_i16x8_extmul_high_i8x16_s = 0x9d,
SIMD_i16x8_extmul_low_i8x16_u = 0x9e,
SIMD_i16x8_extmul_high_i8x16_u = 0x9f,
/* i32x4 operation */
SIMD_i32x4_abs = 0xa0,
SIMD_i32x4_neg = 0xa1,
SIMD_i32x4_any_true = 0xa2,
/* placeholder = 0xa2 */
SIMD_i32x4_all_true = 0xa3,
SIMD_i32x4_bitmask = 0xa4,
SIMD_i32x4_widen_low_i16x8_s = 0xa7,
SIMD_i32x4_widen_high_i16x8_s = 0xa8,
SIMD_i32x4_widen_low_i16x8_u = 0xa9,
SIMD_i32x4_widen_high_i16x8_u = 0xaa,
SIMD_i32x4_narrow_i64x2_s = 0xa5,
SIMD_i32x4_narrow_i64x2_u = 0xa6,
SIMD_i32x4_extend_low_i16x8_s = 0xa7,
SIMD_i32x4_extend_high_i16x8_s = 0xa8,
SIMD_i32x4_extend_low_i16x8_u = 0xa9,
SIMD_i32x4_extend_high_i16x8_u = 0xaa,
SIMD_i32x4_shl = 0xab,
SIMD_i32x4_shr_s = 0xac,
SIMD_i32x4_shr_u = 0xad,
SIMD_i32x4_add = 0xae,
SIMD_i32x4_add_sat_s = 0xaf,
SIMD_i32x4_add_sat_u = 0xb0,
SIMD_i32x4_sub = 0xb1,
SIMD_i32x4_sub_sat_s = 0xb2,
SIMD_i32x4_sub_sat_u = 0xb3,
/* placeholder = 0xb4 */
SIMD_i32x4_mul = 0xb5,
SIMD_i32x4_min_s = 0xb6,
SIMD_i32x4_min_u = 0xb7,
SIMD_i32x4_max_s = 0xb8,
SIMD_i32x4_max_u = 0xb9,
SIMD_i32x4_dot_i16x8_s = 0xba,
SIMD_i32x4_avgr_u = 0xbb,
SIMD_i32x4_extmul_low_i16x8_s = 0xbc,
SIMD_i32x4_extmul_high_i16x8_s = 0xbd,
SIMD_i32x4_extmul_low_i16x8_u = 0xbe,
SIMD_i32x4_extmul_high_i16x8_u = 0xbf,
/* i64x2 operation */
SIMD_i64x2_neg = 0xc1,
SIMD_i64x2_shl = 0xcb,
SIMD_i64x2_shr_s = 0xcc,
SIMD_i64x2_shr_u = 0xcd,
SIMD_i64x2_add = 0xce,
SIMD_i64x2_sub = 0xd1,
SIMD_i64x2_mul = 0xd5,
/* float ceil/floor/trunc/nearest */
SIMD_f32x4_ceil = 0xd8,
SIMD_f32x4_floor = 0xd9,
SIMD_f32x4_trunc = 0xda,
SIMD_f32x4_nearest = 0xdb,
SIMD_f64x2_ceil = 0xdc,
SIMD_f64x2_floor = 0xdd,
SIMD_f64x2_trunc = 0xde,
SIMD_f64x2_nearest = 0xdf,
SIMD_i64x2_abs = 0xc0,
SIMD_i64x2_neg = 0xc1,
/* placeholder = 0xc2 */
SIMD_i64x2_all_true = 0xc3,
SIMD_i64x2_bitmask = 0xc4,
/* placeholder = 0xc5 */
/* placeholder = 0xc6 */
SIMD_i64x2_extend_low_i32x4_s = 0xc7,
SIMD_i64x2_extend_high_i32x4_s = 0xc8,
SIMD_i64x2_extend_low_i32x4_u = 0xc9,
SIMD_i64x2_extend_high_i32x4_u = 0xca,
SIMD_i64x2_shl = 0xcb,
SIMD_i64x2_shr_s = 0xcc,
SIMD_i64x2_shr_u = 0xcd,
SIMD_i64x2_add = 0xce,
/* placeholder = 0xcf */
/* placeholder = 0xd0 */
SIMD_i64x2_sub = 0xd1,
/* placeholder = 0xd2 */
/* placeholder = 0xd3 */
/* placeholder = 0xd4 */
SIMD_i64x2_mul = 0xd5,
SIMD_i64x2_eq = 0xd6,
SIMD_i64x2_ne = 0xd7,
SIMD_i64x2_lt_s = 0xd8,
SIMD_i64x2_gt_s = 0xd9,
SIMD_i64x2_le_s = 0xda,
SIMD_i64x2_ge_s = 0xdb,
SIMD_i64x2_extmul_low_i32x4_s = 0xdc,
SIMD_i64x2_extmul_high_i32x4_s = 0xdd,
SIMD_i64x2_extmul_low_i32x4_u = 0xde,
SIMD_i64x2_extmul_high_i32x4_u = 0xdf,
/* f32x4 operation */
SIMD_f32x4_abs = 0xe0,
SIMD_f32x4_neg = 0xe1,
SIMD_f32x4_round = 0xe2,
SIMD_f32x4_sqrt = 0xe3,
SIMD_f32x4_add = 0xe4,
SIMD_f32x4_sub = 0xe5,
@ -499,10 +562,13 @@ typedef enum WASMSimdEXTOpcode {
SIMD_f32x4_div = 0xe7,
SIMD_f32x4_min = 0xe8,
SIMD_f32x4_max = 0xe9,
SIMD_f32x4_pmin = 0xea,
SIMD_f32x4_pmax = 0xeb,
/* f64x2 operation */
SIMD_f64x2_abs = 0xec,
SIMD_f64x2_neg = 0xed,
SIMD_f64x2_round = 0xee,
SIMD_f64x2_sqrt = 0xef,
SIMD_f64x2_add = 0xf0,
SIMD_f64x2_sub = 0xf1,
@ -510,12 +576,18 @@ typedef enum WASMSimdEXTOpcode {
SIMD_f64x2_div = 0xf3,
SIMD_f64x2_min = 0xf4,
SIMD_f64x2_max = 0xf5,
SIMD_f64x2_pmin = 0xf6,
SIMD_f64x2_pmax = 0xf7,
/* conversion operation */
SIMD_i32x4_trunc_sat_f32x4_s = 0xf8,
SIMD_i32x4_trunc_sat_f32x4_u = 0xf9,
SIMD_f32x4_convert_i32x4_s = 0xfa,
SIMD_f32x4_convert_i32x4_u = 0xfb,
SIMD_i32x4_trunc_sat_f32x4_s = 0xf8,
SIMD_i32x4_trunc_sat_f32x4_u = 0xf9,
SIMD_f32x4_convert_i32x4_s = 0xfa,
SIMD_f32x4_convert_i32x4_u = 0xfb,
SIMD_i32x4_trunc_sat_f64x2_s_zero = 0xfc,
SIMD_i32x4_trunc_sat_f64x2_u_zero = 0xfd,
SIMD_f64x2_convert_low_i32x4_s = 0xfe,
SIMD_f64x2_convert_low_i32x4_u = 0xff,
} WASMSimdEXTOpcode;
typedef enum WASMAtomicEXTOpcode {