Commit 4c494a15 by Zack Weinberg

ia64.c (ia64_va_arg): Pass pointer for variable-sized type through convert_memory_address.

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
parent baba70d0
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> 2003-12-23 Jan Hubicka <jh@suse.cz>
* common.opt (fprofile-generate,fprofile-use): Add. * common.opt (fprofile-generate,fprofile-use): Add.
......
...@@ -3742,8 +3742,12 @@ ia64_va_arg (tree valist, tree type) ...@@ -3742,8 +3742,12 @@ ia64_va_arg (tree valist, tree type)
/* Variable sized types are passed by reference. */ /* Variable sized types are passed by reference. */
if (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST) if (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
{ {
rtx addr = std_expand_builtin_va_arg (valist, build_pointer_type (type)); rtx addr = force_reg (ptr_mode,
return gen_rtx_MEM (ptr_mode, force_reg (Pmode, addr)); 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 /* Arguments with alignment larger than 8 bytes start at the next even
...@@ -7511,6 +7515,10 @@ ia64_in_small_data_p (tree exp) ...@@ -7511,6 +7515,10 @@ ia64_in_small_data_p (tree exp)
if (TREE_CODE (exp) == STRING_CST) if (TREE_CODE (exp) == STRING_CST)
return false; 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)) if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
{ {
const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp)); const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
......
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> 2003-12-23 Mark Mitchell <mark@codesourcery.com>
* g++.dg/abi/macro0.C: New test. * g++.dg/abi/macro0.C: New test.
......
...@@ -11,7 +11,11 @@ ...@@ -11,7 +11,11 @@
(p7) mov r14 = r0 (p7) mov r14 = r0
that appears to be a WAW violation. */ 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 unsigned long int unsigned_word;
typedef signed long int signed_word; typedef signed long int signed_word;
......
/* The problem on IA-64 is that the assembler emits /* The problem on IA-64 is that the assembler emits
Warning: Additional NOP may be necessary to workaround Itanium 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 __complex__ float
func (__complex__ float x) func (__complex__ float x)
......
...@@ -130,8 +130,17 @@ proc gcc-dg-test { prog do_what extra_tool_flags } { ...@@ -130,8 +130,17 @@ proc gcc-dg-test { prog do_what extra_tool_flags } {
} }
proc gcc-dg-prune { system text } { proc gcc-dg-prune { system text } {
global additional_prunes
set text [prune_gcc_output $text] 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. # 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 # This is tricky to deal with in a large testsuite like c-torture so
# deal with it here. Just mark the testcase as unsupported. # deal with it here. Just mark the testcase as unsupported.
...@@ -329,6 +338,18 @@ proc dg-require-dll { args } { ...@@ -329,6 +338,18 @@ proc dg-require-dll { args } {
set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] 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. # Like check_conditional_xfail, but callable from a dg test.
proc dg-xfail-if { args } { proc dg-xfail-if { args } {
...@@ -341,11 +362,10 @@ 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 # We need to make sure that additional_* are cleared out after every
# are both cleared out after every test. It is not enough to clear # test. It is not enough to clear them out *before* the next test run
# them out *before* the next test run because gcc-target-compile gets # because gcc-target-compile gets run directly from some .exp files
# run directly from some .exp files (outside of any test). (Those # (outside of any test). (Those uses should eventually be eliminated.)
# uses should eventually be eliminated.)
# Because the DG framework doesn't provide a hook that is run at the # 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. # end of a test, we must replace dg-test with a wrapper.
...@@ -356,15 +376,19 @@ if { [info procs saved-dg-test] == [list] } { ...@@ -356,15 +376,19 @@ if { [info procs saved-dg-test] == [list] } {
proc dg-test { args } { proc dg-test { args } {
global additional_files global additional_files
global additional_sources global additional_sources
global additional_prunes
global errorInfo global errorInfo
if { [ catch { eval saved-dg-test $args } errmsg ] } { if { [ catch { eval saved-dg-test $args } errmsg ] } {
set saved_info $errorInfo set saved_info $errorInfo
set additional_files "" set additional_files ""
set additional_sources "" set additional_sources ""
set additional_prunes ""
error $errmsg $saved_info error $errmsg $saved_info
} }
set additional_files "" set additional_files ""
set additional_sources "" set additional_sources ""
set additional_prunes ""
} }
} }
set additional_prunes ""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment