|
From: <sv...@va...> - 2006-12-27 18:40:52
|
Author: sewardj
Date: 2006-12-27 18:40:47 +0000 (Wed, 27 Dec 2006)
New Revision: 6446
Log:
Add regtest for #139050.
Added:
trunk/none/tests/ppc32/bug139050-ppc32.c
trunk/none/tests/ppc32/bug139050-ppc32.stderr.exp
trunk/none/tests/ppc32/bug139050-ppc32.stdout.exp
trunk/none/tests/ppc32/bug139050-ppc32.vgtest
Modified:
trunk/none/tests/ppc32/Makefile.am
Modified: trunk/none/tests/ppc32/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc32/Makefile.am 2006-12-27 05:21:14 UTC (rev 6445)
+++ trunk/none/tests/ppc32/Makefile.am 2006-12-27 18:40:47 UTC (rev 6446)
@@ -2,6 +2,8 @@
noinst_SCRIPTS =3D filter_stderr
=20
EXTRA_DIST =3D $(noinst_SCRIPTS) \
+ bug139050-ppc32.stdout.exp bug139050-ppc32.stderr.exp \
+ bug139050-ppc32.vgtest \
ldstrev.stderr.exp ldstrev.stdout.exp ldstrev.vgtest \
lsw.stderr.exp lsw.stdout.exp lsw.vgtest \
jm-int.stderr.exp jm-int.stdout.exp jm-int.vgtest \
@@ -17,6 +19,7 @@
xlc_dbl_u32.stderr.exp xlc_dbl_u32.stdout.exp xlc_dbl_u32.vgtest
=20
check_PROGRAMS =3D \
+ bug139050-ppc32 \
ldstrev lsw jm-insns mftocrf mcrfs round test_fx test_gx \
testVMX twi xlc_dbl_u32
=20
Added: trunk/none/tests/ppc32/bug139050-ppc32.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc32/bug139050-ppc32.c (rev=
0)
+++ trunk/none/tests/ppc32/bug139050-ppc32.c 2006-12-27 18:40:47 UTC (rev=
6446)
@@ -0,0 +1,34 @@
+
+#include <stdio.h>
+#include <assert.h>
+
+typedef unsigned long long int ULong;
+typedef unsigned int UInt;
+=20
+static ULong GetCPU_ClockCyclesSinceStartup(void)=20
+ {=20
+ UInt uTimeBaseLow;=20
+ UInt uTimeBaseHigh;=20
+ UInt uCheck;=20
+ __asm__ __volatile__("1: mfspr %0,269\n\t"=20
+ " mfspr %1,268\n\t"=20
+ " mfspr %2,269\n\t"=20
+ " cmpw %2, %0\n\t"=20
+ " bne 1b"=20
+ : "=3Dr" (uTimeBaseHigh),=20
+ "=3Dr" (uTimeBaseLow),=20
+ "=3Dr" (uCheck)
+ : /*in*/
+ : /*trash*/ "cr0","cr7" );
+
+ return (((ULong)(uTimeBaseHigh) << 32) | uTimeBaseLow);=20
+ }=20
+=20
+ int main(int argc, char** argv)=20
+ {=20
+ ULong cys =3D GetCPU_ClockCyclesSinceStartup();
+ /* implausible that machine has been up less than 4G cycles */
+ assert(cys > (1ULL << 32));
+ printf("success\n");
+ return 0;=20
+ }
Added: trunk/none/tests/ppc32/bug139050-ppc32.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Added: trunk/none/tests/ppc32/bug139050-ppc32.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc32/bug139050-ppc32.stdout.exp =
(rev 0)
+++ trunk/none/tests/ppc32/bug139050-ppc32.stdout.exp 2006-12-27 18:40:47=
UTC (rev 6446)
@@ -0,0 +1 @@
+success
Added: trunk/none/tests/ppc32/bug139050-ppc32.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc32/bug139050-ppc32.vgtest =
(rev 0)
+++ trunk/none/tests/ppc32/bug139050-ppc32.vgtest 2006-12-27 18:40:47 UTC=
(rev 6446)
@@ -0,0 +1,2 @@
+prog: bug139050-ppc32
+vgopts: -q
|