annotate test/simp1.c @ 449:c55363eff5e5

parallel assignment (modify not completed)
author kono
date Thu, 25 Nov 2004 16:56:26 +0900
parents 0c256ea2a97e
children 32737bad7489
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
1 int
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
2 i(int a,int b,int c,int d,int f)
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
3 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
4 printf("#0003:i(%d,%d,%d,%d,%d)\n",a,b,c,d,f);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
5 return a+b+c+d+f;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
6 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
7
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
8 short
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
9 s(short a,short b,short c,short d,short f)
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
10 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
11 printf("#0010:s(%d,%d,%d,%d,%d)\n",a,b,c,d,f);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
12 return a+b+c+d+f;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
13 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
14
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
15 char
252
1452eb0eab20 *** empty log message ***
kono
parents: 249
diff changeset
16 ch(char a,char b,char c,char d,char f)
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
17 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
18 printf("#0017:ch(%d,%d,%d,%d,%d)\n",a,b,c,d,f);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
19 return a+b+c+d+f;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
20 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
21
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
22
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
23 float
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
24 f(float a,float b,float c,float d,float f)
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
25 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
26 printf("#0025:f(%g,%g,%g,%g,%g)\n",a,b,c,d,f);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
27 return a+b+c+d+f;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
28 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
29
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
30 double
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
31 d(double a,double b,double c,double d,double f)
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
32 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
33 printf("#0032:d(%g,%g,%g,%g,%g)\n",a,b,c,d,f);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
34 return a+b+c+d+f;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
35 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
36
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
37 long long
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
38 l(long long a,long long b,long long c,long long d,long long f)
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
39 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
40 printf("#0039:l(%lld,%lld,%lld,%lld,%lld)\n",a,b,c,d,f);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
41 return a+b+c+d+f;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
42 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
43
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
44
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
45 int
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
46 i0()
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
47 {
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
48 int a,b,c;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
49 a=3;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
50 b=-3;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
51 c=5;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
52 c = i(a*3,b*c,b+c,b/c,b-c);
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
53 printf("#0052:int: %d\n",c);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
54 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
55
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
56 int
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
57 g()
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
58 {
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
59 float a,b,c;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
60 a=3.0;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
61 b=-3.0;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
62 c=5.0;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
63 c = f(a*3,b*c,b+c,b/c,b-c);
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
64 printf("#0063:float: %g\n",c);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
65 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
66
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
67 int
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
68 h()
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
69 {
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
70 double a,b,c;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
71 a=3.0;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
72 b=-3.0;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
73 c=5.0;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
74 c = d(a*3,b*c,b+c,b/c,b-c);
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
75 printf("#0074:double: %g\n",c);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
76 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
77
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
78 int
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
79 h1()
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
80 {
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
81 long long a,b,c;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
82 a=3;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
83 b=-3;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
84 c=5;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
85 c = l(a*3,b*c,b+c,b/c,b-c);
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
86 printf("#0085:long long: %lld\n",c);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
87 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
88
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
89 int
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
90 c1()
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
91 {
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
92 char a,b,c;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
93 a=3;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
94 b=-3;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
95 c=5;
252
1452eb0eab20 *** empty log message ***
kono
parents: 249
diff changeset
96 c = ch(a*3,b*c,b+c,b/c,b-c);
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
97 printf("#0096:char: %d\n",c);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
98 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
99
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
100 int
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
101 s1()
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
102 {
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
103 short a,b,c;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
104 a=3;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
105 b=-3;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
106 c=5;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
107 c = s(a*3,b*c,b+c,b/c,b-c);
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 275
diff changeset
108 printf("#0107:short: %d\n",c);
249
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
109 }
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
110
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
111 main()
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
112 {
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
113 i0();
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
114 g();
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
115 h();
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
116 h1();
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
117 return 0;
8313c965c0e2 *** empty log message ***
kono
parents:
diff changeset
118 }