Ticket #200: patch

File patch, 8.6 KB (added by Eric Norum, on 12/03/06 at 13:31:13)

patch

  • c/src/lib/libbsp/i386/shared/irq/idt.c

    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
     
    275275     * Now, reload all segment registers so the limit takes effect.
    276276     */
    277277
    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"
    283283                   : "=r" (tmp_segment)
    284284                   : "0"  (tmp_segment)
    285285                  );
  • c/src/lib/libbsp/m68k/mvme167/console/console.c

    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
     
    12971297   */
    12981298  rtems_interrupt_disable( previous_level );
    12991299 
    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 */
    13071307    : "=d" (char_not_available) : "d" (minor): "%%cc" );
    13081308
    13091309  if (char_not_available) {
     
    13121312  }
    13131313
    13141314  /* 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 */
    13191319    : "=d" (c) : );
    13201320
    13211321  rtems_interrupt_enable( previous_level );
     
    13491349{
    13501350  const char *endbuf = buf + len;
    13511351
    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 */
    13581358    :: "a" (endbuf), "a" (buf), "d" (minor) );
    13591359
    13601360  /* Return something */
  • c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c

    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
     
    116116  lcsr->intr_ena = 0;               /* disable interrupts */
    117117  m68k_set_vbr(0xFFE00000);         /* restore 167Bug vectors */
    118118 
    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"       
    126126    :: "d" (the_error), "a" (&my_p_str) );
    127127}
  • c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c

    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
     
    4242
    4343  lcsr->intr_ena = 0;               /* disable interrupts */
    4444  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) */
    4747 
    4848  /* restart program */
    4949  start_addr = start;
  • c/src/lib/libbsp/m68k/mvme167/startup/page_table.c

    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
     
    120120        }
    121121
    122122  /* 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 */
    131131          :: "d" (0), "d" (dtt0), "d" (0xFF00C040), "d" (cacr));
    132132}
    133133
     
    146146 */
    147147void page_table_teardown( void )
    148148{
    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"
    156156    :: "d" (0) );
    157157}
  • c/src/libnetworking/machine/in_cksum.h

    RCS file: /usr1/CVS/rtems/c/src/libnetworking/machine/in_cksum.h,v
    retrieving revision 1.3
    diff -u -r1.3 in_cksum.h
     
    170170   register u_int tmp_o2;
    171171   register u_int tmp_o3;
    172172
    173    __asm__ volatile ("
     173   __asm__ volatile (" \
    174174     ld [%0], %1 ; \
    175175     ld [%0+4], %2 ; \
    176176     addcc %1, %2, %1 ; \