OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vmx/] [varargs-7.c] - Blame information for rev 823

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
#include "harness.h"
2
#include <stdarg.h>
3
 
4
static void
5
varargsn001(vector unsigned int p1, vector unsigned int p2,
6
            vector unsigned int p3, vector unsigned int p4,
7
            vector unsigned int p5, vector unsigned int p6,
8
            vector unsigned int p7, vector unsigned int p8,
9
            vector unsigned int p9, vector unsigned int p10,
10
            vector unsigned int p11, vector unsigned int p12,
11
            vector unsigned int p13, ...)
12
{
13
  va_list ap;
14
  vector unsigned int i1;
15
  vector unsigned int i2;
16
  vector unsigned int i3;
17
  vector unsigned int i4;
18
  vector unsigned int i5;
19
  vector unsigned int i6;
20
  vector unsigned int i7;
21
  vector unsigned int i8;
22
  vector unsigned int i9;
23
  vector unsigned int i10;
24
  vector unsigned int i11;
25
  vector unsigned int i12;
26
  vector unsigned int i13;
27
  vector unsigned int i14;
28
  int i15;
29
 
30
  va_start(ap, p13);
31
 
32
  i1 = p1;
33
  i2 = p2;
34
  i3 = p3;
35
  i4 = p4;
36
  i5 = p5;
37
  i6 = p6;
38
  i7 = p7;
39
  i8 = p8;
40
  i9 = p9;
41
  i10 = p10;
42
  i11 = p11;
43
  i12 = p12;
44
  i13 = p13;
45
  i14 = va_arg(ap, vector unsigned int);
46
  i15 = va_arg(ap, int);
47
  va_end(ap);
48
 
49
  check(vec_all_eq(i1, ((vector unsigned int){1,1,1,1})), "i1");
50
  check(vec_all_eq(i2, ((vector unsigned int){2,2,2,2})), "i2");
51
  check(vec_all_eq(i3, ((vector unsigned int){3,3,3,3})), "i3");
52
  check(vec_all_eq(i4, ((vector unsigned int){4,4,4,4})), "i4");
53
  check(vec_all_eq(i5, ((vector unsigned int){5,5,5,5})), "i5");
54
  check(vec_all_eq(i6, ((vector unsigned int){6,6,6,6})), "i6");
55
  check(vec_all_eq(i7, ((vector unsigned int){7,7,7,7})), "i7");
56
  check(vec_all_eq(i8, ((vector unsigned int){8,8,8,8})), "i8");
57
  check(vec_all_eq(i9, ((vector unsigned int){9,9,9,9})), "i9");
58
  check(vec_all_eq(i10, ((vector unsigned int){10,10,10,10})), "i10");
59
  check(vec_all_eq(i11, ((vector unsigned int){11,11,11,11})), "i11");
60
  check(vec_all_eq(i12, ((vector unsigned int){12,12,12,12})), "i12");
61
  check(vec_all_eq(i13, ((vector unsigned int){13,13,13,13})), "i13");
62
  check(vec_all_eq(i14, ((vector unsigned int){14,14,14,14})), "i14");
63
  check(i15 == 15, "i15");
64
}
65
 
66
static void test()
67
{
68
  varargsn001(((vector unsigned int){1,1,1,1}),
69
              ((vector unsigned int){2,2,2,2}),
70
              ((vector unsigned int){3,3,3,3}),
71
              ((vector unsigned int){4,4,4,4}),
72
              ((vector unsigned int){5,5,5,5}),
73
              ((vector unsigned int){6,6,6,6}),
74
              ((vector unsigned int){7,7,7,7}),
75
              ((vector unsigned int){8,8,8,8}),
76
              ((vector unsigned int){9,9,9,9}),
77
              ((vector unsigned int){10,10,10,10}),
78
              ((vector unsigned int){11,11,11,11}),
79
              ((vector unsigned int){12,12,12,12}),
80
              ((vector unsigned int){13,13,13,13}),
81
              ((vector unsigned int){14,14,14,14}),
82
              15);
83
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.