(self, inst: Instruction)
| 626 | ) |
| 627 | |
| 628 | def _small_const_2(self, inst: Instruction) -> tuple[str, Instruction | None]: |
| 629 | assert inst.kind is InstructionKind.SMALL_CONST_2 |
| 630 | assert inst.target is not None |
| 631 | pre, _ = inst.text.split(inst.name) |
| 632 | if "16" in inst.target: |
| 633 | return "16a", Instruction( |
| 634 | InstructionKind.OTHER, |
| 635 | "movz", |
| 636 | f"{pre}movz {self._get_reg(inst)}, 0", |
| 637 | None, |
| 638 | ) |
| 639 | else: |
| 640 | return "16b", Instruction( |
| 641 | InstructionKind.OTHER, |
| 642 | "movk", |
| 643 | f"{pre}movk {self._get_reg(inst)}, 0, lsl #16", |
| 644 | None, |
| 645 | ) |
| 646 | |
| 647 | def _small_consts_match(self, inst1: Instruction, inst2: Instruction) -> bool: |
| 648 | reg1 = self._get_reg(inst1) |
nothing calls this directly
no test coverage detected