diff options
author | Chung-Lin Tang <cltang@codesourcery.com> | 2010-10-28 18:11:11 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 2010-10-28 18:11:11 +0000 |
commit | 46e0720d661b7642c7a8339db07f1dc5f4a79aa7 (patch) | |
tree | fbab5755aacbd7106c0f151823e9630759a60bf8 /libffi/testsuite | |
parent | f17aa4adf8e01cca835b37d677aa1eaf6796816c (diff) | |
download | gcc-46e0720d661b7642c7a8339db07f1dc5f4a79aa7.zip gcc-46e0720d661b7642c7a8339db07f1dc5f4a79aa7.tar.gz gcc-46e0720d661b7642c7a8339db07f1dc5f4a79aa7.tar.bz2 |
Add ARM VFP ABI support to libffi.
From-SVN: r166032
Diffstat (limited to 'libffi/testsuite')
-rw-r--r-- | libffi/testsuite/lib/libffi-dg.exp | 50 | ||||
-rw-r--r-- | libffi/testsuite/libffi.call/cls_double_va.c | 2 | ||||
-rw-r--r-- | libffi/testsuite/libffi.call/cls_longdouble_va.c | 2 |
3 files changed, 54 insertions, 0 deletions
diff --git a/libffi/testsuite/lib/libffi-dg.exp b/libffi/testsuite/lib/libffi-dg.exp index bd5a7c8..82d6652 100644 --- a/libffi/testsuite/lib/libffi-dg.exp +++ b/libffi/testsuite/lib/libffi-dg.exp @@ -272,6 +272,56 @@ proc dg-xfail-if { args } { } } +proc check-flags { args } { + + # The args are within another list; pull them out. + set args [lindex $args 0] + + # The next two arguments are optional. If they were not specified, + # use the defaults. + if { [llength $args] == 2 } { + lappend $args [list "*"] + } + if { [llength $args] == 3 } { + lappend $args [list ""] + } + + # If the option strings are the defaults, or the same as the + # defaults, there is no need to call check_conditional_xfail to + # compare them to the actual options. + if { [string compare [lindex $args 2] "*"] == 0 + && [string compare [lindex $args 3] "" ] == 0 } { + set result 1 + } else { + # The target list might be an effective-target keyword, so replace + # the original list with "*-*-*", since we already know it matches. + set result [check_conditional_xfail [lreplace $args 1 1 "*-*-*"]] + } + + return $result +} + +proc dg-skip-if { args } { + # Verify the number of arguments. The last two are optional. + set args [lreplace $args 0 0] + if { [llength $args] < 2 || [llength $args] > 4 } { + error "dg-skip-if 2: need 2, 3, or 4 arguments" + } + + # Don't bother if we're already skipping the test. + upvar dg-do-what dg-do-what + if { [lindex ${dg-do-what} 1] == "N" } { + return + } + + set selector [list target [lindex $args 1]] + if { [dg-process-target $selector] == "S" } { + if [check-flags $args] { + upvar dg-do-what dg-do-what + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] + } + } +} # We need to make sure that additional_files and additional_sources # are both cleared out after every test. It is not enough to clear diff --git a/libffi/testsuite/libffi.call/cls_double_va.c b/libffi/testsuite/libffi.call/cls_double_va.c index 0695874..62bebbd 100644 --- a/libffi/testsuite/libffi.call/cls_double_va.c +++ b/libffi/testsuite/libffi.call/cls_double_va.c @@ -6,6 +6,8 @@ /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ /* { dg-output "" { xfail avr32*-*-* } } */ +/* { dg-skip-if "" arm*-*-* { "-mfloat-abi=hard" } { "" } } */ + #include "ffitest.h" static void diff --git a/libffi/testsuite/libffi.call/cls_longdouble_va.c b/libffi/testsuite/libffi.call/cls_longdouble_va.c index 38564cb..b33b2b7 100644 --- a/libffi/testsuite/libffi.call/cls_longdouble_va.c +++ b/libffi/testsuite/libffi.call/cls_longdouble_va.c @@ -6,6 +6,8 @@ /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */ /* { dg-output "" { xfail avr32*-*-* x86_64-*-mingw* } } */ +/* { dg-skip-if "" arm*-*-* { "-mfloat-abi=hard" } { "" } } */ + #include "ffitest.h" static void |