Check that the encoding is valid for the given operands; this can find issues earlier, before generating any Rust code.
(&self, operands: &[Operand])
| 71 | /// Check that the encoding is valid for the given operands; this can find |
| 72 | /// issues earlier, before generating any Rust code. |
| 73 | pub fn validate(&self, operands: &[Operand]) { |
| 74 | match self { |
| 75 | Encoding::Rex(rex) => rex.validate(operands), |
| 76 | Encoding::Vex(vex) => vex.validate(operands), |
| 77 | Encoding::Evex(evex) => evex.validate(operands), |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | /// Return the opcode for this encoding. |
| 82 | pub fn opcode(&self) -> u8 { |