aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2015-03-20 11:25:30 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2015-03-20 11:25:30 +0100
commitcbf8434e44ebd6bc05022d1fbe0400267520184f (patch)
treea73d9d6d0601935cf514698cdc393d131df7a341 /configure
parent42e397bd80389c7e7259f962415769b06561bb5d (diff)
downloadcompcert-cbf8434e44ebd6bc05022d1fbe0400267520184f.tar.gz
compcert-cbf8434e44ebd6bc05022d1fbe0400267520184f.zip
Improvements in the StructReturn transformation (ABI conformance for passing composites).
- Implement the "1/2/4/8" composite return policy, used by IA32/MacOS X and IA32/BSD. - Move the default passing conventions from Machine.ml to compcert.ini, making it easier to test the various conventions. - More comprehensive interoperability test in regression/interop1.c.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure35
1 files changed, 32 insertions, 3 deletions
diff --git a/configure b/configure
index 2d500d57..d66923db 100755
--- a/configure
+++ b/configure
@@ -79,14 +79,18 @@ done
cchecklink=false
casmruntime=""
asm_supports_cfi=""
+struct_passing=""
+struct_return=""
case "$target" in
powerpc-linux|ppc-linux|powerpc-eabi|ppc-eabi)
arch="powerpc"
model="standard"
+ abi="eabi"
+ struct_passing="ref-caller"
case "$target" in
- *-linux) abi="linux";;
- *-eabi) abi="eabi";;
+ *-linux) struct_return="ref";;
+ *-eabi) struct_return="int1-8";;
esac
system="linux"
cc="${toolprefix}gcc"
@@ -100,6 +104,8 @@ case "$target" in
arch="powerpc"
model="standard"
abi="eabi"
+ struct_passing="ref-caller"
+ struct_return="int1-8"
system="diab"
cc="${toolprefix}dcc"
cprepro="${toolprefix}dcc -E"
@@ -128,6 +134,8 @@ case "$target" in
echo "$usage" 1>&2
exit 2;;
esac
+ struct_passing="ints"
+ struct_return="int1-4"
system="linux"
cc="${toolprefix}gcc"
cprepro="${toolprefix}gcc -U__GNUC__ '-D__REDIRECT(name,proto,alias)=name proto' '-D__REDIRECT_NTH(name,proto,alias)=name proto' -E"
@@ -138,6 +146,8 @@ case "$target" in
arch="ia32"
model="sse2"
abi="standard"
+ struct_passing="ints"
+ struct_return="ref"
system="linux"
cc="${toolprefix}gcc -m32"
cprepro="${toolprefix}gcc -m32 -U__GNUC__ -E"
@@ -148,6 +158,8 @@ case "$target" in
arch="ia32"
model="sse2"
abi="standard"
+ struct_passing="ints"
+ struct_return="int1248" # to check!
system="bsd"
cc="${toolprefix}gcc -m32"
cprepro="${toolprefix}gcc -m32 -U__GNUC__ -E"
@@ -158,6 +170,8 @@ case "$target" in
arch="ia32"
model="sse2"
abi="macosx"
+ struct_passing="ints"
+ struct_return="int1248"
system="macosx"
cc="${toolprefix}gcc -arch i386"
cprepro="${toolprefix}gcc -arch i386 -U__GNUC__ -U__clang__ -U__BLOCKS__ '-D__attribute__(x)=' '-D__asm(x)=' -E"
@@ -173,6 +187,8 @@ case "$target" in
arch="ia32"
model="sse2"
abi="standard"
+ struct_passing="ints"
+ struct_return="ref"
system="cygwin"
cc="${toolprefix}gcc -m32"
cprepro="${toolprefix}gcc -m32 -U__GNUC__ -E"
@@ -329,6 +345,8 @@ cat >> Makefile.config <<EOF
ARCH=$arch
MODEL=$model
ABI=$abi
+STRUCT_PASSING=$struct_passing
+STRUCT_RETURN=$struct_return
SYSTEM=$system
CC=$cc
CPREPRO=$cprepro
@@ -365,9 +383,19 @@ MODEL=
# ABI=standard # for IA32
ABI=
+# Default calling conventions for passing structs and unions by value
+# See options -fstruct-passing=<style> and -fstruct-return=<style>
+# in the CompCert user's manual
+STRUCT_PASSING=ref_callee
+# STRUCT_PASSING=ref_caller
+# STRUCT_PASSING=ints
+STRUCT_RETURN=ref
+# STRUCT_RETURN=int1248
+# STRUCT_RETURN=int1-4
+# STRUCT_RETURN=int1-8
+
# Target operating system and development environment
# Possible choices for PowerPC:
-# SYSTEM=macosx
# SYSTEM=linux
# SYSTEM=diab
# Possible choices for ARM:
@@ -428,6 +456,7 @@ CompCert configuration:
Target architecture........... $arch
Hardware model................ $model
Application binary interface.. $abi
+ Composite passing conventions. arguments: $struct_passing, return values: $struct_return
OS and development env........ $system
C compiler.................... $cc
C preprocessor................ $cprepro