* 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.
From-SVN: r152753
+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
# 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 {
/* 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 ()