Skip to content

Commit 89e1cbd

Browse files
committed
CHB:ARM: convert xdata voidpointer return type
1 parent 0dd98d4 commit 89e1cbd

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

CodeHawk/CHB/bchlib/bCHBCTypeUtil.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ let is_float_double t = match t with TFloat (FDouble, _, _) -> true | _ -> false
187187

188188
let is_pointer t = match t with TPtr _ -> true | _ -> false
189189

190+
let is_void_pointer t = match t with TPtr (TVoid _, _) -> true | _ -> false
191+
190192
let is_scalar t = (is_int t) || (is_float t) || (is_pointer t)
191193

192194
let is_pointer_to_struct t = match t with TPtr (TComp _,_) -> true | _ -> false

CodeHawk/CHB/bchlib/bCHBCTypeUtil.mli

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ val is_float_float: btype_t -> bool
136136
val is_float_double: btype_t -> bool
137137
val is_scalar: btype_t -> bool
138138
val is_pointer: btype_t -> bool
139+
val is_void_pointer: btype_t -> bool
139140
val is_unsigned: btype_t -> bool (* true if unsigned, false if signed or unknown *)
140141
val is_function_type: btype_t -> bool
141142
val is_unknown_type: btype_t -> bool

CodeHawk/CHB/bchlib/bCHVersion.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ end
9595

9696

9797
let version = new version_info_t
98-
~version:"0.6.0_20241127"
99-
~date:"2024-11-27"
98+
~version:"0.6.0_20241217"
99+
~date:"2024-12-17"
100100
~licensee: None
101101
~maxfilesize: None
102102
()

CodeHawk/CHB/bchlibarm32/bCHFnARMDictionary.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ object (self)
491491
let (vrd, rtype) =
492492
let fintf = floc#get_call_target#get_function_interface in
493493
let rtype = get_fts_returntype fintf in
494+
let rtype = if is_void_pointer rtype then t_ptrto t_uchar else rtype in
494495
let reg =
495496
if is_float rtype then
496497
let regtype =

CodeHawk/CHB/bchlibarm32/bCHFnARMTypeConstraints.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ object (self)
326326
let (rvreg, rtype) =
327327
let fintf = floc#get_call_target#get_function_interface in
328328
let rtype = get_fts_returntype fintf in
329+
let rtype = if is_void_pointer rtype then t_ptrto t_uchar else rtype in
329330
let reg =
330331
if is_float rtype then
331332
let regtype =

0 commit comments

Comments
 (0)