ia64.c (ia64_va_arg): Pass pointer for variable-sized type through convert_memory_add...
authorZack Weinberg <zack@gcc.gnu.org>
Tue, 23 Dec 2003 20:25:49 +0000 (20:25 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Tue, 23 Dec 2003 20:25:49 +0000 (20:25 +0000)
gcc:
* config/ia64/ia64.c (ia64_va_arg): Pass pointer for
variable-sized type through convert_memory_address.
(ia64_in_small_data_p): Always return false for FUNCTION_DECLs.

gcc/testsuite:
* lib/gcc-dg.exp (dg-prune-output): New annotation.
(additional_prunes): New global.
(gcc-dg-prune): Handle additional per-test pruning.
(dg-test): Clear additional_prunes between tests.

* gcc.c-torture/compile/920625-1.c: Remove xfail.  Use
dg-prune-output to avoid spurious failures from assembler
complaining about nonexistent WAW violations.
* gcc.c-torture/compile/981223-1.c: Remove dg-options line.
Use dg-prune-output to avoid spurious failures from assembler
warning about Itanium B-step errata.

From-SVN: r74980

gcc/ChangeLog
gcc/config/ia64/ia64.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/920625-1.c
gcc/testsuite/gcc.c-torture/compile/981223-1.c
gcc/testsuite/lib/gcc-dg.exp

index eada3ded3a9f46a64d549b2dfb996475919ae1bd..58468c92a70872aa9179e6a95b6a9a1feecb8b3e 100644 (file)
@@ -1,3 +1,9 @@
+2003-12-23  Zack Weinberg  <zack@codesourcery.com>
+
+       * config/ia64/ia64.c (ia64_va_arg): Pass pointer for
+       variable-sized type through convert_memory_address.
+       (ia64_in_small_data_p): Always return false for FUNCTION_DECLs.
+
 2003-12-23  Jan Hubicka  <jh@suse.cz>
 
        * common.opt (fprofile-generate,fprofile-use): Add.
@@ -47,7 +53,7 @@
        -falt-external-templates and -ftemplates.
        * doc/invoke.texi: Remove mention of -fexternal-templates and
        -falt-external-templates.
-       
+
 2003-12-22  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR target/13466
 
 2003-12-22  Fariborz Jahanian <fjahanian@apple.com>
 
-        * config/rs6000/rs6000.c (legitimate_offset_address_p): Correct
-        check for the legitimate offset when memory of 
-       DImode/DFmode/TFmode/TImode mode is being referenced and target 
+       * config/rs6000/rs6000.c (legitimate_offset_address_p): Correct
+       check for the legitimate offset when memory of
+       DImode/DFmode/TFmode/TImode mode is being referenced and target
        is TARGET_POWERPC64.
 
 2003-12-22  Dale Johannesen  <dalej@apple.com>
 
-        * reload1.c:  Add reg_reloaded_call_part_clobbered.
-        (reload_as_needed):  Use it.
-        (forget_old_reloads_1):  Ditto.
-        (emit_reload_insns):  Ditto.
+       * reload1.c:  Add reg_reloaded_call_part_clobbered.
+       (reload_as_needed):  Use it.
+       (forget_old_reloads_1):  Ditto.
+       (emit_reload_insns):  Ditto.
 
 2003-12-22  Dale Johannesen  <dalej@apple.com>
 
-        PR optimization/12828
-        * loop.c:  Add find_regs_nested to look inside CLOBBER(MEM).
-        (scan_loop):  Call it.
-        * regclass.c (reg_scan_mark_regs):  Look inside CLOBBER(MEM).
+       PR optimization/12828
+       * loop.c:  Add find_regs_nested to look inside CLOBBER(MEM).
+       (scan_loop):  Call it.
+       * regclass.c (reg_scan_mark_regs):  Look inside CLOBBER(MEM).
 
 2003-12-22  Andrew Pinski  <pinskia@physics.uc.edu>
 
        * configure.in (gather-detailed-mem-stats): New flag.
        * configure: Regenerate.
        * config.in: Regenerate.
-       * doc/install.texi (Configuration): Document 
+       * doc/install.texi (Configuration): Document
        --enable-gather-detailed-mem-stats.
 
 2003-12-22  Kazu Hirata  <kazu@cs.umass.edu>
        * config/mn10300/mn10300.c: Likewise.
 
 2003-12-20  Andrew Pinski  <pinskia@gcc.gnu.org>
-            Matt Thomas  <matt@3am-software.com>
+           Matt Thomas  <matt@3am-software.com>
 
        PR target/12749
        * config/i386/i386.c (print_operand): Print only the first
 
        * gcc/config/i386/i386.c (ix86_expand_call, x86_output_mi_thunk):
        Trivial fixes for i386.c on Darwin/x86.
-       
+
 2003-12-19  Fariborz Jahanian <fjahanian@apple.com>
 
-        * config/rs6000/rs6000.c (legitimate_lo_sum_address_p): Add code to
-        recognize macho-style lo_sum adrress patterns.
+       * config/rs6000/rs6000.c (legitimate_lo_sum_address_p): Add code to
+       recognize macho-style lo_sum adrress patterns.
 
 2003-12-19  Kazu Hirata  <kazu@cs.umass.edu>
 
 
 2003-12-18  Ulrich Weigand  <uweigand@de.ibm.com>
 
-       * loop.c (move_movables): Handle combination of m->consec, 
+       * loop.c (move_movables): Handle combination of m->consec,
        m->move_insn_first, and m->insert_temp all nonzero correctly.
 
 2003-12-18  Kazu Hirata  <kazu@cs.umass.edu>
 
 2003-12-17  James E Wilson  <wilson@specifixinc.com>
            Roger Sayle  <roger@eyesopen.com>
-       
+
        * Makefile.in (gcse.o): Add $(TREE_H) to dependencies.
        * gcse.c: Include tree.h.
        (implicit_set_cond_p): New.
        * config/m32r/m32r.md (cmp_ne_small_const_insn): Remove.
 
 2003-12-17  Neil Booth  <neil@daikokuya.co.uk>
-            Joseph S. Myers  <jsm@polyomino.org.uk>
+           Joseph S. Myers  <jsm@polyomino.org.uk>
 
        PR c/3347
        * c-decl.c (enum_decl_context): Remove BITFIELD.
        * ginclude/stddef.h (offsetof): Reimplement for C++, using
        __offsetof__.
        * doc/extend.texi: Document __offsetof__.
-       
+
 2003-12-16  Stan Cox  <scox@redhat.com>
 
        * config/iq2000/iq2000.h: Formatting.
 
        * altivec.h (vec_cmple, vec_all_numeric): Fix typo.
        * testsuite/gcc.dg/altivec-10.c: Test for above.
-       
+
 2003-12-15  David O'Brien  <obrien@FreeBSD.org>
 
        * Makefile.in (CPPFLAGS): Initialize from configure.
index beba14fe42907c8ca73274d028c31c6be543e2b0..67df9cb2b90a9c40a984dcaae3e592d98e171046 100644 (file)
@@ -3742,8 +3742,12 @@ ia64_va_arg (tree valist, tree type)
   /* Variable sized types are passed by reference.  */
   if (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
     {
-      rtx addr = std_expand_builtin_va_arg (valist, build_pointer_type (type));
-      return gen_rtx_MEM (ptr_mode, force_reg (Pmode, addr));
+      rtx addr = force_reg (ptr_mode,
+           std_expand_builtin_va_arg (valist, build_pointer_type (type)));
+#ifdef POINTERS_EXTEND_UNSIGNED
+      addr = convert_memory_address (Pmode, addr);
+#endif
+      return gen_rtx_MEM (ptr_mode, addr);
     }
 
   /* Arguments with alignment larger than 8 bytes start at the next even
@@ -7511,6 +7515,10 @@ ia64_in_small_data_p (tree exp)
   if (TREE_CODE (exp) == STRING_CST)
     return false;
 
+  /* Functions are never small data.  */
+  if (TREE_CODE (exp) == FUNCTION_DECL)
+    return false;
+
   if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
     {
       const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
index 7c5ee7fa3cb9a67424adcd966a9c11c6677d558f..eff3a2d3946f3a3a6d56109da13564f776995864 100644 (file)
@@ -1,3 +1,17 @@
+2003-12-23  Zack Weinberg  <zack@codesourcery.com>
+
+       * lib/gcc-dg.exp (dg-prune-output): New annotation.
+       (additional_prunes): New global.
+       (gcc-dg-prune): Handle additional per-test pruning.
+       (dg-test): Clear additional_prunes between tests.
+
+       * gcc.c-torture/compile/920625-1.c: Remove xfail.  Use
+       dg-prune-output to avoid spurious failures from assembler
+       complaining about nonexistent WAW violations.
+       * gcc.c-torture/compile/981223-1.c: Remove dg-options line.
+       Use dg-prune-output to avoid spurious failures from assembler
+       warning about Itanium B-step errata.
+
 2003-12-23  Mark Mitchell  <mark@codesourcery.com>
 
        * g++.dg/abi/macro0.C: New test.
        * g++.dg/template/type1.C: Likewise.
        * g++.old-deja/g++.other/crash32.C: Likewise.
        * g++.old-djea/g++.pt/defarg8.C: Likewise.
-       
+
 2003-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
 
        PR c++/13106
index 137e0dc1f17f1216b6d512aedfb00c36fc6ff05f..6a52b029bade3cd8ecabf1881768f4c7ba60d4fe 100644 (file)
         (p7) mov r14 = r0
 
    that appears to be a WAW violation. */
-/* { dg-xfail-if "missing .pred.rel.mutex directive" "ia64-*-*" { "-O1" "-O2" "-O3" "-Os" } { "" } } */
+
+/* { dg-prune-output "Assembler messages" } */
+/* { dg-prune-output "violate\[^\n\]*dependency" } */
+/* { dg-prune-output "first path encountering" } */
+/* { dg-prune-output "location of the conflicting" } */
 
 typedef unsigned long int unsigned_word;
 typedef signed long int signed_word;
index d0939f62eaf963a6006cda890f53c74821f8550c..b62894807496eae66f17a7082997c19e79b39ef5 100644 (file)
@@ -1,11 +1,11 @@
 /* The problem on IA-64 is that the assembler emits
 
    Warning: Additional NOP may be necessary to workaround Itanium
-   processor A/B step errata
+   processor A/B step errata  */
+
+/* { dg-prune-output "Assembler messages" } */
+/* { dg-prune-output "Additional NOP may be necessary" } */
 
-   This can be fixed by adding "-mb-step" to the command line, which
-   does in fact add the extra nop. */
-/* { dg-options "-w -mb-step" { target ia64-*-* } } */
 
 __complex__ float
 func (__complex__ float x)
index 819e3ca5814efb85ac208c15a88a1edd3dffb870..f2ba88eec4742b6aa2cde0f1c2edcabb67373918 100644 (file)
@@ -130,8 +130,17 @@ proc gcc-dg-test { prog do_what extra_tool_flags } {
 }
 
 proc gcc-dg-prune { system text } {
+    global additional_prunes
+
     set text [prune_gcc_output $text]
 
+    foreach p $additional_prunes {
+       if { [string length $p] > 0 } {
+           # Following regexp matches a complete line containing $p.
+           regsub -all "(^|\n)\[^\n\]*$p\[^\n\]*" $text "" text
+       }
+    }
+
     # If we see "region xxx is full" then the testcase is too big for ram.
     # This is tricky to deal with in a large testsuite like c-torture so
     # deal with it here.  Just mark the testcase as unsupported.
@@ -329,6 +338,18 @@ proc dg-require-dll { args } {
     set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
 }
 
+# Prune any messages matching ARGS[1] (a regexp) from test output.
+proc dg-prune-output { args } {
+    global additional_prunes
+
+    if { [llength $args] != 2 } {
+       error "[lindex $args 1]: need one argument"
+       return
+    }
+
+    lappend additional_prunes [lindex $args 1]
+}
+
 # Like check_conditional_xfail, but callable from a dg test.
 
 proc dg-xfail-if { args } {
@@ -341,11 +362,10 @@ proc dg-xfail-if { args } {
 }
 
 
-# We need to make sure that additional_files and additional_sources
-# are both cleared out after every test.  It is not enough to clear
-# them out *before* the next test run because gcc-target-compile gets
-# run directly from some .exp files (outside of any test).  (Those
-# uses should eventually be eliminated.) 
+# We need to make sure that additional_* are cleared out after every
+# test.  It is not enough to clear them out *before* the next test run
+# because gcc-target-compile gets run directly from some .exp files
+# (outside of any test).  (Those uses should eventually be eliminated.)
 
 # Because the DG framework doesn't provide a hook that is run at the
 # end of a test, we must replace dg-test with a wrapper.
@@ -356,15 +376,19 @@ if { [info procs saved-dg-test] == [list] } {
     proc dg-test { args } {
        global additional_files
        global additional_sources
+       global additional_prunes
        global errorInfo
 
        if { [ catch { eval saved-dg-test $args } errmsg ] } {
            set saved_info $errorInfo
            set additional_files ""
            set additional_sources ""
+           set additional_prunes ""
            error $errmsg $saved_info
        }
        set additional_files ""
        set additional_sources ""
+       set additional_prunes ""
     }
 }
+set additional_prunes ""