From cf7341220ca3f8749ba81c06f41b23b198c56ac8 Mon Sep 17 00:00:00 2001 From: hjl Date: Tue, 30 Jun 2015 16:46:45 +0000 Subject: IA MCU psABI support: testsuite We run Intel MCU psABI tests on Linux/ia32 with -miamcu. Since Intel MCU psABI has a different calling convention, the only Linux libc function allowed is "abort". asm-support.S contains some support functions as well as a subset of soft-fp, which is written in assembly with x87 instructions, to provide intrinsics needed by -miamcu so that Intel MCU psABI tests can run on Linux. * gcc.target/i386/iamcu/abi-iamcu.exp: New file. * gcc.target/i386/iamcu/args.h: Likewise. * gcc.target/i386/iamcu/asm-support.S: Likewise. * gcc.target/i386/iamcu/defines.h: Likewise. * gcc.target/i386/iamcu/macros.h: Likewise. * gcc.target/i386/iamcu/test_3_element_struct_and_unions.c: Likewise. * gcc.target/i386/iamcu/test_basic_64bit_returning.c: Likewise. * gcc.target/i386/iamcu/test_basic_alignment.c: Likewise. * gcc.target/i386/iamcu/test_basic_array_size_and_align.c: Likewise. * gcc.target/i386/iamcu/test_basic_returning.c: Likewise. * gcc.target/i386/iamcu/test_basic_sizes.c: Likewise. * gcc.target/i386/iamcu/test_basic_struct_size_and_align.c: Likewise. * gcc.target/i386/iamcu/test_basic_union_size_and_align.c: Likewise. * gcc.target/i386/iamcu/test_bitfields.c: Likewise. * gcc.target/i386/iamcu/test_complex_returning.c: Likewise. * gcc.target/i386/iamcu/test_passing_floats.c: Likewise. * gcc.target/i386/iamcu/test_passing_integers.c: Likewise. * gcc.target/i386/iamcu/test_passing_structs.c: Likewise. * gcc.target/i386/iamcu/test_passing_structs_and_unions.c: Likewise. * gcc.target/i386/iamcu/test_passing_unions.c: Likewise. * gcc.target/i386/iamcu/test_struct_returning.c: Likewise. * gcc.target/i386/iamcu/test_varargs.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225199 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp (limited to 'gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp') diff --git a/gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp b/gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp new file mode 100644 index 00000000000..b5b3261039a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp @@ -0,0 +1,42 @@ +# Copyright (C) 2015 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# The Intel MCU psABI testsuite needs one additional assembler file for +# most testcases. For simplicity we will just link it into each test. + +load_lib c-torture.exp +load_lib target-supports.exp +load_lib torture-options.exp + +if { (![istarget x86_64-*-linux*] && ![istarget i?86-*-linux*]) + || ![is-effective-target ia32] } then { + return +} + + +torture-init +set-torture-options $C_TORTURE_OPTIONS +set additional_flags "-miamcu -W -Wall -Wno-abi" + +foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] { + if {[runtest_file_p $runtests $src]} { + c-torture-execute [list $src \ + $srcdir/$subdir/asm-support.S] \ + $additional_flags + } +} + +torture-finish -- cgit v1.2.3