@@ -319,7 +319,7 @@ def generate_expansion_table(analysis: Analysis, out: CWriter) -> None:
319319 expansions_table : dict [str , list [tuple [str , str , int ]]] = {}
320320 for inst in sorted (analysis .instructions .values (), key = lambda t : t .name ):
321321 offset : int = 0 # Cache effect offset
322- expansions : list [tuple [str , int , int ]] = [] # [(name, size, offset), ...]
322+ expansions : list [tuple [str , str , int ]] = [] # [(name, size, offset), ...]
323323 if inst .is_super ():
324324 pieces = inst .name .split ("_" )
325325 assert len (pieces ) == 4 , f"{ inst .name } doesn't look like a super-instr"
@@ -335,20 +335,19 @@ def generate_expansion_table(analysis: Analysis, out: CWriter) -> None:
335335 assert (
336336 len (instr2 .parts ) == 1
337337 ), f"{ name2 } is not a good superinstruction part"
338- expansions .append ((instr1 .parts [0 ].name , OPARG_KINDS [ "OPARG_TOP" ] , 0 ))
339- expansions .append ((instr2 .parts [0 ].name , OPARG_KINDS [ "OPARG_BOTTOM" ] , 0 ))
338+ expansions .append ((instr1 .parts [0 ].name , "OPARG_TOP" , 0 ))
339+ expansions .append ((instr2 .parts [0 ].name , "OPARG_BOTTOM" , 0 ))
340340 elif not is_viable_expansion (inst ):
341341 continue
342342 else :
343343 for part in inst .parts :
344344 size = part .size
345345 if isinstance (part , Uop ):
346+ fmt = "0"
346347 if part .name == "_SAVE_RETURN_OFFSET" :
347348 fmt = "OPARG_SAVE_RETURN_OFFSET"
348349 elif part .caches :
349350 fmt = str (part .caches [0 ].size )
350- else :
351- fmt = "0"
352351 # Skip specializations
353352 if "specializing" in part .annotations :
354353 continue
0 commit comments