aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2023-02-01 15:03:51 +0100
committerXavier Leroy <xavier.leroy@college-de-france.fr>2023-02-01 15:09:02 +0100
commit2db601dc7c8055d2b666b14d57dc6d5d1c7cc077 (patch)
treef292314d0a6623aebed5fe85c9b393d04cb44b1e
parent14dde0a20c52d7bb35bbdab2bd017be9cdd75522 (diff)
downloadcompcert-2db601dc7c8055d2b666b14d57dc6d5d1c7cc077.tar.gz
compcert-2db601dc7c8055d2b666b14d57dc6d5d1c7cc077.zip
wchar_t is unsigned int for arm_littleendian, arm_bigendian and aarch64
However, it is signed int for aarch64_apple. Fixes: #475
-rw-r--r--cparser/Machine.ml9
1 files changed, 7 insertions, 2 deletions
diff --git a/cparser/Machine.ml b/cparser/Machine.ml
index 81511ac3..3805b252 100644
--- a/cparser/Machine.ml
+++ b/cparser/Machine.ml
@@ -219,7 +219,9 @@ let ppc_32_r64_linux_bigendian =
{ ppc_32_linux_bigendian with sizeof_intreg = 8;}
let arm_littleendian =
- { ilp32ll64 with name = "arm"; struct_passing_style = SP_split_args;
+ { ilp32ll64 with name = "arm";
+ wchar_ikind = C.IUInt;
+ struct_passing_style = SP_split_args;
struct_return_style = SR_int1to4;}
let arm_bigendian =
@@ -237,11 +239,14 @@ let rv64 =
let aarch64 =
{ i32lpll64 with name = "aarch64";
+ wchar_ikind = C.IUInt;
struct_passing_style = SP_ref_callee; (* Wrong *)
struct_return_style = SR_ref } (* Wrong *)
let aarch64_apple =
- { aarch64 with char_signed = true }
+ { aarch64 with char_signed = true;
+ wchar_ikind = C.IInt;}
+(*- #End *)
(* Add GCC extensions re: sizeof and alignof *)