(&self)
| 200 | } |
| 201 | impl Opcode { |
| 202 | pub fn as_bytes(&self) -> Vec<u8> { |
| 203 | match self { |
| 204 | Self::Op(op) => [op.0].to_vec(), |
| 205 | Self::Op38(op) => [0x0f, 0x38, op.0].to_vec(), |
| 206 | Self::Op3a(op) => [0x0f, 0x3a, op.0].to_vec(), |
| 207 | Self::OpVex3(op) => [0xc4, op.0, op.1].to_vec(), |
| 208 | Self::OpVex2(op) => [0xc5, op.0].to_vec(), |
| 209 | Self::OpXop3(op) => [0x8f, op.0, op.1].to_vec(), |
| 210 | } |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | #[derive(Clone)] |