Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Fix linting issues related to the simd macro (#307)
Browse files Browse the repository at this point in the history
* call the macro with `{}` instead of `()`
  • Loading branch information
chevdor authored Jul 28, 2021
1 parent 207dd2a commit 6715774
Showing 1 changed file with 133 additions and 133 deletions.
266 changes: 133 additions & 133 deletions src/elements/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2148,12 +2148,12 @@ impl Serialize for SimdInstruction {
V128Const(ref c) => simd!(writer, V128_CONST, writer.write(&c[..])?),
V128Load(m) => simd!(writer, V128_LOAD, MemArg::serialize(m, writer)?),
V128Store(m) => simd!(writer, V128_STORE, MemArg::serialize(m, writer)?),
I8x16Splat => simd!(writer, I8X16_SPLAT, ()),
I16x8Splat => simd!(writer, I16X8_SPLAT, ()),
I32x4Splat => simd!(writer, I32X4_SPLAT, ()),
I64x2Splat => simd!(writer, I64X2_SPLAT, ()),
F32x4Splat => simd!(writer, F32X4_SPLAT, ()),
F64x2Splat => simd!(writer, F64X2_SPLAT, ()),
I8x16Splat => simd!(writer, I8X16_SPLAT, {}),
I16x8Splat => simd!(writer, I16X8_SPLAT, {}),
I32x4Splat => simd!(writer, I32X4_SPLAT, {}),
I64x2Splat => simd!(writer, I64X2_SPLAT, {}),
F32x4Splat => simd!(writer, F32X4_SPLAT, {}),
F64x2Splat => simd!(writer, F64X2_SPLAT, {}),
I8x16ExtractLaneS(i) => simd!(writer, I8X16_EXTRACT_LANE_S, writer.write(&[i])?),
I8x16ExtractLaneU(i) => simd!(writer, I8X16_EXTRACT_LANE_U, writer.write(&[i])?),
I16x8ExtractLaneS(i) => simd!(writer, I16X8_EXTRACT_LANE_S, writer.write(&[i])?),
Expand All @@ -2169,133 +2169,133 @@ impl Serialize for SimdInstruction {
F32x4ReplaceLane(i) => simd!(writer, F32X4_REPLACE_LANE, writer.write(&[i])?),
F64x2ReplaceLane(i) => simd!(writer, F64X2_REPLACE_LANE, writer.write(&[i])?),
V8x16Shuffle(ref i) => simd!(writer, V8X16_SHUFFLE, writer.write(&i[..])?),
I8x16Add => simd!(writer, I8X16_ADD, ()),
I16x8Add => simd!(writer, I16X8_ADD, ()),
I32x4Add => simd!(writer, I32X4_ADD, ()),
I64x2Add => simd!(writer, I64X2_ADD, ()),
I8x16Sub => simd!(writer, I8X16_SUB, ()),
I16x8Sub => simd!(writer, I16X8_SUB, ()),
I32x4Sub => simd!(writer, I32X4_SUB, ()),
I64x2Sub => simd!(writer, I64X2_SUB, ()),
I8x16Mul => simd!(writer, I8X16_MUL, ()),
I16x8Mul => simd!(writer, I16X8_MUL, ()),
I32x4Mul => simd!(writer, I32X4_MUL, ()),
// I64x2Mul => simd!(writer, I64X2_MUL, ()),
I8x16Neg => simd!(writer, I8X16_NEG, ()),
I16x8Neg => simd!(writer, I16X8_NEG, ()),
I32x4Neg => simd!(writer, I32X4_NEG, ()),
I64x2Neg => simd!(writer, I64X2_NEG, ()),
I8x16AddSaturateS => simd!(writer, I8X16_ADD_SATURATE_S, ()),
I8x16AddSaturateU => simd!(writer, I8X16_ADD_SATURATE_U, ()),
I16x8AddSaturateS => simd!(writer, I16X8_ADD_SATURATE_S, ()),
I16x8AddSaturateU => simd!(writer, I16X8_ADD_SATURATE_U, ()),
I8x16SubSaturateS => simd!(writer, I8X16_SUB_SATURATE_S, ()),
I8x16SubSaturateU => simd!(writer, I8X16_SUB_SATURATE_U, ()),
I16x8SubSaturateS => simd!(writer, I16X8_SUB_SATURATE_S, ()),
I16x8SubSaturateU => simd!(writer, I16X8_SUB_SATURATE_U, ()),
I8x16Shl => simd!(writer, I8X16_SHL, ()),
I16x8Shl => simd!(writer, I16X8_SHL, ()),
I32x4Shl => simd!(writer, I32X4_SHL, ()),
I64x2Shl => simd!(writer, I64X2_SHL, ()),
I8x16ShrS => simd!(writer, I8X16_SHR_S, ()),
I8x16ShrU => simd!(writer, I8X16_SHR_U, ()),
I16x8ShrS => simd!(writer, I16X8_SHR_S, ()),
I16x8ShrU => simd!(writer, I16X8_SHR_U, ()),
I32x4ShrU => simd!(writer, I32X4_SHR_U, ()),
I32x4ShrS => simd!(writer, I32X4_SHR_S, ()),
I64x2ShrU => simd!(writer, I64X2_SHR_U, ()),
I64x2ShrS => simd!(writer, I64X2_SHR_S, ()),
V128And => simd!(writer, V128_AND, ()),
V128Or => simd!(writer, V128_OR, ()),
V128Xor => simd!(writer, V128_XOR, ()),
V128Not => simd!(writer, V128_NOT, ()),
V128Bitselect => simd!(writer, V128_BITSELECT, ()),
I8x16AnyTrue => simd!(writer, I8X16_ANY_TRUE, ()),
I16x8AnyTrue => simd!(writer, I16X8_ANY_TRUE, ()),
I32x4AnyTrue => simd!(writer, I32X4_ANY_TRUE, ()),
I64x2AnyTrue => simd!(writer, I64X2_ANY_TRUE, ()),
I8x16AllTrue => simd!(writer, I8X16_ALL_TRUE, ()),
I16x8AllTrue => simd!(writer, I16X8_ALL_TRUE, ()),
I32x4AllTrue => simd!(writer, I32X4_ALL_TRUE, ()),
I64x2AllTrue => simd!(writer, I64X2_ALL_TRUE, ()),
I8x16Eq => simd!(writer, I8X16_EQ, ()),
I16x8Eq => simd!(writer, I16X8_EQ, ()),
I32x4Eq => simd!(writer, I32X4_EQ, ()),
// I64x2Eq => simd!(writer, I64X2_EQ, ()),
F32x4Eq => simd!(writer, F32X4_EQ, ()),
F64x2Eq => simd!(writer, F64X2_EQ, ()),
I8x16Ne => simd!(writer, I8X16_NE, ()),
I16x8Ne => simd!(writer, I16X8_NE, ()),
I32x4Ne => simd!(writer, I32X4_NE, ()),
// I64x2Ne => simd!(writer, I64X2_NE, ()),
F32x4Ne => simd!(writer, F32X4_NE, ()),
F64x2Ne => simd!(writer, F64X2_NE, ()),
I8x16LtS => simd!(writer, I8X16_LT_S, ()),
I8x16LtU => simd!(writer, I8X16_LT_U, ()),
I16x8LtS => simd!(writer, I16X8_LT_S, ()),
I16x8LtU => simd!(writer, I16X8_LT_U, ()),
I32x4LtS => simd!(writer, I32X4_LT_S, ()),
I32x4LtU => simd!(writer, I32X4_LT_U, ()),
// I64x2LtS => simd!(writer, I64X2_LT_S, ()),
// I64x2LtU => simd!(writer, I64X2_LT_U, ()),
F32x4Lt => simd!(writer, F32X4_LT, ()),
F64x2Lt => simd!(writer, F64X2_LT, ()),
I8x16LeS => simd!(writer, I8X16_LE_S, ()),
I8x16LeU => simd!(writer, I8X16_LE_U, ()),
I16x8LeS => simd!(writer, I16X8_LE_S, ()),
I16x8LeU => simd!(writer, I16X8_LE_U, ()),
I32x4LeS => simd!(writer, I32X4_LE_S, ()),
I32x4LeU => simd!(writer, I32X4_LE_U, ()),
// I64x2LeS => simd!(writer, I64X2_LE_S, ()),
// I64x2LeU => simd!(writer, I64X2_LE_U, ()),
F32x4Le => simd!(writer, F32X4_LE, ()),
F64x2Le => simd!(writer, F64X2_LE, ()),
I8x16GtS => simd!(writer, I8X16_GT_S, ()),
I8x16GtU => simd!(writer, I8X16_GT_U, ()),
I16x8GtS => simd!(writer, I16X8_GT_S, ()),
I16x8GtU => simd!(writer, I16X8_GT_U, ()),
I32x4GtS => simd!(writer, I32X4_GT_S, ()),
I32x4GtU => simd!(writer, I32X4_GT_U, ()),
// I64x2GtS => simd!(writer, I64X2_GT_S, ()),
// I64x2GtU => simd!(writer, I64X2_GT_U, ()),
F32x4Gt => simd!(writer, F32X4_GT, ()),
F64x2Gt => simd!(writer, F64X2_GT, ()),
I8x16GeS => simd!(writer, I8X16_GE_S, ()),
I8x16GeU => simd!(writer, I8X16_GE_U, ()),
I16x8GeS => simd!(writer, I16X8_GE_S, ()),
I16x8GeU => simd!(writer, I16X8_GE_U, ()),
I32x4GeS => simd!(writer, I32X4_GE_S, ()),
I32x4GeU => simd!(writer, I32X4_GE_U, ()),
// I64x2GeS => simd!(writer, I64X2_GE_S, ()),
// I64x2GeU => simd!(writer, I64X2_GE_U, ()),
F32x4Ge => simd!(writer, F32X4_GE, ()),
F64x2Ge => simd!(writer, F64X2_GE, ()),
F32x4Neg => simd!(writer, F32X4_NEG, ()),
F64x2Neg => simd!(writer, F64X2_NEG, ()),
F32x4Abs => simd!(writer, F32X4_ABS, ()),
F64x2Abs => simd!(writer, F64X2_ABS, ()),
F32x4Min => simd!(writer, F32X4_MIN, ()),
F64x2Min => simd!(writer, F64X2_MIN, ()),
F32x4Max => simd!(writer, F32X4_MAX, ()),
F64x2Max => simd!(writer, F64X2_MAX, ()),
F32x4Add => simd!(writer, F32X4_ADD, ()),
F64x2Add => simd!(writer, F64X2_ADD, ()),
F32x4Sub => simd!(writer, F32X4_SUB, ()),
F64x2Sub => simd!(writer, F64X2_SUB, ()),
F32x4Div => simd!(writer, F32X4_DIV, ()),
F64x2Div => simd!(writer, F64X2_DIV, ()),
F32x4Mul => simd!(writer, F32X4_MUL, ()),
F64x2Mul => simd!(writer, F64X2_MUL, ()),
F32x4Sqrt => simd!(writer, F32X4_SQRT, ()),
F64x2Sqrt => simd!(writer, F64X2_SQRT, ()),
F32x4ConvertSI32x4 => simd!(writer, F32X4_CONVERT_S_I32X4, ()),
F32x4ConvertUI32x4 => simd!(writer, F32X4_CONVERT_U_I32X4, ()),
F64x2ConvertSI64x2 => simd!(writer, F64X2_CONVERT_S_I64X2, ()),
F64x2ConvertUI64x2 => simd!(writer, F64X2_CONVERT_U_I64X2, ()),
I32x4TruncSF32x4Sat => simd!(writer, I32X4_TRUNC_S_F32X4_SAT, ()),
I32x4TruncUF32x4Sat => simd!(writer, I32X4_TRUNC_U_F32X4_SAT, ()),
I64x2TruncSF64x2Sat => simd!(writer, I64X2_TRUNC_S_F64X2_SAT, ()),
I64x2TruncUF64x2Sat => simd!(writer, I64X2_TRUNC_U_F64X2_SAT, ()),
I8x16Add => simd!(writer, I8X16_ADD, {}),
I16x8Add => simd!(writer, I16X8_ADD, {}),
I32x4Add => simd!(writer, I32X4_ADD, {}),
I64x2Add => simd!(writer, I64X2_ADD, {}),
I8x16Sub => simd!(writer, I8X16_SUB, {}),
I16x8Sub => simd!(writer, I16X8_SUB, {}),
I32x4Sub => simd!(writer, I32X4_SUB, {}),
I64x2Sub => simd!(writer, I64X2_SUB, {}),
I8x16Mul => simd!(writer, I8X16_MUL, {}),
I16x8Mul => simd!(writer, I16X8_MUL, {}),
I32x4Mul => simd!(writer, I32X4_MUL, {}),
// I64x2Mul => simd!(writer, I64X2_MUL, {}),
I8x16Neg => simd!(writer, I8X16_NEG, {}),
I16x8Neg => simd!(writer, I16X8_NEG, {}),
I32x4Neg => simd!(writer, I32X4_NEG, {}),
I64x2Neg => simd!(writer, I64X2_NEG, {}),
I8x16AddSaturateS => simd!(writer, I8X16_ADD_SATURATE_S, {}),
I8x16AddSaturateU => simd!(writer, I8X16_ADD_SATURATE_U, {}),
I16x8AddSaturateS => simd!(writer, I16X8_ADD_SATURATE_S, {}),
I16x8AddSaturateU => simd!(writer, I16X8_ADD_SATURATE_U, {}),
I8x16SubSaturateS => simd!(writer, I8X16_SUB_SATURATE_S, {}),
I8x16SubSaturateU => simd!(writer, I8X16_SUB_SATURATE_U, {}),
I16x8SubSaturateS => simd!(writer, I16X8_SUB_SATURATE_S, {}),
I16x8SubSaturateU => simd!(writer, I16X8_SUB_SATURATE_U, {}),
I8x16Shl => simd!(writer, I8X16_SHL, {}),
I16x8Shl => simd!(writer, I16X8_SHL, {}),
I32x4Shl => simd!(writer, I32X4_SHL, {}),
I64x2Shl => simd!(writer, I64X2_SHL, {}),
I8x16ShrS => simd!(writer, I8X16_SHR_S, {}),
I8x16ShrU => simd!(writer, I8X16_SHR_U, {}),
I16x8ShrS => simd!(writer, I16X8_SHR_S, {}),
I16x8ShrU => simd!(writer, I16X8_SHR_U, {}),
I32x4ShrU => simd!(writer, I32X4_SHR_U, {}),
I32x4ShrS => simd!(writer, I32X4_SHR_S, {}),
I64x2ShrU => simd!(writer, I64X2_SHR_U, {}),
I64x2ShrS => simd!(writer, I64X2_SHR_S, {}),
V128And => simd!(writer, V128_AND, {}),
V128Or => simd!(writer, V128_OR, {}),
V128Xor => simd!(writer, V128_XOR, {}),
V128Not => simd!(writer, V128_NOT, {}),
V128Bitselect => simd!(writer, V128_BITSELECT, {}),
I8x16AnyTrue => simd!(writer, I8X16_ANY_TRUE, {}),
I16x8AnyTrue => simd!(writer, I16X8_ANY_TRUE, {}),
I32x4AnyTrue => simd!(writer, I32X4_ANY_TRUE, {}),
I64x2AnyTrue => simd!(writer, I64X2_ANY_TRUE, {}),
I8x16AllTrue => simd!(writer, I8X16_ALL_TRUE, {}),
I16x8AllTrue => simd!(writer, I16X8_ALL_TRUE, {}),
I32x4AllTrue => simd!(writer, I32X4_ALL_TRUE, {}),
I64x2AllTrue => simd!(writer, I64X2_ALL_TRUE, {}),
I8x16Eq => simd!(writer, I8X16_EQ, {}),
I16x8Eq => simd!(writer, I16X8_EQ, {}),
I32x4Eq => simd!(writer, I32X4_EQ, {}),
// I64x2Eq => simd!(writer, I64X2_EQ, {}),
F32x4Eq => simd!(writer, F32X4_EQ, {}),
F64x2Eq => simd!(writer, F64X2_EQ, {}),
I8x16Ne => simd!(writer, I8X16_NE, {}),
I16x8Ne => simd!(writer, I16X8_NE, {}),
I32x4Ne => simd!(writer, I32X4_NE, {}),
// I64x2Ne => simd!(writer, I64X2_NE, {}),
F32x4Ne => simd!(writer, F32X4_NE, {}),
F64x2Ne => simd!(writer, F64X2_NE, {}),
I8x16LtS => simd!(writer, I8X16_LT_S, {}),
I8x16LtU => simd!(writer, I8X16_LT_U, {}),
I16x8LtS => simd!(writer, I16X8_LT_S, {}),
I16x8LtU => simd!(writer, I16X8_LT_U, {}),
I32x4LtS => simd!(writer, I32X4_LT_S, {}),
I32x4LtU => simd!(writer, I32X4_LT_U, {}),
// I64x2LtS => simd!(writer, I64X2_LT_S, {}),
// I64x2LtU => simd!(writer, I64X2_LT_U, {}),
F32x4Lt => simd!(writer, F32X4_LT, {}),
F64x2Lt => simd!(writer, F64X2_LT, {}),
I8x16LeS => simd!(writer, I8X16_LE_S, {}),
I8x16LeU => simd!(writer, I8X16_LE_U, {}),
I16x8LeS => simd!(writer, I16X8_LE_S, {}),
I16x8LeU => simd!(writer, I16X8_LE_U, {}),
I32x4LeS => simd!(writer, I32X4_LE_S, {}),
I32x4LeU => simd!(writer, I32X4_LE_U, {}),
// I64x2LeS => simd!(writer, I64X2_LE_S, {}),
// I64x2LeU => simd!(writer, I64X2_LE_U, {}),
F32x4Le => simd!(writer, F32X4_LE, {}),
F64x2Le => simd!(writer, F64X2_LE, {}),
I8x16GtS => simd!(writer, I8X16_GT_S, {}),
I8x16GtU => simd!(writer, I8X16_GT_U, {}),
I16x8GtS => simd!(writer, I16X8_GT_S, {}),
I16x8GtU => simd!(writer, I16X8_GT_U, {}),
I32x4GtS => simd!(writer, I32X4_GT_S, {}),
I32x4GtU => simd!(writer, I32X4_GT_U, {}),
// I64x2GtS => simd!(writer, I64X2_GT_S, {}),
// I64x2GtU => simd!(writer, I64X2_GT_U, {}),
F32x4Gt => simd!(writer, F32X4_GT, {}),
F64x2Gt => simd!(writer, F64X2_GT, {}),
I8x16GeS => simd!(writer, I8X16_GE_S, {}),
I8x16GeU => simd!(writer, I8X16_GE_U, {}),
I16x8GeS => simd!(writer, I16X8_GE_S, {}),
I16x8GeU => simd!(writer, I16X8_GE_U, {}),
I32x4GeS => simd!(writer, I32X4_GE_S, {}),
I32x4GeU => simd!(writer, I32X4_GE_U, {}),
// I64x2GeS => simd!(writer, I64X2_GE_S, {}),
// I64x2GeU => simd!(writer, I64X2_GE_U, {}),
F32x4Ge => simd!(writer, F32X4_GE, {}),
F64x2Ge => simd!(writer, F64X2_GE, {}),
F32x4Neg => simd!(writer, F32X4_NEG, {}),
F64x2Neg => simd!(writer, F64X2_NEG, {}),
F32x4Abs => simd!(writer, F32X4_ABS, {}),
F64x2Abs => simd!(writer, F64X2_ABS, {}),
F32x4Min => simd!(writer, F32X4_MIN, {}),
F64x2Min => simd!(writer, F64X2_MIN, {}),
F32x4Max => simd!(writer, F32X4_MAX, {}),
F64x2Max => simd!(writer, F64X2_MAX, {}),
F32x4Add => simd!(writer, F32X4_ADD, {}),
F64x2Add => simd!(writer, F64X2_ADD, {}),
F32x4Sub => simd!(writer, F32X4_SUB, {}),
F64x2Sub => simd!(writer, F64X2_SUB, {}),
F32x4Div => simd!(writer, F32X4_DIV, {}),
F64x2Div => simd!(writer, F64X2_DIV, {}),
F32x4Mul => simd!(writer, F32X4_MUL, {}),
F64x2Mul => simd!(writer, F64X2_MUL, {}),
F32x4Sqrt => simd!(writer, F32X4_SQRT, {}),
F64x2Sqrt => simd!(writer, F64X2_SQRT, {}),
F32x4ConvertSI32x4 => simd!(writer, F32X4_CONVERT_S_I32X4, {}),
F32x4ConvertUI32x4 => simd!(writer, F32X4_CONVERT_U_I32X4, {}),
F64x2ConvertSI64x2 => simd!(writer, F64X2_CONVERT_S_I64X2, {}),
F64x2ConvertUI64x2 => simd!(writer, F64X2_CONVERT_U_I64X2, {}),
I32x4TruncSF32x4Sat => simd!(writer, I32X4_TRUNC_S_F32X4_SAT, {}),
I32x4TruncUF32x4Sat => simd!(writer, I32X4_TRUNC_U_F32X4_SAT, {}),
I64x2TruncSF64x2Sat => simd!(writer, I64X2_TRUNC_S_F64X2_SAT, {}),
I64x2TruncUF64x2Sat => simd!(writer, I64X2_TRUNC_U_F64X2_SAT, {}),
}

Ok(())
Expand Down

0 comments on commit 6715774

Please sign in to comment.