summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-05-12 09:41:09 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-05-12 09:41:09 +0000
commitfe8baff11737d3785ff51d20ace9ab31665cd295 (patch)
treeedbab0f933283d5ecf455a5f94150c4f09379c51 /driver
parent239cbd2ebab8814b11d7ef43c35a17ce56a7ba0b (diff)
cparser: support for attributes over struct and union.
cparser: added experimental emulation of packed structs (PackedStruct.ml) git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1650 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'driver')
-rw-r--r--driver/Clflags.ml1
-rw-r--r--driver/Driver.ml6
2 files changed, 6 insertions, 1 deletions
diff --git a/driver/Clflags.ml b/driver/Clflags.ml
index c47d0f3..2a96c38 100644
--- a/driver/Clflags.ml
+++ b/driver/Clflags.ml
@@ -20,6 +20,7 @@ let option_fstruct_passing = ref false
let option_fstruct_assign = ref false
let option_fbitfields = ref false
let option_fvararg_calls = ref true
+let option_fpacked_structs = ref false
let option_fmadd = ref false
let option_dparse = ref false
let option_dcmedium = ref false
diff --git a/driver/Driver.ml b/driver/Driver.ml
index 87b1569..6aa63e0 100644
--- a/driver/Driver.ml
+++ b/driver/Driver.ml
@@ -71,7 +71,9 @@ let compile_c_file sourcename ifile ofile =
"b" (* blocks: mandatory *)
^ (if !option_fstruct_passing then "s" else "")
^ (if !option_fstruct_assign then "S" else "")
- ^ (if !option_fbitfields then "f" else "") in
+ ^ (if !option_fbitfields then "f" else "")
+ ^ (if !option_fpacked_structs then "p" else "")
+ in
(* Parsing and production of a simplified C AST *)
let ast =
match Cparser.Parse.preprocessed_file simplifs sourcename ifile with
@@ -258,6 +260,7 @@ Language support options (use -fno-<opt> to turn off -f<opt>) :
-fstruct-passing Emulate passing structs and unions by value [off]
-fstruct-assign Emulate assignment between structs or unions [off]
-fvararg-calls Emulate calls to variable-argument functions [on]
+ -fpacked-structs Emulate packed structs [off]
Code generation options:
-fmadd Use fused multiply-add and multiply-sub instructions [off]
-fsmall-data <n> Set maximal size <n> for allocation in small data area
@@ -387,6 +390,7 @@ let cmdline_actions =
@ f_opt "bitfields" option_fbitfields
@ f_opt "vararg-calls" option_fvararg_calls
@ f_opt "madd" option_fmadd
+ @ f_opt "packed-structs" option_fpacked_structs
let _ =
Gc.set { (Gc.get()) with Gc.minor_heap_size = 524288 };