public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, testsuite]: Skip ms_hook_prologue.c when attribute is not   supported.
@ 2009-10-13 12:50 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2009-10-13 12:50 UTC (permalink / raw)
  To: gcc-patches; +Cc: Stefan Dösinger

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

Hello!

Stefan, can you check this testsuite patch, if your test still
compiles/executes correctly when toolchain supports swapped insns?

2009-10-13  Uros Bizjak  <ubizjak@gmail.com>

	* gcc.target/i386/i386.exp (check_effective_target_ms_hook_prologue):
	New procedure.
	* gcc.target/i386/ms_hook_prologue.c: Use ms_hook_prologue
	effective target.

Patch was tested with x86_64-pc-linux-gnu with toolchain that does not
support swapped insns.

Thanks,
Uros.

[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 1272 bytes --]

Index: gcc.target/i386/i386.exp
===================================================================
--- gcc.target/i386/i386.exp	(revision 152699)
+++ gcc.target/i386/i386.exp	(working copy)
@@ -24,6 +24,18 @@
 # Load support procs.
 load_lib gcc-dg.exp
 
+# Return 1 if attribute ms_hook_prologue is supported.
+proc check_effective_target_ms_hook_prologue { } {
+    if { [check_effective_target_ilp32]
+	 && [check_no_compiler_messages ms_hook_prologue object {
+	     void __attribute__ ((__ms_hook_prologue__)) foo ();
+	 } ""] } {
+	return 1
+    } else {
+	return 0
+    }
+}
+
 # Return 1 if ssse3 instructions can be compiled.
 proc check_effective_target_ssse3 { } {
     return [check_no_compiler_messages ssse3 object {
Index: gcc.target/i386/ms_hook_prologue.c
===================================================================
--- gcc.target/i386/ms_hook_prologue.c	(revision 152699)
+++ gcc.target/i386/ms_hook_prologue.c	(working copy)
@@ -1,7 +1,7 @@
 /* Test that the ms_hook_prologue attribute generates the correct code.  */
 
 /* { dg-do run } */
-/* { dg-require-effective-target ilp32 } */
+/* { dg-require-effective-target ms_hook_prologue } */
 /* { dg-options "-O2 -fomit-frame-pointer" } */
 
 int __attribute__ ((__ms_hook_prologue__)) foo ()

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-13 12:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-13 12:50 [PATCH, testsuite]: Skip ms_hook_prologue.c when attribute is not supported Uros Bizjak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).