annotate test/offset.c @ 377:b23568be1155

ARM continue (const table)
author kono
date Tue, 13 Jul 2004 21:43:58 +0900
parents 91849fdeea60
children 0c256ea2a97e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
373
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
1
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
2 #define BIT8 260
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
3 #define BIT10 1030
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
4 #define BIT12 5000
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
5 #define BIT16 (65536*2)
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
6
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
7 int midium[BIT12];
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
8 int large[BIT16];
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
9
375
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
10
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
11 main0(int ac,char *av[])
373
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
12 {
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
13 int *p;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
14 int local_midium[BIT12];
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
15 int local_large[BIT16];
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
16
375
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
17 #if 0
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
18 printf("int ac =\t%x\n",&ac);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
19 printf("int midium[0] =\t%x\n",&midium[0]);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
20 printf("int midium[BIT12] =\t%x\n",&midium[BIT12]);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
21 printf("int large[0] =\t%x\n",&large[0]);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
22 printf("int large[BIT16] =\t%x\n",&large[BIT16]);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
23 printf("int local_midium[0] =\t%x\n",&local_midium[0]);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
24 printf("int local_midium[BIT12] =\t%x\n",&local_midium[BIT12]);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
25 printf("int local_large[0] =\t%x\n",&local_large[0]);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
26 printf("int local_large[BIT16] =\t%x\n",&local_large[BIT16]);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
27 #endif
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
28
373
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
29 midium[0]=0x55;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
30 large[0]=0x55;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
31 local_midium[0]=0x55;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
32 local_large[0]=0x55;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
33
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
34 midium[BIT8]=0x50;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
35 large[BIT8]=0x50;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
36 local_midium[BIT8]=0x50;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
37 local_large[BIT8]=0x50;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
38
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
39 midium[BIT10]=0xa0;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
40 large[BIT10]=0xa0;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
41 local_midium[BIT10]=0xa0;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
42 local_large[BIT10]=0xa0;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
43
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
44 midium[BIT12-1]=0xaa;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
45 large[BIT16-1]=0xaa;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
46 local_midium[BIT12-1]=0xaa;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
47 local_large[BIT16-1]=0xaa;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
48
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
49 printf("%x\n", midium[0]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
50 printf("%x\n", large[0]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
51 printf("%x\n", local_midium[0]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
52 printf("%x\n", local_large[0]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
53
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
54 printf("%x\n", midium[BIT8]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
55 printf("%x\n", large[BIT8]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
56 printf("%x\n", local_midium[BIT8]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
57 printf("%x\n", local_large[BIT8]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
58
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
59 printf("%x\n", midium[BIT10]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
60 printf("%x\n", large[BIT10]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
61 printf("%x\n", local_midium[BIT10]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
62 printf("%x\n", local_large[BIT10]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
63
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
64 printf("%x\n", midium[BIT12-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
65 printf("%x\n", large[BIT16-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
66 printf("%x\n", local_midium[BIT12-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
67 printf("%x\n", local_large[BIT16-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
68
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
69 p = local_large+BIT16;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
70
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
71 p[-1] = 0xaa;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
72 p[-BIT8] = 0xbb;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
73 p[-BIT10] = 0xcc;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
74 p[-(BIT12-1)] = 0xdd;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
75 p[-(BIT16-1)] = 0xee;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
76
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
77 printf("%x\n", p[-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
78 printf("%x\n", p[-BIT8]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
79 printf("%x\n", p[-BIT10]);
375
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
80 printf("%x\n", p[-(BIT12-1)]);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
81 printf("%x\n", p[-(BIT16-1)]);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
82
377
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
83 p = large+BIT16;
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
84
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
85 p[-1] = 0xaa;
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
86 p[-BIT8] = 0xbb;
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
87 p[-BIT10] = 0xcc;
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
88 p[-(BIT12-1)] = 0xdd;
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
89 p[-(BIT16-1)] = 0xee;
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
90
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
91 printf("%x\n", p[-1]);
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
92 printf("%x\n", p[-BIT8]);
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
93 printf("%x\n", p[-BIT10]);
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
94 printf("%x\n", p[-(BIT12-1)]);
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
95 printf("%x\n", p[-(BIT16-1)]);
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
96
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
97
375
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
98 for(p=local_midium;p<&local_midium[BIT12];p++) *p = p-local_midium;
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
99 for(p=local_large;p<&local_large[BIT16];p++) *p = p-local_large;
373
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
100
377
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
101 for(p=midium;p<&midium[BIT12];p++) *p = p-midium;
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
102 for(p=large;p<&large[BIT16];p++) *p = p-large;
b23568be1155 ARM continue (const table)
kono
parents: 375
diff changeset
103
373
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
104 }
375
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
105
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
106 main(int ac,char *av[])
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
107 {
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
108 int i=-1,j=-2,k=-3;
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
109
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
110 main0(ac,av);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
111
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
112 printf("%d %d %d %d\n",ac,i,j,k);
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
113 return 0;
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
114 }
91849fdeea60 PowerPC large offset.
kono
parents: 373
diff changeset
115