diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-02-19 17:24:01 +0100 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-02-19 17:24:01 +0100 |
commit | 959542e4cf126c4f46f00c764b5365804de637c6 (patch) | |
tree | 58eb44d941b65d15537a5c53bccd8257030aadf2 /cparser/Machine.ml | |
parent | b0c09b32f3e559ca22afc4dc40fdd60964cb3292 (diff) | |
parent | b0eb1dfc9fd7b15c556c49101390d882b0f00f8a (diff) | |
download | compcert-959542e4cf126c4f46f00c764b5365804de637c6.tar.gz compcert-959542e4cf126c4f46f00c764b5365804de637c6.zip |
Merge github.com:AbsInt/CompCert into compcert_windows
Diffstat (limited to 'cparser/Machine.ml')
-rw-r--r-- | cparser/Machine.ml | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/cparser/Machine.ml b/cparser/Machine.ml index 6a7f5054..b215505b 100644 --- a/cparser/Machine.ml +++ b/cparser/Machine.ml @@ -173,10 +173,40 @@ let gcc_extensions c = { c with sizeof_void = Some 1; sizeof_fun = Some 1; alignof_void = Some 1; alignof_fun = Some 1 } -(* Default configuration *) +(* Undefined configuration *) -let config = - ref (match Sys.word_size with - | 32 -> if Sys.os_type = "Win32" then win32 else ilp32ll64 - | 64 -> if Sys.os_type = "Win32" then win64 else i32lpll64 - | _ -> assert false) +let undef = { + name = "UNDEFINED"; + char_signed = false; + sizeof_ptr = 0; + sizeof_short = 0; + sizeof_int = 0; + sizeof_long = 0; + sizeof_longlong = 0; + sizeof_float = 0; + sizeof_double = 0; + sizeof_longdouble = 0; + sizeof_void = None; + sizeof_fun = None; + sizeof_wchar = 0; + wchar_signed = true; + sizeof_size_t = 0; + sizeof_ptrdiff_t = 0; + alignof_ptr = 0; + alignof_short = 0; + alignof_int = 0; + alignof_long = 0; + alignof_longlong = 0; + alignof_float = 0; + alignof_double = 0; + alignof_longdouble = 0; + alignof_void = None; + alignof_fun = None; + bigendian = false; + bitfields_msb_first = false; + struct_return_as_int = 0 +} + +(* The current configuration. Must be initialized before use. *) + +let config = ref undef |