From patchwork Fri Oct 26 19:14:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: add check_effective_target_masm_intel Date: Fri, 26 Oct 2012 09:14:44 -0000 From: Jack Howarth X-Patchwork-Id: 194554 Message-Id: <20121026191444.GA12098@bromo.med.uc.edu> To: gcc-patches@gcc.gnu.org Cc: mikestump@comcast.net, iain@codesourcery.com, rth@gcc.gnu.org, ro@TechFak.Uni-Bielefeld.DE Currently targets like darwin which use older assemblers which lack support for the -masm=intel command line option fail these tests. The attached patch adds a proc for check_effective_target_masm_intel to target-supports.exp and uses it in the gcc.target/i386/asm-dialect-1.c test case. Tested on x86_64-apple-darwin12. Okay for gcc trunk? Jack gcc/testsuite/ 2012-10-26 Jack Howarth PR target/54255 * lib/target-supports.exp (check_effective_target_masm_intel): New proc. * gcc.target/i386/asm-dialect-1.c: Use dg-require-effective-target masm_intel. Index: gcc/testsuite/gcc.target/i386/asm-dialect-1.c =================================================================== --- gcc/testsuite/gcc.target/i386/asm-dialect-1.c (revision 192855) +++ gcc/testsuite/gcc.target/i386/asm-dialect-1.c (working copy) @@ -1,4 +1,5 @@ /* { dg-options "-masm=intel" } */ +/* { dg-require-effective-target masm_intel } */ extern void abort (void); Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp (revision 192855) +++ gcc/testsuite/lib/target-supports.exp (working copy) @@ -4617,6 +4617,15 @@ proc check_effective_target_split_stack } "-fsplit-stack"] } +# Return 1 if this target supports the -masm=intel option, 0 +# otherwise + +proc check_effective_target_masm_intel {} { + return [check_no_compiler_messages masm_intel object { + extern void abort (void); + } "-masm=intel"] +} + # Return 1 if the language for the compiler under test is C. proc check_effective_target_c { } {