Move the nop lowering to ISLE, and remove the final return from lower.rs (#4809)
Lower nop in ISLE in the x64 backend, and remove the final Ok(()) from the lower function to assert that all cases that aren't handled in ISLE will panic.
This commit is contained in:
@@ -3758,3 +3758,9 @@
|
|||||||
|
|
||||||
;; SHUFPS xmm_y, xmm_xmp, 0x88
|
;; SHUFPS xmm_y, xmm_xmp, 0x88
|
||||||
(x64_shufps dst zeros 0x88)))
|
(x64_shufps dst zeros 0x88)))
|
||||||
|
|
||||||
|
;; Rules for `nop` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(rule (lower (nop))
|
||||||
|
(invalid_reg))
|
||||||
|
|
||||||
|
|||||||
@@ -459,7 +459,8 @@ fn lower_insn_to_regs(
|
|||||||
| Opcode::Isplit
|
| Opcode::Isplit
|
||||||
| Opcode::TlsValue
|
| Opcode::TlsValue
|
||||||
| Opcode::SqmulRoundSat
|
| Opcode::SqmulRoundSat
|
||||||
| Opcode::Uunarrow => {
|
| Opcode::Uunarrow
|
||||||
|
| Opcode::Nop => {
|
||||||
let ty = if outputs.len() > 0 {
|
let ty = if outputs.len() > 0 {
|
||||||
Some(ctx.output_ty(insn, 0))
|
Some(ctx.output_ty(insn, 0))
|
||||||
} else {
|
} else {
|
||||||
@@ -572,15 +573,9 @@ fn lower_insn_to_regs(
|
|||||||
| Opcode::BrTable => {
|
| Opcode::BrTable => {
|
||||||
panic!("Branch opcode reached non-branch lowering logic!");
|
panic!("Branch opcode reached non-branch lowering logic!");
|
||||||
}
|
}
|
||||||
|
|
||||||
Opcode::Nop => {
|
|
||||||
// Nothing.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// Lowering-backend trait implementation.
|
// Lowering-backend trait implementation.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user