Commit 4951f98d by Janis Johnson Committed by Janis Johnson

altivec-2.C: Check for hardware support before executing any VMX instructions.

2004-08-12  Janis Johnson  <janis187@us.ibm.com>

	* g++.dg/ext/altivec-2.C: Check for hardware support before
	executing any VMX instructions.

From-SVN: r85890
parent 30052385
2004-08-12 Janis Johnson <janis187@us.ibm.com> 2004-08-12 Janis Johnson <janis187@us.ibm.com>
* g++.dg/ext/altivec-2.C: Check for hardware support before
executing any VMX instructions.
* gcc.dg/vmx/ops-long-2.c: Add dg-error directives. * gcc.dg/vmx/ops-long-2.c: Add dg-error directives.
2004-08-12 Jakub Jelinek <jakub@redhat.com> 2004-08-12 Jakub Jelinek <jakub@redhat.com>
......
...@@ -8,15 +8,13 @@ ...@@ -8,15 +8,13 @@
#include <altivec.h> #include <altivec.h>
#include "altivec_check.h" #include "altivec_check.h"
int main (int argc, const char * argv[]) int main1 (void)
{ {
int i; int i;
const float cf = 1.0; const float cf = 1.0;
vector float v; vector float v;
const vector float cv = (vector float){1.0, 2.0, 3.0, 4.0}; const vector float cv = (vector float){1.0, 2.0, 3.0, 4.0};
altivec_check ();
vec_dst(&cv, i, 0); vec_dst(&cv, i, 0);
v = vec_ld(0, &cv); v = vec_ld(0, &cv);
v = vec_lde(0, &cf); v = vec_lde(0, &cf);
...@@ -24,3 +22,9 @@ int main (int argc, const char * argv[]) ...@@ -24,3 +22,9 @@ int main (int argc, const char * argv[])
return 0; return 0;
} }
int main (int argc, const char * argv[])
{
altivec_check ();
return main1 ();
}
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