@@ -491,7 +491,7 @@ class OverriddenInstructionPlaceHolder:
491
491
name : str
492
492
493
493
494
- AnyInstruction = Instruction | MacroInstruction
494
+ AnyInstruction = Instruction | MacroInstruction | PseudoInstruction
495
495
INSTR_FMT_PREFIX = "INSTR_FMT_"
496
496
497
497
@@ -530,6 +530,7 @@ def error(self, msg: str, node: parser.Node) -> None:
530
530
macros : dict [str , parser .Macro ]
531
531
macro_instrs : dict [str , MacroInstruction ]
532
532
families : dict [str , parser .Family ]
533
+ pseudos : dict [str , parser .Pseudo ]
533
534
pseudo_instrs : dict [str , PseudoInstruction ]
534
535
535
536
def parse (self ) -> None :
@@ -587,7 +588,7 @@ def parse_file(self, filename: str, instrs_idx: dict[str, int]) -> None:
587
588
588
589
# Parse from start
589
590
psr .setpos (start )
590
- thing : parser .InstDef | parser .Macro | parser .Family | None
591
+ thing : parser .InstDef | parser .Macro | parser .Pseudo | parser . Family | None
591
592
thing_first_token = psr .peek ()
592
593
while thing := psr .definition ():
593
594
match thing :
@@ -900,7 +901,7 @@ def effect_str(effects: list[StackEffect]) -> str:
900
901
popped = str (- low )
901
902
pushed = str (sp - low )
902
903
case parser .Pseudo ():
903
- instr = self .pseudos [thing .name ]
904
+ instr = self .pseudo_instrs [thing .name ]
904
905
popped = pushed = None
905
906
# Calculate stack effect, and check that it's the the same
906
907
# for all targets.
0 commit comments