@@ -414,8 +414,10 @@ module Make(C:Config) (I:I) : S with module I = I
414414 let get_symbol_name loc =
415415 let open Constant in
416416 match global loc with
417- | Some (I.V. Val (Symbolic (Physical (name,_)| Virtual {name;_} )))
417+ | Some (I.V. Val (Symbolic (Physical (name,_))))
418418 -> Some name
419+ | Some (I.V. Val (Symbolic (Virtual {name;_})))
420+ -> Some (Symbol. pp name)
419421 | _ -> None
420422
421423 let of_symbolic_data s =
@@ -486,8 +488,10 @@ module Make(C:Config) (I:I) : S with module I = I
486488(* Compare id in fault and other id, at least one id must be allowed in fault *)
487489 let same_sym_fault sym1 sym2 = match sym1,sym2 with
488490(* Both ids allowed in fault, compare *)
489- | (Virtual {name= s1;_},Virtual {name= s2;_})
490- | (System (PTE ,s1),System (PTE ,s2))
491+ | (Virtual {name= s1;_},Virtual {name= s2;_})
492+ -> Symbol. compare s1 s2 = 0
493+ | (System (PTE ,s1),System (PTE ,s2))
494+ (* | (System (TAG,s1),System (TAG,s2)) *)
491495 -> Misc. string_eq s1 s2
492496(* One id allowed, the other on forbidden, does not match *)
493497 | (Virtual _,(System ((PTE | TLB | PTE2 ),_)| Physical _| TagAddr _))
@@ -508,11 +512,6 @@ module Make(C:Config) (I:I) : S with module I = I
508512 let same_id_fault v1 v2 = match v1,v2 with
509513 | I.V. Val (Symbolic sym1), I.V. Val (Symbolic sym2)
510514 -> same_sym_fault sym1 sym2
511- | I.V. Val (Constant. Label (_, l1)),I.V. Val (Constant. Label (_, l2))
512- -> Misc. string_eq l1 l2
513- | I.V. Val (Symbolic _), I.V. Val (Constant. Label (_, _))
514- | I.V. Val (Constant. Label (_, _)), I.V. Val (Symbolic _)
515- -> false
516515 | _,_
517516 ->
518517 Warn. fatal
@@ -762,7 +761,7 @@ module Make(C:Config) (I:I) : S with module I = I
762761 let tag = None in
763762 let cap = 0L in
764763 let sym_data =
765- { Constant. name= s ;
764+ { Constant. name= Constant.Symbol. Data s ;
766765 tag= tag ;
767766 cap= cap ;
768767 offset= i* nbytes;
@@ -835,12 +834,16 @@ module Make(C:Config) (I:I) : S with module I = I
835834 | Location_global
836835 (I.V. Val
837836 (Concrete _| ConcreteVector _| ConcreteRecord _
838- | Label _ | Instruction _| Frozen _
837+ | Instruction _| Frozen _
839838 | Tag _| PteVal _| AddrReg _))
840839 ->
841840 Warn. user_error
842841 " Very strange location (look_address) %s\n "
843842 (pp_location loc)
843+ | Location_global (I.V. Val (Symbolic (Virtual {name =n ;_} ))) when Symbol. is_label n ->
844+ Warn. user_error
845+ " No default value defined for location %s\n "
846+ (pp_location loc)
844847 | Location_global (I.V. Val (Symbolic (Virtual _| Physical _)))
845848 | Location_reg _ -> reg_default_value
846849
@@ -870,15 +873,15 @@ module Make(C:Config) (I:I) : S with module I = I
870873
871874 let look_size_location env loc =
872875 match symbolic_data loc with
873- | Some {Constant. name =s ;_} -> look_size env s
876+ | Some {Constant. name =s ;_} -> look_size env ( Constant.Symbol. pp s)
874877 | _ -> assert false
875878
876879 let build_size_env bds =
877880 List. fold_left
878881 (fun m (loc ,(t ,_ )) ->
879882 match symbolic_data loc with
880883 | Some sym ->
881- StringMap. add sym.Constant. name (mem_access_size_of_t t) m
884+ StringMap. add ( Constant.Symbol. pp sym.Constant. name) (mem_access_size_of_t t) m
882885 | _ -> m)
883886 size_env_empty bds
884887
@@ -1081,7 +1084,7 @@ module Make(C:Config) (I:I) : S with module I = I
10811084 | Location_global
10821085 (I.V. Val (Symbolic (Virtual {name= s; offset= _;_})) as a)
10831086 ->
1084- let sz = look_size senv s in
1087+ let sz = look_size senv ( Constant.Symbol. pp s) in
10851088 let eas = byte_eas sz a in
10861089 let vs = List. map (get_of_val st) eas in
10871090 let v = recompose vs in
0 commit comments