1 //! Lowering backend for Pulley.
2 
3 pub mod isle;
4 
5 use super::{PulleyBackend, PulleyTargetKind, inst::*};
6 use crate::{
7     ir,
8     machinst::{lower::*, *},
9 };
10 
11 impl<P> LowerBackend for PulleyBackend<P>
12 where
13     P: PulleyTargetKind,
14 {
15     type MInst = InstAndKind<P>;
16 
lower(&self, ctx: &mut Lower<Self::MInst>, ir_inst: ir::Inst) -> Option<InstOutput>17     fn lower(&self, ctx: &mut Lower<Self::MInst>, ir_inst: ir::Inst) -> Option<InstOutput> {
18         isle::lower(ctx, self, ir_inst)
19     }
20 
lower_branch( &self, ctx: &mut Lower<Self::MInst>, ir_inst: ir::Inst, targets: &[MachLabel], ) -> Option<()>21     fn lower_branch(
22         &self,
23         ctx: &mut Lower<Self::MInst>,
24         ir_inst: ir::Inst,
25         targets: &[MachLabel],
26     ) -> Option<()> {
27         isle::lower_branch(ctx, self, ir_inst, targets)
28     }
29 
maybe_pinned_reg(&self) -> Option<Reg>30     fn maybe_pinned_reg(&self) -> Option<Reg> {
31         // Pulley does not support this feature right now.
32         None
33     }
34 }
35