diff options
author | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-28 18:11:11 +0000 |
---|---|---|
committer | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-28 18:11:11 +0000 |
commit | 415ca0cbe0befc4774c13214e515136d45c565bf (patch) | |
tree | fbab5755aacbd7106c0f151823e9630759a60bf8 /libffi/testsuite | |
parent | cc05a422675f2d75c58e11970bf451d81d027448 (diff) | |
download | gcc-415ca0cbe0befc4774c13214e515136d45c565bf.tar.gz |
Add ARM VFP ABI support to libffi.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166032 138bc75d-0d04-0410-961f-82ee72b054a4
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 bd5a7c84f48..82d6652c183 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 0695874b3ce..62bebbd7069 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 38564cb086b..b33b2b72214 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 |