Skip to main content

offlineasm_ir/
inst.rs

1use super::*;
2
3#[derive(Clone, PartialEq, Eq, Debug)]
4pub struct Alu3 {
5    pub dst: Op,
6    pub lhs: Op,
7    pub rhs: Op,
8}
9
10impl Alu3 {
11    /// Builds an `Alu3` from a 2- or 3-operand invocation.
12    ///
13    /// `dst` doubles as `lhs` in the 2-operand form.
14    ///
15    /// # Errors
16    ///
17    /// [`ExpandError::BadOperand`] if `ops` has neither 2 nor 3 elements.
18    pub fn from_operands(mn: Mnemonic, ops: &[Op]) -> Result<Self, ExpandError> {
19        match ops {
20            [dst, rhs] => Ok(Alu3 {
21                dst: *dst,
22                lhs: *dst,
23                rhs: *rhs,
24            }),
25            [dst, lhs, rhs] => Ok(Alu3 {
26                dst: *dst,
27                lhs: *lhs,
28                rhs: *rhs,
29            }),
30            _ => Err(bad(mn, "takes 2 or 3 operands")),
31        }
32    }
33}
34
35/// Fixed-size leading operands for [`Inst::OpBranch`]: `[rhs, dst]` or
36/// `[lhs, rhs, dst]`.
37///
38/// Op-branch expansions take at most 3 leading operands, so the inline array
39/// always fits: unlike `Vec<Op>` this performs no heap allocation.
40#[derive(Clone, Copy, PartialEq, Eq, Debug)]
41pub struct BranchArgs {
42    ops: [Op; 3],
43    len: u8,
44}
45
46impl BranchArgs {
47    /// Builds the 2-operand form (`[rhs, dst]`).
48    pub fn two(rhs: Op, dst: Op) -> Self {
49        Self {
50            ops: [rhs, dst, Op::Imm(0)],
51            len: 2,
52        }
53    }
54
55    /// Builds the 3-operand form (`[lhs, rhs, dst]`).
56    pub fn three(lhs: Op, rhs: Op, dst: Op) -> Self {
57        Self {
58            ops: [lhs, rhs, dst],
59            len: 3,
60        }
61    }
62
63    /// Returns the operands as a slice.
64    pub fn as_slice(&self) -> &[Op] {
65        &self.ops[..self.len as usize]
66    }
67
68    /// Returns the operands as a mutable slice.
69    pub fn as_mut_slice(&mut self) -> &mut [Op] {
70        &mut self.ops[..self.len as usize]
71    }
72}
73
74#[derive(Clone, PartialEq, Eq, Debug)]
75pub enum Inst {
76    Mov {
77        w: Width,
78        dst: Op,
79        src: Op,
80        patch: bool,
81    },
82    Bind(Lbl),
83    MovZero32 {
84        dst: Op,
85        src: Op,
86    },
87    Bswap {
88        w: Width,
89        dst: Op,
90        src: Op,
91    },
92    Load {
93        w: Width,
94        sx: Sx,
95        dst: Gpr,
96        addr: Mem,
97        acquire: bool,
98    },
99    Store {
100        w: Width,
101        src: Op,
102        addr: Mem,
103    },
104    LoadF {
105        k: FKind,
106        dst: Fpr,
107        addr: Mem,
108    },
109    StoreF {
110        k: FKind,
111        src: Fpr,
112        addr: Mem,
113    },
114    FMov {
115        k: FKind,
116        dst: Fpr,
117        src: Fpr,
118    },
119    LoadV {
120        dst: Fpr,
121        addr: Mem,
122    },
123    StoreV {
124        src: Fpr,
125        addr: Mem,
126    },
127    VMov {
128        dst: Fpr,
129        src: Fpr,
130    },
131    Lea {
132        w: Width,
133        dst: Gpr,
134        src: LeaSrc,
135    },
136    Push {
137        op: Op,
138    },
139    Pop {
140        op: Op,
141    },
142    PushV {
143        src: Fpr,
144    },
145    PopV {
146        dst: Fpr,
147    },
148    Peek {
149        disp: i32,
150        dst: Gpr,
151    },
152    Poke {
153        disp: i32,
154        src: Gpr,
155    },
156
157    Add {
158        w: Width,
159        op: Alu3,
160    },
161    Sub {
162        w: Width,
163        op: Alu3,
164    },
165    Mul {
166        w: Width,
167        op: Alu3,
168    },
169    And {
170        w: Width,
171        op: Alu3,
172    },
173    Or {
174        w: Width,
175        op: Alu3,
176    },
177    Xor {
178        w: Width,
179        op: Alu3,
180    },
181    Not {
182        w: Width,
183        dst: Op,
184    },
185    Neg {
186        w: Width,
187        dst: Op,
188    },
189    Shift {
190        w: Width,
191        op: ShiftOp,
192        dst: Gpr,
193        cnt: ShiftCnt,
194    },
195    MulImm {
196        w: Width,
197        dst: Gpr,
198        lhs: Gpr,
199        imm: i64,
200    },
201    AluS {
202        op: AluOp,
203        w: Width,
204        alu: Alu3,
205    },
206    Adc {
207        dst: Op,
208        src: Op,
209    },
210    Sbb {
211        dst: Op,
212        src: Op,
213    },
214    MulWide {
215        signed: bool,
216        dst: Gpr,
217        lhs: Gpr,
218        rhs: Gpr,
219    },
220    MulHigh {
221        signed: bool,
222        rhs: Op,
223    },
224    DivMod1 {
225        signed: bool,
226        w: Width,
227        divisor: Op,
228    },
229    Div3 {
230        signed: bool,
231        w: Width,
232        dst: Gpr,
233        dvd: Op,
234        dvs: Op,
235    },
236    Rem3 {
237        signed: bool,
238        w: Width,
239        dst: Gpr,
240        dvd: Op,
241        dvs: Op,
242    },
243    Extend {
244        from: Width,
245        to: Width,
246        sx: Sx,
247        dst: Gpr,
248        src: Op,
249    },
250    Ctz {
251        w: Width,
252        dst: Gpr,
253        src: Op,
254    },
255    Clz {
256        w: Width,
257        dst: Gpr,
258        src: Op,
259    },
260    Popcnt {
261        w: Width,
262        dst: Gpr,
263        src: Op,
264    },
265    Cqo {
266        quad: bool,
267    },
268    AddShifted {
269        dst: Gpr,
270        lhs: Gpr,
271        rhs: Gpr,
272        amount: u8,
273    },
274    Cmov {
275        w: Width,
276        zero: bool,
277        dst: Gpr,
278        src: Op,
279        test: Gpr,
280    },
281    VecExtract {
282        w: Width,
283        dst: Gpr,
284        src: Fpr,
285        lane: u8,
286    },
287
288    Branch {
289        cc: IntCc,
290        w: Width,
291        lhs: Op,
292        rhs: Op,
293        target: Lbl,
294        patch: bool,
295    },
296
297    TestBranch {
298        w: Width,
299        value: Op,
300        mask: Option<Op>,
301        test: TestKind,
302        target: Lbl,
303        patch: bool,
304    },
305
306    OpBranch {
307        op: FlagAlu,
308        w: Width,
309        flag: PredFlag,
310        args: BranchArgs,
311        target: Lbl,
312        patch: bool,
313    },
314
315    FlagBranch {
316        flag: PredFlag,
317        target: Lbl,
318        patch: bool,
319    },
320    Jump {
321        target: Target,
322        patch: bool,
323    },
324    Call {
325        target: Target,
326        patch: bool,
327    },
328    Ret,
329    /// Traps. `break` lowers to `int3`, `brk`, or `ebreak`.
330    Break,
331    Nop,
332
333    /// Compares integers and writes 0 or 1 to `dst`.
334    IntSet {
335        cc: IntCc,
336        w: Width,
337        dst: Op,
338        lhs: Op,
339        rhs: Op,
340    },
341    /// Tests a value and writes 0 or 1 to `dst`.
342    TestSet {
343        w: Width,
344        value: Op,
345        mask: Option<Op>,
346        test: TestKind,
347        dst: Op,
348    },
349
350    /// Runs scalar float arithmetic such as `addf` through `divd`.
351    FArith {
352        op: FAlu,
353        k: FKind,
354        arith: FArith3,
355    },
356    /// Runs a fused multiply-add. `dst` is `op(a, b, c)`.
357    Fma {
358        op: FmaOp,
359        k: FKind,
360        a: Op,
361        b: Op,
362        c: Op,
363        dst: Fpr,
364    },
365    FSqrt {
366        k: FKind,
367        dst: Fpr,
368        src: Op,
369    },
370    FRound {
371        k: FKind,
372        mode: RoundMode,
373        dst: Fpr,
374        src: Op,
375    },
376    FAbs {
377        k: FKind,
378        dst: Fpr,
379        src: Op,
380    },
381    FNeg {
382        k: FKind,
383        dst: Fpr,
384        src: Op,
385    },
386    /// Runs bitwise logic on float bits.
387    FBit {
388        or: bool,
389        k: FKind,
390        dst: Fpr,
391        src: Op,
392    },
393    /// Truncates a float to an integer when the value is in range.
394    ///
395    /// Out-of-range results are the backend's native saturate value.
396    CvtFI {
397        k: FKind,
398        w: Width,
399        dst: Gpr,
400        src: Op,
401    },
402    /// Converts an integer to a float exactly.
403    CvtIF {
404        signed: bool,
405        from: Width,
406        k: FKind,
407        dst: Fpr,
408        src: Op,
409    },
410    /// Narrows or widens a float.
411    CvtFF {
412        from: FKind,
413        to: FKind,
414        dst: Fpr,
415        src: Op,
416    },
417    /// Reinterprets bits between integer and float.
418    Bitcast {
419        dir: BitcastDir,
420        dst: Op,
421        src: Op,
422    },
423    /// Compares floats and branches on the result.
424    BranchF {
425        cc: FCc,
426        k: FKind,
427        lhs: Op,
428        rhs: Op,
429        target: Lbl,
430        patch: bool,
431    },
432    /// Compares floats and writes 0 or 1.
433    FSet {
434        cc: FCc,
435        k: FKind,
436        dst: Op,
437        lhs: Op,
438        rhs: Op,
439    },
440
441    /// Orders memory. `memfence` is a full barrier and `fence` is inner-shareable.
442    Fence {
443        full: bool,
444    },
445    /// Hints a spin loop. Emits `PAUSE` on x86 and RISC-V, `YIELD` on AArch64.
446    Pause,
447    /// Loads a thread-local slot into a register.
448    ///
449    /// Slots are 8 bytes wide. Sub-word widths zero-extend, matching
450    /// `loadb`/`loadh`/`loadi`.
451    TlsLoad {
452        w: Width,
453        dst: Gpr,
454        idx: i64,
455    },
456    /// Stores a register into a thread-local slot.
457    ///
458    /// Only the low `w` bytes are written; the rest of the slot is
459    /// preserved.
460    TlsStore {
461        w: Width,
462        src: Gpr,
463        idx: i64,
464    },
465    /// Materializes the address of a thread-local slot.
466    TlsLea {
467        dst: Gpr,
468        idx: i64,
469    },
470    /// Runs an atomic read-modify-write.
471    AtomicRmw {
472        op: AtomicOp,
473        w: Width,
474        a: Op,
475        b: Op,
476    },
477    /// Compares and swaps atomically. The expected value lives in `t0`.
478    ///
479    /// `branch` holds the `batomicweakcas*` target when present.
480    AtomicCas {
481        w: Width,
482        mem: Mem,
483        src: Gpr,
484        branch: Option<Lbl>,
485    },
486    /// Loads linked for a later store-conditional.
487    LoadLinked {
488        w: Width,
489        mem: Mem,
490        dst: Gpr,
491    },
492    /// Stores conditionally. Writes 0 or 1 to `status`.
493    StoreCond {
494        w: Width,
495        status: Gpr,
496        src: Gpr,
497        mem: Mem,
498    },
499    /// Loads a pair of values from one address.
500    PairLoad {
501        w: PairW,
502        dst1: Op,
503        dst2: Op,
504        mem: Mem,
505    },
506    /// Stores a pair of values to one address.
507    PairStore {
508        w: PairW,
509        src1: Op,
510        src2: Op,
511        mem: Mem,
512    },
513}
514
515/// Selects sign or zero extension.
516#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
517pub enum Sx {
518    Zero,
519    Sign,
520}
521
522/// Holds a shift count as an immediate or a register.
523#[derive(Clone, PartialEq, Eq, Debug)]
524pub enum ShiftCnt {
525    Imm(i64),
526    Reg(Gpr),
527}
528
529/// Holds a `lea` source: memory, a label, or an external symbol.
530#[derive(Clone, PartialEq, Eq, Debug)]
531pub enum LeaSrc {
532    Mem(Mem),
533    Label(Lbl),
534    Extern(Extern),
535}
536
537/// Names the ALU op fused into [`Inst::OpBranch`].
538#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
539pub enum FlagAlu {
540    Add,
541    Sub,
542    Mul,
543    Or,
544}
545
546/// Names an ALU op that sets the pending flag.
547#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
548pub enum AluOp {
549    Add,
550    Sub,
551    Or,
552}
553
554/// Names a scalar floating-point operation.
555#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
556pub enum FAlu {
557    Add,
558    Sub,
559    Mul,
560    Div,
561    Min,
562    Max,
563}
564
565impl FAlu {
566    /// Reports whether `self` commutes.
567    pub const fn is_commutative(self) -> bool {
568        matches!(self, FAlu::Add | FAlu::Mul | FAlu::Min | FAlu::Max)
569    }
570}
571
572/// Names a fused multiply-add operation.
573#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
574pub enum FmaOp {
575    /// `a*b + c`.
576    Add,
577    /// `a*b - c`.
578    Sub,
579    /// `-(a*b) + c`.
580    NegAdd,
581    /// `-(a*b) - c`.
582    NegSub,
583}
584
585#[derive(Clone, PartialEq, Eq, Debug)]
586pub struct FArith3 {
587    pub dst: Fpr,
588    pub lhs: Op,
589    pub rhs: Option<Op>,
590}
591
592impl FArith3 {
593    /// Builds an `FArith3` from a 2-operand (`dst, lhs`) mnemonic
594    /// invocation. `rhs` stays `None`.
595    ///
596    /// # Errors
597    ///
598    /// [`ExpandError::BadOperand`] if `ops` does not have exactly 2
599    /// elements, or if the first is not [`Op::Fpr`].
600    pub fn from_operands(mn: Mnemonic, ops: &[Op]) -> Result<Self, ExpandError> {
601        match ops {
602            [dst, lhs] => Ok(FArith3 {
603                dst: fpr_op(mn, dst)?,
604                lhs: *lhs,
605                rhs: None,
606            }),
607            _ => Err(bad(mn, "takes 2 operands")),
608        }
609    }
610}
611
612/// Names a bitcast direction.
613#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
614pub enum BitcastDir {
615    Q2D,
616    D2Q,
617    I2F,
618    F2I,
619}
620
621/// Names an atomic read-modify-write operation.
622#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
623pub enum AtomicOp {
624    Add,
625    Sub,
626    Xchg,
627    And,
628    Or,
629    Xor,
630}
631
632/// Names a paired-access width.
633#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
634pub enum PairW {
635    B32,
636    B64,
637    F64,
638    V128,
639}
640
641/// Builds an [`ExpandError::BadOperand`] for `mn`.
642///
643/// `msg` describes what was wrong with its operands.
644pub fn bad(mn: Mnemonic, msg: impl Into<String>) -> ExpandError {
645    ExpandError::BadOperand {
646        mnemonic: mn.as_str().to_string(),
647        msg: msg.into(),
648    }
649}
650
651/// Checks that `ops` has exactly `n` elements.
652///
653/// # Errors
654///
655/// [`ExpandError::BadOperand`] if `ops.len() != n`.
656pub fn expect_len(mn: Mnemonic, ops: &[Op], n: usize) -> Result<(), ExpandError> {
657    if ops.len() == n {
658        Ok(())
659    } else {
660        Err(bad(
661            mn,
662            format!("expected {} operands, got {}", n, ops.len()),
663        ))
664    }
665}
666
667/// Returns the immediate in `op`.
668///
669/// # Errors
670///
671/// [`ExpandError::BadOperand`] if `op` is not [`Op::Imm`].
672pub fn imm_op(mn: Mnemonic, op: &Op) -> Result<i64, ExpandError> {
673    match op {
674        Op::Imm(v) => Ok(*v),
675        _ => Err(bad(mn, "expected immediate")),
676    }
677}
678
679/// Returns the GPR in `op`.
680///
681/// # Errors
682///
683/// [`ExpandError::BadOperand`] if `op` is not [`Op::Gpr`].
684pub fn gpr_op(mn: Mnemonic, op: &Op) -> Result<Gpr, ExpandError> {
685    match op {
686        Op::Gpr(g) => Ok(*g),
687        _ => Err(bad(mn, "expected GPR")),
688    }
689}
690
691/// Returns the FPR in `op`.
692///
693/// # Errors
694///
695/// [`ExpandError::BadOperand`] if `op` is not [`Op::Fpr`].
696pub fn fpr_op(mn: Mnemonic, op: &Op) -> Result<Fpr, ExpandError> {
697    match op {
698        Op::Fpr(x) => Ok(*x),
699        _ => Err(bad(mn, "expected FPR")),
700    }
701}
702
703/// Returns the address in `op`.
704///
705/// # Errors
706///
707/// [`ExpandError::BadOperand`] if `op` is not [`Op::Mem`].
708pub fn mem_op(mn: Mnemonic, op: &Op) -> Result<Mem, ExpandError> {
709    match op {
710        Op::Mem(a) => Ok(*a),
711        _ => Err(bad(mn, "expected memory")),
712    }
713}
714
715/// Returns the label in `op`.
716///
717/// # Errors
718///
719/// [`ExpandError::BadOperand`] if `op` is not [`Op::Label`].
720pub fn label_op(mn: Mnemonic, op: &Op) -> Result<Lbl, ExpandError> {
721    match op {
722        Op::Label(l) => Ok(*l),
723        _ => Err(bad(mn, "expected label")),
724    }
725}
726
727/// Compares two operands for equality.
728///
729/// Only immediates and registers compare equal. Memory, label, and symbolic
730/// operands always compare unequal.
731pub fn op_eq(a: &Op, b: &Op) -> bool {
732    match (a, b) {
733        (Op::Imm(x), Op::Imm(y)) => x == y,
734        (Op::Gpr(x), Op::Gpr(y)) => x == y,
735        (Op::Fpr(x), Op::Fpr(y)) => x == y,
736        _ => false,
737    }
738}
739
740impl Inst {
741    /// Visits every label this instruction binds, branches to, or names.
742    ///
743    /// Frontends use this to resolve the opaque handles of one expansion
744    /// (notably the `Fresh` labels `expand` creates) before printing or
745    /// encoding the sequence.
746    pub fn visit_labels(&self, f: &mut dyn FnMut(Lbl)) {
747        fn visit_op(f: &mut dyn FnMut(Lbl), o: &Op) {
748            if let Op::Label(l) = o {
749                f(*l);
750            }
751        }
752        fn visit_target(f: &mut dyn FnMut(Lbl), t: &Target) {
753            if let Target::Label(l) = t {
754                f(*l);
755            }
756        }
757        fn visit_lea(f: &mut dyn FnMut(Lbl), s: &LeaSrc) {
758            if let LeaSrc::Label(l) = s {
759                f(*l);
760            }
761        }
762        fn visit_ops(f: &mut dyn FnMut(Lbl), ops: &[Op]) {
763            for o in ops {
764                visit_op(f, o);
765            }
766        }
767        match self {
768            Inst::Mov { dst, src, .. }
769            | Inst::MovZero32 { dst, src }
770            | Inst::Bswap { dst, src, .. }
771            | Inst::Adc { dst, src }
772            | Inst::Sbb { dst, src }
773            | Inst::Bitcast { dst, src, .. } => {
774                visit_op(f, dst);
775                visit_op(f, src);
776            }
777            Inst::IntSet { dst, lhs, rhs, .. } | Inst::FSet { dst, lhs, rhs, .. } => {
778                visit_op(f, dst);
779                visit_op(f, lhs);
780                visit_op(f, rhs);
781            }
782            Inst::Bind(l) => f(*l),
783            Inst::Lea { src, .. } => visit_lea(f, src),
784            Inst::Store { src, .. } => visit_op(f, src),
785            Inst::Push { op } | Inst::Pop { op } => visit_op(f, op),
786            Inst::Add { op: a, .. }
787            | Inst::Sub { op: a, .. }
788            | Inst::Mul { op: a, .. }
789            | Inst::And { op: a, .. }
790            | Inst::Or { op: a, .. }
791            | Inst::Xor { op: a, .. } => {
792                visit_op(f, &a.dst);
793                visit_op(f, &a.lhs);
794                visit_op(f, &a.rhs);
795            }
796            Inst::AluS { alu, .. } => {
797                visit_op(f, &alu.dst);
798                visit_op(f, &alu.lhs);
799                visit_op(f, &alu.rhs);
800            }
801            Inst::Not { dst, .. } | Inst::Neg { dst, .. } => visit_op(f, dst),
802            Inst::MulHigh { rhs, .. } => visit_op(f, rhs),
803            Inst::DivMod1 { divisor, .. } => visit_op(f, divisor),
804            Inst::Div3 { dvd, dvs, .. } | Inst::Rem3 { dvd, dvs, .. } => {
805                visit_op(f, dvd);
806                visit_op(f, dvs);
807            }
808            Inst::Branch {
809                lhs, rhs, target, ..
810            } => {
811                visit_op(f, lhs);
812                visit_op(f, rhs);
813                f(*target);
814            }
815            Inst::TestBranch {
816                value,
817                mask,
818                target,
819                ..
820            } => {
821                visit_op(f, value);
822                if let Some(m) = mask {
823                    visit_op(f, m);
824                }
825                f(*target);
826            }
827            Inst::OpBranch { args, target, .. } => {
828                visit_ops(f, args.as_slice());
829                f(*target);
830            }
831            Inst::FlagBranch { target, .. } => f(*target),
832            Inst::Jump { target, .. } | Inst::Call { target, .. } => visit_target(f, target),
833            Inst::TestSet {
834                value, mask, dst, ..
835            } => {
836                visit_op(f, value);
837                if let Some(m) = mask {
838                    visit_op(f, m);
839                }
840                visit_op(f, dst);
841            }
842            Inst::FArith { arith, .. } => {
843                visit_op(f, &arith.lhs);
844                if let Some(r) = &arith.rhs {
845                    visit_op(f, r);
846                }
847            }
848            Inst::Fma { a, b, c, .. } => {
849                visit_op(f, a);
850                visit_op(f, b);
851                visit_op(f, c);
852            }
853            Inst::FSqrt { src, .. }
854            | Inst::FRound { src, .. }
855            | Inst::FAbs { src, .. }
856            | Inst::FNeg { src, .. }
857            | Inst::FBit { src, .. }
858            | Inst::CvtFI { src, .. }
859            | Inst::CvtIF { src, .. }
860            | Inst::CvtFF { src, .. } => visit_op(f, src),
861            Inst::BranchF {
862                lhs, rhs, target, ..
863            } => {
864                visit_op(f, lhs);
865                visit_op(f, rhs);
866                f(*target);
867            }
868            Inst::AtomicRmw { a, b, .. } => {
869                visit_op(f, a);
870                visit_op(f, b);
871            }
872            Inst::Load { .. }
873            | Inst::LoadF { .. }
874            | Inst::StoreF { .. }
875            | Inst::FMov { .. }
876            | Inst::LoadV { .. }
877            | Inst::StoreV { .. }
878            | Inst::VMov { .. }
879            | Inst::PushV { .. }
880            | Inst::PopV { .. }
881            | Inst::Peek { .. }
882            | Inst::Poke { .. }
883            | Inst::Shift { .. }
884            | Inst::MulImm { .. }
885            | Inst::Extend { .. }
886            | Inst::Ctz { .. }
887            | Inst::Clz { .. }
888            | Inst::Popcnt { .. }
889            | Inst::Cqo { .. }
890            | Inst::MulWide { .. }
891            | Inst::AddShifted { .. }
892            | Inst::Cmov { .. }
893            | Inst::VecExtract { .. }
894            | Inst::Fence { .. }
895            | Inst::Pause
896            | Inst::TlsLoad { .. }
897            | Inst::TlsStore { .. }
898            | Inst::TlsLea { .. }
899            | Inst::AtomicCas { .. }
900            | Inst::LoadLinked { .. }
901            | Inst::StoreCond { .. }
902            | Inst::PairLoad { .. }
903            | Inst::PairStore { .. }
904            | Inst::Ret
905            | Inst::Break
906            | Inst::Nop => {}
907        }
908    }
909}