the rest of ops

This commit is contained in:
NikVolf
2017-04-03 19:57:56 +03:00
parent bfa2e56bb9
commit ef83fa06ee

View File

@ -726,141 +726,136 @@ impl Serialize for Opcode {
F64Const(def) => op!(writer, 0x44, { F64Const(def) => op!(writer, 0x44, {
Uint64::from(def).serialize(writer)?; Uint64::from(def).serialize(writer)?;
}), }),
I32Eqz => op!(writer, 0x45),
I32Eq => op!(writer, 0x46),
I32Ne => op!(writer, 0x47),
I32LtS => op!(writer, 0x48),
I32LtU => op!(writer, 0x49),
I32GtS => op!(writer, 0x4a),
I32GtU => op!(writer, 0x4b),
I32LeS => op!(writer, 0x4c),
I32LeU => op!(writer, 0x4d),
I32GeS => op!(writer, 0x4e),
I32GeU => op!(writer, 0x4f),
// 0x45 => I32Eqz, I64Eqz => op!(writer, 0x50),
// 0x46 => I32Eq, I64Eq => op!(writer, 0x51),
// 0x47 => I32Ne, I64Ne => op!(writer, 0x52),
// 0x48 => I32LtS, I64LtS => op!(writer, 0x53),
// 0x49 => I32LtU, I64LtU => op!(writer, 0x54),
// 0x4a => I32GtS, I64GtS => op!(writer, 0x55),
// 0x4b => I32GtU, I64GtU => op!(writer, 0x56),
// 0x4c => I32LeS, I64LeS => op!(writer, 0x57),
// 0x4d => I32LeU, I64LeU => op!(writer, 0x58),
// 0x4e => I32GeS, I64GeS => op!(writer, 0x59),
// 0x4f => I32GeU, I64GeU => op!(writer, 0x5a),
// 0x50 => I64Eqz, F32Eq => op!(writer, 0x5b),
// 0x51 => I64Eq, F32Ne => op!(writer, 0x5c),
// 0x52 => I64Ne, F32Lt => op!(writer, 0x5d),
// 0x53 => I64LtS, F32Gt => op!(writer, 0x5e),
// 0x54 => I64LtU, F32Le => op!(writer, 0x5f),
// 0x55 => I64GtS, F32Ge => op!(writer, 0x60),
// 0x56 => I64GtU,
// 0x57 => I64LeS,
// 0x58 => I64LeU,
// 0x59 => I64GeS,
// 0x5a => I64GeU,
// 0x5b => F32Eq, F64Eq => op!(writer, 0x61),
// 0x5c => F32Ne, F64Ne => op!(writer, 0x62),
// 0x5d => F32Lt, F64Lt => op!(writer, 0x63),
// 0x5e => F32Gt, F64Gt => op!(writer, 0x64),
// 0x5f => F32Le, F64Le => op!(writer, 0x65),
// 0x60 => F32Ge, F64Ge => op!(writer, 0x66),
// 0x61 => F64Eq, I32Clz => op!(writer, 0x67),
// 0x62 => F64Ne, I32Ctz => op!(writer, 0x68),
// 0x63 => F64Lt, I32Popcnt => op!(writer, 0x69),
// 0x64 => F64Gt, I32Add => op!(writer, 0x6a),
// 0x65 => F64Le, I32Sub => op!(writer, 0x6b),
// 0x66 => F64Ge, I32Mul => op!(writer, 0x6c),
I32DivS => op!(writer, 0x6d),
I32DivU => op!(writer, 0x6e),
I32RemS => op!(writer, 0x6f),
I32RemU => op!(writer, 0x70),
I32And => op!(writer, 0x71),
I32Or => op!(writer, 0x72),
I32Xor => op!(writer, 0x73),
I32Shl => op!(writer, 0x74),
I32ShlS => op!(writer, 0x75),
I32ShrU => op!(writer, 0x76),
I32Rotl => op!(writer, 0x77),
I32Rotr => op!(writer, 0x78),
// 0x67 => I32Clz, I64Clz => op!(writer, 0x79),
// 0x68 => I32Ctz, I64Ctz => op!(writer, 0x7a),
// 0x69 => I32Popcnt, I64Popcnt => op!(writer, 0x7b),
// 0x6a => I32Add, I64Add => op!(writer, 0x7c),
// 0x6b => I32Sub, I64Sub => op!(writer, 0x7d),
// 0x6c => I32Mul, I64Mul => op!(writer, 0x7e),
// 0x6d => I32DivS, I64DivS => op!(writer, 0x7f),
// 0x6e => I32DivU, I64DivU => op!(writer, 0x80),
// 0x6f => I32RemS, I64RemS => op!(writer, 0x81),
// 0x70 => I32RemU, I64RemU => op!(writer, 0x82),
// 0x71 => I32And, I64And => op!(writer, 0x83),
// 0x72 => I32Or, I64Or => op!(writer, 0x84),
// 0x73 => I32Xor, I64Xor => op!(writer, 0x85),
// 0x74 => I32Shl, I64Shl => op!(writer, 0x86),
// 0x75 => I32ShlS, I64ShrS => op!(writer, 0x87),
// 0x76 => I32ShrU, I64ShrU => op!(writer, 0x88),
// 0x77 => I32Rotl, I64Rotl => op!(writer, 0x89),
// 0x78 => I32Rotr, I64Rotr => op!(writer, 0x8a),
F32Abs => op!(writer, 0x8b),
F32Neg => op!(writer, 0x8c),
F32Ceil => op!(writer, 0x8d),
F32Floor => op!(writer, 0x8e),
F32Trunc => op!(writer, 0x8f),
F32Nearest => op!(writer, 0x90),
F32Sqrt => op!(writer, 0x91),
F32Add => op!(writer, 0x92),
F32Sub => op!(writer, 0x93),
F32Mul => op!(writer, 0x94),
F32Div => op!(writer, 0x95),
F32Min => op!(writer, 0x96),
F32Max => op!(writer, 0x97),
F32Copysign => op!(writer, 0x98),
F64Abs => op!(writer, 0x99),
F64Neg => op!(writer, 0x9a),
F64Ceil => op!(writer, 0x9b),
F64Floor => op!(writer, 0x9c),
F64Trunc => op!(writer, 0x9d),
F64Nearest => op!(writer, 0x9e),
F64Sqrt => op!(writer, 0x9f),
F64Add => op!(writer, 0xa0),
F64Sub => op!(writer, 0xa1),
F64Mul => op!(writer, 0xa2),
F64Div => op!(writer, 0xa3),
F64Min => op!(writer, 0xa4),
F64Max => op!(writer, 0xa5),
F64Copysign => op!(writer, 0xa6),
// 0x79 => I64Clz, I32WarpI64 => op!(writer, 0xa7),
// 0x7a => I64Ctz, I32TruncSF32 => op!(writer, 0xa8),
// 0x7b => I64Popcnt, I32TruncUF32 => op!(writer, 0xa9),
// 0x7c => I64Add, I32TruncSF64 => op!(writer, 0xaa),
// 0x7d => I64Sub, I32TruncUF64 => op!(writer, 0xab),
// 0x7e => I64Mul, I64ExtendSI32 => op!(writer, 0xac),
// 0x7f => I64DivS, I64ExtendUI32 => op!(writer, 0xad),
// 0x80 => I64DivU, I64TruncSF32 => op!(writer, 0xae),
// 0x81 => I64RemS, I64TruncUF32 => op!(writer, 0xaf),
// 0x82 => I64RemU, I64TruncSF64 => op!(writer, 0xb0),
// 0x83 => I64And, I64TruncUF64 => op!(writer, 0xb1),
// 0x84 => I64Or, F32ConvertSI32 => op!(writer, 0xb2),
// 0x85 => I64Xor, F32ConvertUI32 => op!(writer, 0xb3),
// 0x86 => I64Shl, F32ConvertSI64 => op!(writer, 0xb4),
// 0x87 => I64ShrS, F32ConvertUI64 => op!(writer, 0xb5),
// 0x88 => I64ShrU, F32DemoteF64 => op!(writer, 0xb6),
// 0x89 => I64Rotl, F64ConvertSI32 => op!(writer, 0xb7),
// 0x8a => I64Rotr, F64ConvertUI32 => op!(writer, 0xb8),
// 0x8b => F32Abs, F64ConvertSI64 => op!(writer, 0xb9),
// 0x8c => F32Neg, F64ConvertUI64 => op!(writer, 0xba),
// 0x8d => F32Ceil, F64PromoteF32 => op!(writer, 0xbb),
// 0x8e => F32Floor,
// 0x8f => F32Trunc,
// 0x90 => F32Nearest,
// 0x91 => F32Sqrt,
// 0x92 => F32Add,
// 0x93 => F32Sub,
// 0x94 => F32Mul,
// 0x95 => F32Div,
// 0x96 => F32Min,
// 0x97 => F32Max,
// 0x98 => F32Copysign,
// 0x99 => F64Abs,
// 0x9a => F64Neg,
// 0x9b => F64Ceil,
// 0x9c => F64Floor,
// 0x9d => F64Trunc,
// 0x9e => F64Nearest,
// 0x9f => F64Sqrt,
// 0xa0 => F64Add,
// 0xa1 => F64Sub,
// 0xa2 => F64Mul,
// 0xa3 => F64Div,
// 0xa4 => F64Min,
// 0xa5 => F64Max,
// 0xa6 => F64Copysign,
// 0xa7 => I32WarpI64, I32ReinterpretF32 => op!(writer, 0xbc),
// 0xa8 => I32TruncSF32, I64ReinterpretF64 => op!(writer, 0xbd),
// 0xa9 => I32TruncUF32, F32ReinterpretI32 => op!(writer, 0xbe),
// 0xaa => I32TruncSF64, F64ReinterpretI64 => op!(writer, 0xbf),
// 0xab => I32TruncUF64,
// 0xac => I64ExtendSI32,
// 0xad => I64ExtendUI32,
// 0xae => I64TruncSF32,
// 0xaf => I64TruncUF32,
// 0xb0 => I64TruncSF64,
// 0xb1 => I64TruncUF64,
// 0xb2 => F32ConvertSI32,
// 0xb3 => F32ConvertUI32,
// 0xb4 => F32ConvertSI64,
// 0xb5 => F32ConvertUI64,
// 0xb6 => F32DemoteF64,
// 0xb7 => F64ConvertSI32,
// 0xb8 => F64ConvertUI32,
// 0xb9 => F64ConvertSI64,
// 0xba => F64ConvertUI64,
// 0xbb => F64PromoteF32,
// 0xbc => I32ReinterpretF32,
// 0xbd => I64ReinterpretF64,
// 0xbe => F32ReinterpretI32,
// 0xbf => F64ReinterpretI64,
// End => op!(writer, 0x0b),
_ => unreachable!(),
} }
Ok(()) Ok(())