aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/StructReturn.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2015-12-08 11:20:33 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2015-12-08 11:20:33 +0100
commit478093c1af181e6dd2c364e9bf954994bd312e12 (patch)
treef2b1a5a0fe7f4025f87165f1ef1c9e900f42a71b /cparser/StructReturn.ml
parentff9fedbbcc45993dfe2c4f0a372596782603921c (diff)
downloadcompcert-478093c1af181e6dd2c364e9bf954994bd312e12.tar.gz
compcert-478093c1af181e6dd2c364e9bf954994bd312e12.zip
Revise and simplify the -fstruct-return and -fstruct-passing options.
- Rename '-fstruct-return' into '-fstruct-passing', because this emulation affects both function result passing and function argument passing. Keep '-fstruct-return' as a deprecated synonymous for '-fstruct-passing' - Remove the ability to change the ABI for struct passing via the '-fstruct-passing=<abi>' and '-fstruct-return=<abi>' command-line flags. This was more confusing than useful. - Produce an error if a struct/union is passed as function argument and '-fstruct-passing' is not set. This used to be supported, using CompCert's default ABI for passing struct arguments. However, this default ABI does not match any of the standard ABIs of our target platforms, so it is better to reject than to silently produce ABI-incompatible code.
Diffstat (limited to 'cparser/StructReturn.ml')
-rw-r--r--cparser/StructReturn.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/cparser/StructReturn.ml b/cparser/StructReturn.ml
index 82c0a04c..4e019380 100644
--- a/cparser/StructReturn.ml
+++ b/cparser/StructReturn.ml
@@ -582,11 +582,11 @@ let program p =
struct_passing_style :=
if !Clflags.option_interp
then SP_ref_callee
- else !Clflags.option_fstruct_passing_style;
+ else Configuration.struct_passing_style;
struct_return_style :=
if !Clflags.option_interp
then SR_ref
- else !Clflags.option_fstruct_return_style;
+ else Configuration.struct_return_style;
Transform.program
~decl:transf_decl
~fundef:transf_fundef