Returns the opcode of an instruction.
(instr: u32)
| 1170 | |
| 1171 | /// Returns the opcode of an instruction. |
| 1172 | pub(crate) fn opcode_of(instr: u32) -> Opcode { |
| 1173 | #[allow(unsafe_code)] |
| 1174 | unsafe { |
| 1175 | let num = unchecked_u32_as_u8(instr >> 24); |
| 1176 | debug_assert!(num <= Opcode::Eof as u8); |
| 1177 | std::mem::transmute::<u8, Opcode>(num) |
| 1178 | } |
| 1179 | } |
| 1180 | |
| 1181 | /// Tags used as integer register values to identify the type stored in another register at |
| 1182 | /// runtime. |
no outgoing calls
no test coverage detected