diff mbox

[testsuite] Fix ultrasparc_vis[23]_hw tests

Message ID yddipmdjyzr.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Nov. 21, 2011, 3:07 p.m. UTC
The new gcc.target/sparc/vec-init-[1-3]-vis3.c tests might fail on
Solaris 10 and 11 with Sun as on non-VIS3 capable hardware
(e.g. UltraSPARC T2 or UltraSPARC IV) like this:

ld.so.1: vec-init-1-vis3.exe: fatal: vec-init-1-vis3.exe: hardware capability (C
A_SUNW_HW_1) unsupported: 0x400  [ VIS3 ]
FAIL: gcc.target/sparc/vec-init-1-vis3.c execution test

This shouldn't happen, the tests should appear as UNSUPPORTED instead.  I
could trace this to the ultrasparc*_hw effective-target tests, which all
use the ultrasparc_hw keyword, so checking the wrong test.  By fixing
this, the test correctly appear as UNSUPPORTED in an
sparc-sun-solaris2.11 bootstrap.

Installed on mainline.

	Rainer


2011-11-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* lib/target-supports.exp
	(check_effective_target_ultrasparc_vis2_hw): Call check_runtime
	with ultrasparc_vis2_hw.
	(check_effective_target_ultrasparc_vis3_hw): Call check_runtime
	with ultrasparc_vis3_hw.

Comments

David Miller Nov. 21, 2011, 6:28 p.m. UTC | #1
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date: Mon, 21 Nov 2011 16:07:04 +0100

> The new gcc.target/sparc/vec-init-[1-3]-vis3.c tests might fail on
> Solaris 10 and 11 with Sun as on non-VIS3 capable hardware
> (e.g. UltraSPARC T2 or UltraSPARC IV) like this:
> 
> ld.so.1: vec-init-1-vis3.exe: fatal: vec-init-1-vis3.exe: hardware capability (C
> A_SUNW_HW_1) unsupported: 0x400  [ VIS3 ]
> FAIL: gcc.target/sparc/vec-init-1-vis3.c execution test
> 
> This shouldn't happen, the tests should appear as UNSUPPORTED instead.  I
> could trace this to the ultrasparc*_hw effective-target tests, which all
> use the ultrasparc_hw keyword, so checking the wrong test.  By fixing
> this, the test correctly appear as UNSUPPORTED in an
> sparc-sun-solaris2.11 bootstrap.
> 
> Installed on mainline.

Thanks for fixing this.
diff mbox

Patch

# HG changeset patch
# Parent cbea07084d66f62d8e3d9405e9f5ca17d56ef97b
Fix ultrasparc_vis[23]_hw tests

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2476,7 +2476,7 @@  proc check_effective_target_ultrasparc_h
 # instructions.  We check this by attempting: "bmask %g0, %g0, %g0"
 
 proc check_effective_target_ultrasparc_vis2_hw { } {
-    return [check_runtime ultrasparc_hw {
+    return [check_runtime ultrasparc_vis2_hw {
 	int main() { __asm__(".word 0x81b00320"); return 0; }
     } "-mcpu=ultrasparc3"]
 }
@@ -2485,7 +2485,7 @@  proc check_effective_target_ultrasparc_v
 # instructions.  We check this by attempting: "addxc %g0, %g0, %g0"
 
 proc check_effective_target_ultrasparc_vis3_hw { } {
-    return [check_runtime ultrasparc_hw {
+    return [check_runtime ultrasparc_vis3_hw {
 	int main() { __asm__(".word 0x81b00220"); return 0; }
     } "-mcpu=niagara3"]
 }