@@ -121,7 +121,7 @@ object (self:'a)
121121 " staticstub_" ^ (function_stub_to_string fs)
122122 | AppTarget a -> " tgt_" ^ a#to_hex_string
123123 | _ -> " tgt_qq_" )
124- | SideEffectValue (address ,arg ,_ ) -> " se_" ^ address ^ " _" ^ arg
124+ | SideEffectValue (address , arg , _ , _ ) -> " se_" ^ address ^ " _" ^ arg
125125 | FieldValue (sname ,offset ,fname ) ->
126126 sname ^ " ." ^ fname ^ " _amp_" ^ (string_of_int offset)
127127 | SymbolicValue x -> " sv__" ^ (string_of_int (vard#xd#index_xpr x)) ^ " __sv"
@@ -191,6 +191,7 @@ object (self:'a)
191191 | TypeCastValue (_ , _ , ty , _ ) -> Some ty
192192 | SyscallErrorReturnValue _ -> None
193193 | CallTargetValue _ -> None
194+ | SideEffectValue (_ , _ , Some ty , _ ) -> Some ty
194195 | SideEffectValue _ -> None
195196 | FieldValue _ -> None
196197 | SymbolicValue _ -> None
@@ -235,12 +236,12 @@ object (self:'a)
235236
236237 method is_global_sideeffect =
237238 match denotation with
238- | AuxiliaryVariable (SideEffectValue (_ , _ , SEGlobal _ )) -> true
239+ | AuxiliaryVariable (SideEffectValue (_ , _ , _ , SEGlobal _ )) -> true
239240 | _ -> false
240241
241242 method get_global_sideeffect_target_address: doubleword_result =
242243 match denotation with
243- | AuxiliaryVariable (SideEffectValue (_ , _ , SEGlobal dw )) -> Ok dw
244+ | AuxiliaryVariable (SideEffectValue (_ , _ , _ , SEGlobal dw )) -> Ok dw
244245 | _ ->
245246 Error [__FILE__ ^ " :" ^ (string_of_int __LINE__) ^ " : "
246247 ^ " Variable is not a global sideeffect value: "
@@ -278,15 +279,15 @@ object (self:'a)
278279 method get_call_site: ctxt_iaddress_t traceresult =
279280 match denotation with
280281 | (AuxiliaryVariable (FunctionReturnValue a))
281- | (AuxiliaryVariable (SideEffectValue (a , _ , _ ))) -> Ok a
282+ | (AuxiliaryVariable (SideEffectValue (a , _ , _ , _ ))) -> Ok a
282283 | _ ->
283284 Error [__FILE__ ^ " :" ^ (string_of_int __LINE__) ^ " : "
284285 ^ " Variable is not a function return value or sideeffect value: "
285286 ^ self#get_name]
286287
287288 method get_se_argument_descriptor: string traceresult =
288289 match denotation with
289- | (AuxiliaryVariable (SideEffectValue (_ , name , _ ))) -> Ok name
290+ | (AuxiliaryVariable (SideEffectValue (_ , name , _ , _ ))) -> Ok name
290291 | _ -> Error [__FILE__ ^ " :" ^ (string_of_int __LINE__) ^ " : "
291292 ^ " Variable is not a sideeffect value: " ^ self#get_name]
292293
@@ -641,6 +642,7 @@ object (self)
641642 | InitialRegisterValue (PowerSPRegister _, _)
642643 | InitialMemoryValue _
643644 | FunctionReturnValue _
645+ | SideEffectValue _
644646 | TypeCastValue _ ->
645647 Ok (memrefmgr#mk_basevar_reference v)
646648 | _ ->
@@ -697,17 +699,23 @@ object (self)
697699 self#mk_variable (AuxiliaryVariable (CallTargetValue tgt))
698700
699701 method make_global_sideeffect_value
700- (iaddr : ctxt_iaddress_t ) (arg : string ) (gaddr : doubleword_int ) =
701- let sev = SideEffectValue (iaddr, arg, SEGlobal gaddr) in
702+ ?(btype =None )
703+ (iaddr : ctxt_iaddress_t )
704+ (arg : string )
705+ (gaddr : doubleword_int ) =
706+ let sev = SideEffectValue (iaddr, arg, btype, SEGlobal gaddr) in
702707 self#mk_variable (AuxiliaryVariable sev)
703708
704709 method make_stack_sideeffect_value
705- (iaddr : ctxt_iaddress_t ) (arg : string ) (stackoffset : numerical_t ) =
706- let sev = SideEffectValue (iaddr, arg, SEStack stackoffset) in
710+ ?(btype =None )
711+ (iaddr : ctxt_iaddress_t )
712+ (arg : string )
713+ (stackoffset : numerical_t ) =
714+ let sev = SideEffectValue (iaddr, arg, btype, SEStack stackoffset) in
707715 self#mk_variable (AuxiliaryVariable sev)
708716
709717 method make_side_effect_value (iaddr :ctxt_iaddress_t ) (descr : string ) (arg :string ) =
710- let sev = SideEffectValue (iaddr, arg, SEDescr descr) in
718+ let sev = SideEffectValue (iaddr, arg, None , SEDescr descr) in
711719 self#mk_variable (AuxiliaryVariable sev)
712720
713721 method make_field_value (sname :string ) (offset :int ) (fname :string ) =
0 commit comments