aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Machine.mli
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2018-02-16 13:12:20 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2018-02-16 16:29:38 +0100
commit1099583341e3a218accf80391202a7e5390f54cc (patch)
treeea108305f673f6d8d65fdf4693116260133ff67e /cparser/Machine.mli
parent455b3384f85a23923001741d6b04deb88e997fd2 (diff)
downloadcompcert-kvx-1099583341e3a218accf80391202a7e5390f54cc.tar.gz
compcert-kvx-1099583341e3a218accf80391202a7e5390f54cc.zip
Move struct passing/return style to Machine.
Since the used configuration for passing and returning values struct values is pretty much static it can be hardwired into the machine settings.
Diffstat (limited to 'cparser/Machine.mli')
-rw-r--r--cparser/Machine.mli17
1 files changed, 16 insertions, 1 deletions
diff --git a/cparser/Machine.mli b/cparser/Machine.mli
index b971958d..53c13b52 100644
--- a/cparser/Machine.mli
+++ b/cparser/Machine.mli
@@ -14,6 +14,17 @@
(* *********************************************************************)
(* Machine-dependent aspects *)
+type struct_passing_style =
+ | SP_ref_callee (* by reference, callee takes copy *)
+ | SP_ref_caller (* by reference, caller takes copy *)
+ | SP_split_args (* by value, as a sequence of ints *)
+
+type struct_return_style =
+ | SR_int1248 (* return by content if size is 1, 2, 4 or 8 bytes *)
+ | SR_int1to4 (* return by content if size is <= 4 *)
+ | SR_int1to8 (* return by content if size is <= 8 *)
+ | SR_ref (* always return by assignment to a reference
+ given as extra argument *)
type t = {
name: string;
@@ -44,7 +55,9 @@ type t = {
alignof_fun: int option;
bigendian: bool;
bitfields_msb_first: bool;
- supports_unaligned_accesses: bool
+ supports_unaligned_accesses: bool;
+ struct_passing_style: struct_passing_style;
+ struct_return_style: struct_return_style;
}
(* The current configuration *)
@@ -58,11 +71,13 @@ val i32lpll64 : t
val il32pll64 : t
val x86_32 : t
val x86_32_macosx : t
+val x86_32_bsd : t
val x86_64 : t
val win32 : t
val win64 : t
val ppc_32_bigendian : t
val ppc_32_diab_bigendian : t
+val ppc_32_linux_bigendian : t
val arm_littleendian : t
val arm_bigendian : t
val rv32 : t