diff --git a/CodeHawk/CHB/bchlib/bCHBCTypeUtil.ml b/CodeHawk/CHB/bchlib/bCHBCTypeUtil.ml index e27faeda..76454372 100644 --- a/CodeHawk/CHB/bchlib/bCHBCTypeUtil.ml +++ b/CodeHawk/CHB/bchlib/bCHBCTypeUtil.ml @@ -187,6 +187,8 @@ let is_float_double t = match t with TFloat (FDouble, _, _) -> true | _ -> false let is_pointer t = match t with TPtr _ -> true | _ -> false +let is_void_pointer t = match t with TPtr (TVoid _, _) -> true | _ -> false + let is_scalar t = (is_int t) || (is_float t) || (is_pointer t) let is_pointer_to_struct t = match t with TPtr (TComp _,_) -> true | _ -> false diff --git a/CodeHawk/CHB/bchlib/bCHBCTypeUtil.mli b/CodeHawk/CHB/bchlib/bCHBCTypeUtil.mli index 9f47edb1..9eabfabc 100644 --- a/CodeHawk/CHB/bchlib/bCHBCTypeUtil.mli +++ b/CodeHawk/CHB/bchlib/bCHBCTypeUtil.mli @@ -136,6 +136,7 @@ val is_float_float: btype_t -> bool val is_float_double: btype_t -> bool val is_scalar: btype_t -> bool val is_pointer: btype_t -> bool +val is_void_pointer: btype_t -> bool val is_unsigned: btype_t -> bool (* true if unsigned, false if signed or unknown *) val is_function_type: btype_t -> bool val is_unknown_type: btype_t -> bool diff --git a/CodeHawk/CHB/bchlib/bCHVersion.ml b/CodeHawk/CHB/bchlib/bCHVersion.ml index bd42ea4a..da90c0c6 100644 --- a/CodeHawk/CHB/bchlib/bCHVersion.ml +++ b/CodeHawk/CHB/bchlib/bCHVersion.ml @@ -95,8 +95,8 @@ end let version = new version_info_t - ~version:"0.6.0_20241127" - ~date:"2024-11-27" + ~version:"0.6.0_20241217" + ~date:"2024-12-17" ~licensee: None ~maxfilesize: None () diff --git a/CodeHawk/CHB/bchlibarm32/bCHFnARMDictionary.ml b/CodeHawk/CHB/bchlibarm32/bCHFnARMDictionary.ml index abd890fe..48c4ffad 100644 --- a/CodeHawk/CHB/bchlibarm32/bCHFnARMDictionary.ml +++ b/CodeHawk/CHB/bchlibarm32/bCHFnARMDictionary.ml @@ -491,6 +491,7 @@ object (self) let (vrd, rtype) = let fintf = floc#get_call_target#get_function_interface in let rtype = get_fts_returntype fintf in + let rtype = if is_void_pointer rtype then t_ptrto t_uchar else rtype in let reg = if is_float rtype then let regtype = diff --git a/CodeHawk/CHB/bchlibarm32/bCHFnARMTypeConstraints.ml b/CodeHawk/CHB/bchlibarm32/bCHFnARMTypeConstraints.ml index 12b2faa8..7a4aba8e 100644 --- a/CodeHawk/CHB/bchlibarm32/bCHFnARMTypeConstraints.ml +++ b/CodeHawk/CHB/bchlibarm32/bCHFnARMTypeConstraints.ml @@ -326,6 +326,7 @@ object (self) let (rvreg, rtype) = let fintf = floc#get_call_target#get_function_interface in let rtype = get_fts_returntype fintf in + let rtype = if is_void_pointer rtype then t_ptrto t_uchar else rtype in let reg = if is_float rtype then let regtype =