OSDN Git Service

* gcc.target/i386/i386.exp (check_effective_target_ms_hook_prologue):
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 2009 06:53:28 +0000 (06:53 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 2009 06:53:28 +0000 (06:53 +0000)
New procedure.
* gcc.target/i386/ms_hook_prologue.c: Check for  ms_hook_prologue
effective target.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152753 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/i386.exp
gcc/testsuite/gcc.target/i386/ms_hook_prologue.c

index 1cf82ff..1cfea09 100644 (file)
@@ -1,3 +1,10 @@
+2009-10-14  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: Check for  ms_hook_prologue
+       effective target.
+
 2009-10-14  Jason Merrill  <jason@redhat.com>
 
        PR c++/39866
index c7c6e12..3bfac8d 100644 (file)
@@ -24,6 +24,18 @@ if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
 # 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 19438e7..f945492 100644 (file)
@@ -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 ()