1 /* { dg-do compile } */
2
3 struct unipair
4 {
5 unsigned short unicode;
6 unsigned short fontpos;
7 };
8
9 struct __large_struct
10 {
11 unsigned long buf[100];
12 };
13
14 struct vc_data
15 {
16 unsigned long *vc_uni_pagedir_loc;
17 };
18
19 struct uni_pagedir
20 {
21 unsigned short **uni_pgdir[32];
22 };
23
con_get_unimap(struct vc_data * vc,unsigned short ct,unsigned short * uct,struct unipair * list)24 void con_get_unimap (struct vc_data *vc, unsigned short ct, unsigned short *uct,
25 struct unipair *list)
26 {
27 int i, j, k, ect;
28 unsigned short **p1, *p2;
29 struct uni_pagedir *p;
30
31 ect = 0;
32
33 if (*vc->vc_uni_pagedir_loc)
34 {
35 p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
36 for (i = 0; i < 32; i++)
37 if ((p1 = p->uni_pgdir[i]))
38 for (j = 0; j < 32; j++)
39 if ((p2 = *(p1++)))
40 for (k = 0; k < 64; k++)
41 {
42 if (*p2 < 512 && ect++ < ct)
43 {
44 {
45 long __pu_err;
46 __typeof__(*((&list->unicode))) *__pu_addr = ((&list->unicode));
47 __typeof__(*((&list->unicode))) __pu_val =
48 ((unsigned short)((i<<11)+(j<<6)+k));
49 __pu_err = 0;
50 switch ((sizeof(*(&list->unicode))))
51 {
52 case 1:
53 __asm__ __volatile__ (
54 "1:\n\t"
55 "mov." "b" " %1, %2\n\t"
56 "2:\n"
57 ".section .fixup,\"ax\"\n"
58 "3:\n\t"
59 "mov.l 4f, %0\n\t"
60 "jmp @%0\n\t"
61 " mov %3, %0\n\t"
62 ".balign 4\n"
63 "4: .long 2b\n\t"
64 ".previous\n"
65 ".section __ex_table,\"a\"\n\t"
66 ".long 1b, 3b\n\t"
67 ".previous"
68 : "=&r" (__pu_err)
69 : "r" (__pu_val), "m" ((*(struct __large_struct *)(__pu_addr))),
70 "i" (-14), "0" (__pu_err) : "memory" );
71
72 break;
73
74 case 2:
75 __asm__ __volatile__ (
76 "1:\n\t"
77 "mov." "w" " %1, %2\n\t"
78 "2:\n"
79 ".section .fixup,\"ax\"\n"
80 "3:\n\t"
81 "mov.l 4f, %0\n\t"
82 "jmp @%0\n\t"
83 " mov %3, %0\n\t"
84 ".balign 4\n"
85 "4: .long 2b\n\t"
86 ".previous\n"
87 ".section __ex_table,\"a\"\n\t"
88 ".long 1b, 3b\n\t"
89 ".previous"
90 : "=&r" (__pu_err)
91 : "r" (__pu_val), "m" ((*(struct __large_struct *)(__pu_addr))),
92 "i" (-14), "0" (__pu_err) : "memory" );
93 break;
94
95 default:
96 break;
97 }
98 }
99
100
101 {
102 long __pu_err;
103 __typeof__(*((&list->fontpos))) *__pu_addr = ((&list->fontpos));
104 __typeof__(*((&list->fontpos))) __pu_val = ((unsigned short) *p2);
105 __pu_err = 0;
106 switch ((sizeof(*(&list->fontpos))))
107 {
108 case 1:
109 __asm__ __volatile__ (
110 "1:\n\t"
111 "mov." "b" " %1, %2\n\t"
112 "2:\n"
113 ".section .fixup,\"ax\"\n"
114 "3:\n\t"
115 "mov.l 4f, %0\n\t"
116 "jmp @%0\n\t"
117 " mov %3, %0\n\t"
118 ".balign 4\n"
119 "4: .long 2b\n\t"
120 ".previous\n"
121 ".section __ex_table,\"a\"\n\t"
122 ".long 1b, 3b\n\t"
123 ".previous"
124 : "=&r" (__pu_err)
125 : "r" (__pu_val), "m" ((*(struct __large_struct *)(__pu_addr))),
126 "i" (-14), "0" (__pu_err) : "memory" );
127 break;
128
129 case 2:
130 __asm__ __volatile__ (
131 "1:\n\t"
132 "mov." "w" " %1, %2\n\t"
133 "2:\n"
134 ".section .fixup,\"ax\"\n"
135 "3:\n\t"
136 "mov.l 4f, %0\n\t"
137 "jmp @%0\n\t"
138 " mov %3, %0\n\t"
139 ".balign 4\n"
140 "4: .long 2b\n\t"
141 ".previous\n"
142 ".section __ex_table,\"a\"\n\t"
143 ".long 1b, 3b\n\t"
144 ".previous"
145 : "=&r" (__pu_err)
146 : "r" (__pu_val), "m" ((*(struct __large_struct *)(__pu_addr))),
147 "i" (-14), "0" (__pu_err) : "memory" );
148 break;
149
150 default:
151 break;
152 }
153 }
154
155 list++;
156 }
157 p2++;
158 }
159 }
160 }
161