From e89ddc35d75d682ae6164b32c582d0fe497ef57c Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Tue, 15 Dec 2020 17:39:43 +0100 Subject: Turning loads into non-trapping when necessary --- cparser/Machine.ml | 9 ++++++++- cparser/Machine.mli | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'cparser') diff --git a/cparser/Machine.ml b/cparser/Machine.ml index 97ca9223..73b71ea0 100644 --- a/cparser/Machine.ml +++ b/cparser/Machine.ml @@ -61,6 +61,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 +97,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 +133,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 +169,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 *) @@ -270,7 +274,9 @@ let kvx = bitfields_msb_first = false; (* TO CHECK *) supports_unaligned_accesses = true; struct_passing_style = SP_value32_ref_callee; - struct_return_style = SR_int1to4 } + struct_return_style = SR_int1to4; + has_non_trapping_loads = true; +} let aarch64 = { i32lpll64 with name = "aarch64"; @@ -323,6 +329,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. *) diff --git a/cparser/Machine.mli b/cparser/Machine.mli index 0e1e22d1..54436758 100644 --- a/cparser/Machine.mli +++ b/cparser/Machine.mli @@ -60,6 +60,7 @@ type t = { supports_unaligned_accesses: bool; struct_passing_style: struct_passing_style; struct_return_style: struct_return_style; + has_non_trapping_loads: bool; } (* The current configuration *) -- cgit