patch!«žôüžô
mBINžIndex: c/src/lib/libbsp/i386/shared/irq/idt.c
RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/i386/shared/irq/idt.c,v
retrieving revision 1.4
diff -u -r1.4 idt.c
|
|
|
275 | 275 | * Now, reload all segment registers so the limit takes effect. |
276 | 276 | */ |
277 | 277 | |
278 | | asm volatile( "movw %%ds,%0 ; movw %0,%%ds |
279 | | movw %%es,%0 ; movw %0,%%es |
280 | | movw %%fs,%0 ; movw %0,%%fs |
281 | | movw %%gs,%0 ; movw %0,%%gs |
282 | | movw %%ss,%0 ; movw %0,%%ss" |
| 278 | asm volatile( "movw %%ds,%0 ; movw %0,%%ds\n\t" |
| 279 | "movw %%es,%0 ; movw %0,%%es\n\t" |
| 280 | "movw %%fs,%0 ; movw %0,%%fs\n\t" |
| 281 | "movw %%gs,%0 ; movw %0,%%gs\n\t" |
| 282 | "movw %%ss,%0 ; movw %0,%%ss" |
283 | 283 | : "=r" (tmp_segment) |
284 | 284 | : "0" (tmp_segment) |
285 | 285 | ); |
RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/m68k/mvme167/console/console.c,v
retrieving revision 1.4
diff -u -r1.4 console.c
|
|
|
1297 | 1297 | */ |
1298 | 1298 | rtems_interrupt_disable( previous_level ); |
1299 | 1299 | |
1300 | | asm volatile( "movew %1, -(%%sp) /* Channel */ |
1301 | | trap #15 /* Trap to 167Bug */ |
1302 | | .short 0x61 /* Code for .REDIR_I */ |
1303 | | trap #15 /* Trap to 167Bug */ |
1304 | | .short 0x01 /* Code for .INSTAT */ |
1305 | | move %%cc, %0 /* Get condition codes */ |
1306 | | andil #4, %0" /* Keep the Zero bit */ |
| 1300 | asm volatile( "movew %1, -(%%sp)\n\t"/* Channel */ |
| 1301 | "trap #15\n\t" /* Trap to 167Bug */ |
| 1302 | ".short 0x61\n\t" /* Code for .REDIR_I */ |
| 1303 | "trap #15\n\t" /* Trap to 167Bug */ |
| 1304 | ".short 0x01\n\t" /* Code for .INSTAT */ |
| 1305 | "move %%cc, %0\n\t" /* Get condition codes */ |
| 1306 | "andil #4, %0" /* Keep the Zero bit */ |
1307 | 1307 | : "=d" (char_not_available) : "d" (minor): "%%cc" ); |
1308 | 1308 | |
1309 | 1309 | if (char_not_available) { |
… |
… |
|
1312 | 1312 | } |
1313 | 1313 | |
1314 | 1314 | /* Read the char and return it */ |
1315 | | asm volatile( "subq.l #2,%%a7 /* Space for result */ |
1316 | | trap #15 /* Trap to 167 Bug */ |
1317 | | .short 0x00 /* Code for .INCHR */ |
1318 | | moveb (%%a7)+, %0" /* Pop char into c */ |
| 1315 | asm volatile( "subq.l #2,%%a7\n\t" /* Space for result */ |
| 1316 | "trap #15\n\t" /* Trap to 167 Bug */ |
| 1317 | ".short 0x00\n\t" /* Code for .INCHR */ |
| 1318 | "moveb (%%a7)+, %0" /* Pop char into c */ |
1319 | 1319 | : "=d" (c) : ); |
1320 | 1320 | |
1321 | 1321 | rtems_interrupt_enable( previous_level ); |
… |
… |
|
1349 | 1349 | { |
1350 | 1350 | const char *endbuf = buf + len; |
1351 | 1351 | |
1352 | | asm volatile( "pea (%0) /* endbuf */ |
1353 | | pea (%1) /* buf */ |
1354 | | movew #0x21, -(%%sp) /* Code for .OUTSTR */ |
1355 | | movew %2, -(%%sp) /* Channel */ |
1356 | | trap #15 /* Trap to 167Bug */ |
1357 | | .short 0x60" /* Code for .REDIR */ |
| 1352 | asm volatile( "pea (%0)\n\t" /* endbuf */ |
| 1353 | "pea (%1)\n\t" /* buf */ |
| 1354 | "movew #0x21, -(%%sp)\n\t" /* Code for .OUTSTR */ |
| 1355 | "movew %2, -(%%sp)\n\t" /* Channel */ |
| 1356 | "trap #15\n\t" /* Trap to 167Bug */ |
| 1357 | ".short 0x60" /* Code for .REDIR */ |
1358 | 1358 | :: "a" (endbuf), "a" (buf), "d" (minor) ); |
1359 | 1359 | |
1360 | 1360 | /* Return something */ |
RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c,v
retrieving revision 1.1
diff -u -r1.1 bspfatal.c
|
|
|
116 | 116 | lcsr->intr_ena = 0; /* disable interrupts */ |
117 | 117 | m68k_set_vbr(0xFFE00000); /* restore 167Bug vectors */ |
118 | 118 | |
119 | | asm volatile( "movel %0, -(%%a7) |
120 | | pea (%%a7) |
121 | | pea (%1) |
122 | | trap #15 /* trap to 167Bug (.WRITDLN) */ |
123 | | .short 0x25 |
124 | | trap #15 |
125 | | .short 0x63" |
| 119 | asm volatile( "movel %0, -(%%a7)\n\t" |
| 120 | "pea (%%a7)\n\t" |
| 121 | "pea (%1)\n\t" |
| 122 | "trap #15\n\t" /* trap to 167Bug (.WRITDLN) */ |
| 123 | ".short 0x25\n\t" |
| 124 | "trap #15\n\t" |
| 125 | ".short 0x63" |
126 | 126 | :: "d" (the_error), "a" (&my_p_str) ); |
127 | 127 | } |
RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c,v
retrieving revision 1.2
diff -u -r1.2 bspclean.c
|
|
|
42 | 42 | |
43 | 43 | lcsr->intr_ena = 0; /* disable interrupts */ |
44 | 44 | m68k_set_vbr(0xFFE00000); /* restore 167Bug vectors */ |
45 | | asm volatile( "trap #15 /* trap to 167Bug */ |
46 | | .short 0x63" ); /* return to 167Bug (.RETURN) */ |
| 45 | asm volatile( "trap #15\n\t" /* trap to 167Bug */ |
| 46 | ".short 0x63" ); /* return to 167Bug (.RETURN) */ |
47 | 47 | |
48 | 48 | /* restart program */ |
49 | 49 | start_addr = start; |
RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c,v
retrieving revision 1.4
diff -u -r1.4 page_table.c
|
|
|
120 | 120 | } |
121 | 121 | |
122 | 122 | /* do it ! */ |
123 | | asm volatile("movec %0, %%tc /* turn off paged address translation */ |
124 | | movec %0, %%cacr /* disable both caches */ |
125 | | cinva %%bc /* clear both caches */ |
126 | | movec %1,%%dtt0 /* block address translation on */ |
127 | | movec %1,%%itt0 |
128 | | movec %2,%%dtt1 |
129 | | movec %2,%%itt1 |
130 | | movec %3,%%cacr" /* data cache on */ |
| 123 | asm volatile("movec %0, %%tc\n\t" /* turn off paged address translation */ |
| 124 | "movec %0, %%cacr\n\t" /* disable both caches */ |
| 125 | "cinva %%bc\n\t" /* clear both caches */ |
| 126 | "movec %1,%%dtt0\n\t" /* block address translation on */ |
| 127 | "movec %1,%%itt0\n\t" |
| 128 | "movec %2,%%dtt1\n\t" |
| 129 | "movec %2,%%itt1\n\t" |
| 130 | "movec %3,%%cacr" /* data cache on */ |
131 | 131 | :: "d" (0), "d" (dtt0), "d" (0xFF00C040), "d" (cacr)); |
132 | 132 | } |
133 | 133 | |
… |
… |
|
146 | 146 | */ |
147 | 147 | void page_table_teardown( void ) |
148 | 148 | { |
149 | | asm volatile ("movec %0,%%tc |
150 | | movec %0,%%cacr |
151 | | cpusha %%bc |
152 | | movec %0,%%dtt0 |
153 | | movec %0,%%itt0 |
154 | | movec %0,%%dtt1 |
155 | | movec %0,%%itt1" |
| 149 | asm volatile ("movec %0,%%tc\n\t" |
| 150 | "movec %0,%%cacr\n\t" |
| 151 | "cpusha %%bc\n\t" |
| 152 | "movec %0,%%dtt0\n\t" |
| 153 | "movec %0,%%itt0\n\t" |
| 154 | "movec %0,%%dtt1\n\t" |
| 155 | "movec %0,%%itt1" |
156 | 156 | :: "d" (0) ); |
157 | 157 | } |
RCS file: /usr1/CVS/rtems/c/src/libnetworking/machine/in_cksum.h,v
retrieving revision 1.3
diff -u -r1.3 in_cksum.h
|
|
|
170 | 170 | register u_int tmp_o2; |
171 | 171 | register u_int tmp_o3; |
172 | 172 | |
173 | | __asm__ volatile (" |
| 173 | __asm__ volatile (" \ |
174 | 174 | ld [%0], %1 ; \ |
175 | 175 | ld [%0+4], %2 ; \ |
176 | 176 | addcc %1, %2, %1 ; \ |