@@ -184,6 +184,8 @@ def scale_factor(self) -> Optional[int]:
184184 def ast_lvalue (
185185 self ,
186186 astree : ASTInterface ,
187+ iaddr : Optional [str ] = None ,
188+ bytestring : Optional [str ] = None ,
187189 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
188190 AST .ASTLval , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
189191 raise UF .CHBError (
@@ -196,6 +198,8 @@ def ast_lvalue(
196198 def ast_rvalue (
197199 self ,
198200 astree : ASTInterface ,
201+ iaddr : Optional [str ] = None ,
202+ bytestring : Optional [str ] = None ,
199203 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
200204 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
201205 raise UF .CHBError (
@@ -230,6 +234,8 @@ def is_register(self) -> bool:
230234 def ast_lvalue (
231235 self ,
232236 astree : ASTInterface ,
237+ iaddr : Optional [str ] = None ,
238+ bytestring : Optional [str ] = None ,
233239 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
234240 AST .ASTLval , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
235241 return (
@@ -238,6 +244,8 @@ def ast_lvalue(
238244 def ast_rvalue (
239245 self ,
240246 astree : ASTInterface ,
247+ iaddr : Optional [str ] = None ,
248+ bytestring : Optional [str ] = None ,
241249 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
242250 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
243251 return (
@@ -277,6 +285,8 @@ def name(self) -> str:
277285 def ast_lvalue (
278286 self ,
279287 astree : ASTInterface ,
288+ iaddr : Optional [str ] = None ,
289+ bytestring : Optional [str ] = None ,
280290 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
281291 AST .ASTLval , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
282292 return (
@@ -285,6 +295,8 @@ def ast_lvalue(
285295 def ast_rvalue (
286296 self ,
287297 astree : ASTInterface ,
298+ iaddr : Optional [str ] = None ,
299+ bytestring : Optional [str ] = None ,
288300 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
289301 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
290302 return (
@@ -318,6 +330,8 @@ def is_special_register(self) -> bool:
318330 def ast_lvalue (
319331 self ,
320332 astree : ASTInterface ,
333+ iaddr : Optional [str ] = None ,
334+ bytestring : Optional [str ] = None ,
321335 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
322336 AST .ASTLval , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
323337 return (
@@ -326,6 +340,8 @@ def ast_lvalue(
326340 def ast_rvalue (
327341 self ,
328342 astree : ASTInterface ,
343+ iaddr : Optional [str ] = None ,
344+ bytestring : Optional [str ] = None ,
329345 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
330346 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
331347 return (
@@ -378,6 +394,8 @@ def index(self) -> int:
378394 def ast_lvalue (
379395 self ,
380396 astree : ASTInterface ,
397+ iaddr : Optional [str ] = None ,
398+ bytestring : Optional [str ] = None ,
381399 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
382400 AST .ASTLval , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
383401 return (
@@ -388,6 +406,8 @@ def ast_lvalue(
388406 def ast_rvalue (
389407 self ,
390408 astree : ASTInterface ,
409+ iaddr : Optional [str ] = None ,
410+ bytestring : Optional [str ] = None ,
391411 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
392412 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
393413 return (
@@ -456,6 +476,8 @@ def name(self) -> str:
456476 def ast_lvalue (
457477 self ,
458478 astree : ASTInterface ,
479+ iaddr : Optional [str ] = None ,
480+ bytestring : Optional [str ] = None ,
459481 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
460482 AST .ASTLval , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
461483 return (
@@ -464,6 +486,8 @@ def ast_lvalue(
464486 def ast_rvalue (
465487 self ,
466488 astree : ASTInterface ,
489+ iaddr : Optional [str ] = None ,
490+ bytestring : Optional [str ] = None ,
467491 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
468492 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
469493 return (
@@ -597,6 +621,8 @@ def scale_factor(self) -> Optional[int]:
597621 def ast_lvalue (
598622 self ,
599623 astree : ASTInterface ,
624+ iaddr : Optional [str ] = None ,
625+ bytestring : Optional [str ] = None ,
600626 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
601627 AST .ASTLval , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
602628 raise UF .CHBError (
@@ -605,6 +631,8 @@ def ast_lvalue(
605631 def ast_rvalue (
606632 self ,
607633 astree : ASTInterface ,
634+ iaddr : Optional [str ] = None ,
635+ bytestring : Optional [str ] = None ,
608636 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
609637 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
610638 srt = self .shift_rotate
@@ -688,6 +716,8 @@ def width(self) -> int:
688716 def ast_lvalue (
689717 self ,
690718 astree : ASTInterface ,
719+ iaddr : Optional [str ] = None ,
720+ bytestring : Optional [str ] = None ,
691721 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
692722 AST .ASTLval , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
693723 raise UF .CHBError (
@@ -696,6 +726,8 @@ def ast_lvalue(
696726 def ast_rvalue (
697727 self ,
698728 astree : ASTInterface ,
729+ iddr : Optional [str ] = None ,
730+ bytestring : Optional [str ] = None ,
699731 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
700732 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
701733 """
@@ -741,6 +773,8 @@ def is_absolute(self) -> bool:
741773 def ast_rvalue (
742774 self ,
743775 astree : ASTInterface ,
776+ iaddr : Optional [str ] = None ,
777+ bytestring : Optional [str ] = None ,
744778 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
745779 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
746780 return (astree .mk_integer_constant (self .address .get_int ()), [], [])
@@ -765,6 +799,8 @@ def address(self) -> "AsmAddress":
765799 def ast_rvalue (
766800 self ,
767801 astree : ASTInterface ,
802+ iaddr : Optional [str ] = None ,
803+ bytestring : Optional [str ] = None ,
768804 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
769805 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
770806 gvname = "gv_" + self .address .get_hex ()
@@ -854,6 +890,8 @@ def is_index(self) -> bool:
854890 def ast_lvalue (
855891 self ,
856892 astree : ASTInterface ,
893+ iaddr : Optional [str ] = None ,
894+ bytestring : Optional [str ] = None ,
857895 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
858896 AST .ASTLval , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
859897 offset = self .memory_offset .ast_rvalue (astree )
@@ -864,7 +902,8 @@ def ast_lvalue(
864902
865903 if self .is_write_back :
866904 reglv = astree .mk_variable_lval (self .register )
867- assign = astree .mk_assign (reglv , xindex )
905+ assign = astree .mk_assign (
906+ reglv , xindex , iaddr = iaddr , bytestring = bytestring )
868907 if self .is_index :
869908 memexp = astree .mk_memref_lval (xindex )
870909 return (memexp , [], [assign ])
@@ -878,6 +917,8 @@ def ast_lvalue(
878917 def ast_addr_rvalue (
879918 self ,
880919 astree : ASTInterface ,
920+ iaddr : Optional [str ] = None ,
921+ bytestring : Optional [str ] = None ,
881922 vtype : Optional [AST .ASTTyp ] = None ) -> AST .ASTExpr :
882923 xreg = astree .mk_register_variable_expr (self .register , vtype = vtype )
883924 offset = self .memory_offset .ast_rvalue (astree )
@@ -889,9 +930,12 @@ def ast_addr_rvalue(
889930 def ast_rvalue (
890931 self ,
891932 astree : ASTInterface ,
933+ iaddr : Optional [str ] = None ,
934+ bytestring : Optional [str ] = None ,
892935 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
893936 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
894- (lval , preinstrs , postinstrs ) = self .ast_lvalue (astree , vtype = vtype )
937+ (lval , preinstrs , postinstrs ) = self .ast_lvalue (
938+ astree , iaddr = iaddr , bytestring = bytestring , vtype = vtype )
895939 rval = astree .mk_lval_expr (lval )
896940 return (rval , preinstrs , postinstrs )
897941
@@ -940,13 +984,17 @@ def is_immediate(self) -> bool:
940984 def ast_lvalue (
941985 self ,
942986 astree : ASTInterface ,
987+ iaddr : Optional [str ] = None ,
988+ bytestring : Optional [str ] = None ,
943989 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
944990 AST .ASTLval , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
945991 raise UF .CHBError ("Immediate operand cannot be an lvalue" )
946992
947993 def ast_rvalue (
948994 self ,
949995 astree : ASTInterface ,
996+ iaddr : Optional [str ] = None ,
997+ bytestring : Optional [str ] = None ,
950998 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
951999 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
9521000 return (astree .mk_integer_constant (self .value ), [], [])
@@ -978,13 +1026,17 @@ def is_fp_constant(self) -> bool:
9781026 def ast_lvalue (
9791027 self ,
9801028 astree : ASTInterface ,
1029+ iaddr : Optional [str ] = None ,
1030+ bytestring : Optional [str ] = None ,
9811031 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
9821032 AST .ASTLval , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
9831033 raise UF .CHBError ("Floating point constant cannot be an lvalue" )
9841034
9851035 def ast_rvalue (
9861036 self ,
9871037 astree : ASTInterface ,
1038+ iaddr : Optional [str ] = None ,
1039+ bytestring : Optional [str ] = None ,
9881040 vtype : Optional [AST .ASTTyp ] = None ) -> Tuple [
9891041 AST .ASTExpr , List [AST .ASTInstruction ], List [AST .ASTInstruction ]]:
9901042 return (astree .mk_float_constant (self .floatvalue ), [], [])
0 commit comments