diff options
Diffstat (limited to 'cparser/Machine.ml')
-rw-r--r-- | cparser/Machine.ml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/cparser/Machine.ml b/cparser/Machine.ml index c47ec594..6c10715f 100644 --- a/cparser/Machine.ml +++ b/cparser/Machine.ml @@ -19,6 +19,7 @@ type struct_passing_style = | SP_ref_callee (* by reference, callee takes copy *) | SP_ref_caller (* by reference, caller takes copy *) + | SP_value32_ref_callee (* by value if <= 32 bits, by ref_callee otherwise *) | SP_split_args (* by value, as a sequence of ints *) type struct_return_style = @@ -61,6 +62,7 @@ type t = { supports_unaligned_accesses: bool; struct_passing_style: struct_passing_style; struct_return_style : struct_return_style; + has_non_trapping_loads : bool; } let ilp32ll64 = { @@ -96,6 +98,7 @@ let ilp32ll64 = { supports_unaligned_accesses = false; struct_passing_style = SP_ref_callee; struct_return_style = SR_ref; + has_non_trapping_loads = false; } let i32lpll64 = { @@ -131,6 +134,7 @@ let i32lpll64 = { supports_unaligned_accesses = false; struct_passing_style = SP_ref_callee; struct_return_style = SR_ref; + has_non_trapping_loads = false; } let il32pll64 = { @@ -166,6 +170,7 @@ let il32pll64 = { supports_unaligned_accesses = false; struct_passing_style = SP_ref_callee; struct_return_style = SR_ref; + has_non_trapping_loads = false; } (* Canned configurations for some ABIs *) @@ -238,6 +243,50 @@ let rv64 = struct_passing_style = SP_ref_callee; (* Wrong *) struct_return_style = SR_ref } (* to check *) +let kvxbase = + { name = "kvx"; + char_signed = true; + wchar_signed = true; + sizeof_ptr = 8; + sizeof_short = 2; + sizeof_int = 4; + sizeof_long = 8; + sizeof_longlong = 8; + sizeof_float = 4; + sizeof_double = 8; + sizeof_longdouble = 8; + sizeof_void = None; (* What is this for ? *) + sizeof_fun = None; (* What is this for ? *) + sizeof_wchar = 4; + sizeof_size_t = 8; + sizeof_ptrdiff_t = 8; + sizeof_intreg = 8; (* What is this for ? *) + alignof_ptr = 8; + alignof_short = 2; + alignof_int = 4; + alignof_long = 8; + alignof_longlong = 8; + alignof_float = 4; + alignof_double = 8; + alignof_longdouble = 8; + alignof_void = None; (* what is this for ? *) + alignof_fun = None; (* what is this for ? *) + bigendian = false; + bitfields_msb_first = false; (* TO CHECK *) + supports_unaligned_accesses = true; + struct_passing_style = SP_value32_ref_callee; + struct_return_style = SR_int1to4; + has_non_trapping_loads = false; +} + +let kvxcos = + { kvxbase with has_non_trapping_loads = false; +} + +let kvxmbr = + { kvxbase with has_non_trapping_loads = true; +} + let aarch64 = { i32lpll64 with name = "aarch64"; struct_passing_style = SP_ref_callee; (* Wrong *) @@ -292,6 +341,7 @@ let undef = { supports_unaligned_accesses = false; struct_passing_style = SP_ref_callee; struct_return_style = SR_ref; + has_non_trapping_loads = false; } (* The current configuration. Must be initialized before use. *) |