Abbreviated constructor for an x64 instruction.
(
mnemonic: impl Into<String>,
format: Format,
encoding: impl Into<Encoding>,
features: impl Into<Features>,
)
| 21 | |
| 22 | /// Abbreviated constructor for an x64 instruction. |
| 23 | pub fn inst( |
| 24 | mnemonic: impl Into<String>, |
| 25 | format: Format, |
| 26 | encoding: impl Into<Encoding>, |
| 27 | features: impl Into<Features>, |
| 28 | ) -> Inst { |
| 29 | let encoding = encoding.into(); |
| 30 | encoding.validate(&format.operands); |
| 31 | Inst { |
| 32 | mnemonic: mnemonic.into(), |
| 33 | format, |
| 34 | encoding, |
| 35 | features: features.into(), |
| 36 | alternate: None, |
| 37 | has_trap: false, |
| 38 | custom: Custom::default(), |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | /// An x64 instruction. |
| 43 | /// |