docs: fix broken reference
[qemu/ar7.git] / tests / tcg / alpha / test-ovf.c
blob17892f1e89ecee533f59d39206a6f8243ea34b79
1 #include <unistd.h>
3 static long test_subqv (long a, long b)
5 long res;
7 asm ("subq/v %1,%2,%0"
8 : "=r" (res) : "r" (a), "r" (b));
9 return res;
11 static struct {
12 long (*func)(long, long);
13 long a;
14 long b;
15 long r;
16 } vectors[] =
18 {test_subqv, 0, 0x7d54000, 0xfffffffff82ac000L}
21 int main (void)
23 int i;
25 for (i = 0; i < sizeof (vectors)/sizeof(vectors[0]); i++)
26 if ((*vectors[i].func)(vectors[i].a, vectors[i].b) != vectors[i].r) {
27 write(1, "Failed\n", 7);
29 write(1, "OK\n", 3);
30 return 0;