aboutsummaryrefslogtreecommitdiffstats
path: root/driver/Configuration.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-03-31 10:46:16 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-03-31 10:46:16 +0200
commit035047ca6c4f62c8481ffa9e4cc0783ea6a1b784 (patch)
tree28f0e627f194d334b8f6872f783188e580451ee5 /driver/Configuration.ml
parentb3de120011683866149ac2a9fbd0da38e2eef96c (diff)
parent47a6b116069cff9c71466bde1fd87d0775ec9175 (diff)
downloadcompcert-kvx-035047ca6c4f62c8481ffa9e4cc0783ea6a1b784.tar.gz
compcert-kvx-035047ca6c4f62c8481ffa9e4cc0783ea6a1b784.zip
Merge branch 'master' into dwarf
Conflicts: Makefile driver/Driver.ml
Diffstat (limited to 'driver/Configuration.ml')
-rw-r--r--driver/Configuration.ml27
1 files changed, 27 insertions, 0 deletions
diff --git a/driver/Configuration.ml b/driver/Configuration.ml
index 48c31767..2cea2b80 100644
--- a/driver/Configuration.ml
+++ b/driver/Configuration.ml
@@ -100,3 +100,30 @@ let advanced_debug =
| v -> bad_config "advanced_debug" [v]
let version = get_config_string "version"
+
+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 *)
+
+let struct_passing_style =
+ match get_config_string "struct_passing_style" with
+ | "ref-callee" -> SP_ref_callee
+ | "ref-caller" -> SP_ref_caller
+ | "ints" -> SP_split_args
+ | v -> bad_config "struct_passing_style" [v]
+
+let struct_return_style =
+ match get_config_string "struct_return_style" with
+ | "int1248" -> SR_int1248
+ | "int1-4" -> SR_int1to4
+ | "int1-8" -> SR_int1to8
+ | "ref" -> SR_ref
+ | v -> bad_config "struct_return_style" [v]