Changeset e57b0e2 in rtems for c/src/lib/libcpu/powerpc/ppc403


Ignore:
Timestamp:
12/05/95 19:23:05 (27 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
e88d2db
Parents:
289ad86
Message:

update from Andy Bray <andy@…>

Location:
c/src/lib/libcpu/powerpc/ppc403
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/ppc403/README

    r289ad86 re57b0e2  
    99
    1010console - Uses the 403 Internal serial port to do RTEMS
    11         console I/O.  Not ALL memebers of the 403 family
     11        console I/O.  Not ALL members of the 403 family
    1212        have this.
    1313
     
    2020vectors - PowerPC 403 specific vector entry points.
    2121        Includes CPU dependant, application independant
    22         handlres: alignment.
     22        handlers: alignment.
  • c/src/lib/libcpu/powerpc/ppc403/clock/clock.c

    r289ad86 re57b0e2  
    44 *  PowerPC 403 CPU.  The tick frequency is specified by the bsp.
    55 *
    6  *  Author:     Andrew Bray <andy@i-cubed.demon.co.uk>
     6 *  Author: Andrew Bray <andy@i-cubed.co.uk>
    77 *
    88 *  COPYRIGHT (c) 1995 by i-cubed ltd.
     
    5757    register rtems_unsigned32 rc;
    5858
    59     asm volatile ("mftblo %0" : "=r" ((rc)));
     59    asm volatile ("mfspr %0, 0x3dd" : "=r" ((rc))); /* TBLO */
    6060
    6161    return rc;
     
    7070{
    7171    if (!auto_restart)
    72         {
    73             rtems_unsigned32 clicks_til_next_interrupt;
    74             rtems_unsigned32 itimer_value;
    75 
    76             /*
    77              * setup for next interrupt; making sure the new value is reasonably
    78              * in the future.... in case we lost out on an interrupt somehow
    79              */
    80 
    81             itimer_value = get_itimer();
    82             tick_time += pit_value;
    83 
    84             /*
    85              * how far away is next interrupt *really*
    86              * It may be a long time; this subtraction works even if
    87              * Clock_clicks_interrupt < Clock_clicks_low_order via
    88              * the miracle of unsigned math.
    89              */
    90             clicks_til_next_interrupt = tick_time - itimer_value;
    91 
    92             /*
    93              * If it is too soon then bump it up.
    94              * This should only happen if CPU_HPPA_CLICKS_PER_TICK is too small.
    95              * But setting it low is useful for debug, so...
    96              */
    97 
    98             if (clicks_til_next_interrupt < 400)
    99                 {
    100                     tick_time = itimer_value + 1000;
    101                     clicks_til_next_interrupt = 1000;
    102                     /* XXX: count these! this should be rare */
    103                 }
    104 
    105             /*
    106              * If it is too late, that means we missed the interrupt somehow.
    107              * Rather than wait 35-50s for a wrap, we just fudge it here.
    108              */
    109            
    110             if (clicks_til_next_interrupt > pit_value)
    111                 {
    112                     tick_time = itimer_value + 1000;
    113                     clicks_til_next_interrupt = 1000;
    114                     /* XXX: count these! this should never happen :-) */
    115                 }
    116 
    117             asm volatile ("mtpit %0" :: "r" (clicks_til_next_interrupt));
    118         }
    119 
    120     asm volatile ( "mttsr %0" :: "r" (0x08000000));
    121 
     72    {
     73      rtems_unsigned32 clicks_til_next_interrupt;
     74      rtems_unsigned32 itimer_value;
     75 
     76      /*
     77       * setup for next interrupt; making sure the new value is reasonably
     78       * in the future.... in case we lost out on an interrupt somehow
     79       */
     80 
     81      itimer_value = get_itimer();
     82      tick_time += pit_value;
     83 
     84      /*
     85       * how far away is next interrupt *really*
     86       * It may be a long time; this subtraction works even if
     87       * Clock_clicks_interrupt < Clock_clicks_low_order via
     88       * the miracle of unsigned math.
     89       */
     90      clicks_til_next_interrupt = tick_time - itimer_value;
     91 
     92      /*
     93       * If it is too soon then bump it up.
     94       * This should only happen if CPU_HPPA_CLICKS_PER_TICK is too small.
     95       * But setting it low is useful for debug, so...
     96       */
     97 
     98      if (clicks_til_next_interrupt < 400)
     99      {
     100        tick_time = itimer_value + 1000;
     101        clicks_til_next_interrupt = 1000;
     102        /* XXX: count these! this should be rare */
     103      }
     104 
     105      /*
     106       * If it is too late, that means we missed the interrupt somehow.
     107       * Rather than wait 35-50s for a wrap, we just fudge it here.
     108       */
     109 
     110      if (clicks_til_next_interrupt > pit_value)
     111      {
     112        tick_time = itimer_value + 1000;
     113        clicks_til_next_interrupt = 1000;
     114        /* XXX: count these! this should never happen :-) */
     115      }
     116 
     117      asm volatile ("mtspr 0x3db, %0" :: "r"
     118                         (clicks_til_next_interrupt)); /* PIT */
     119  }
     120 
     121    asm volatile ( "mtspr 0x3d8, %0" :: "r" (0x08000000)); /* TSR */
     122 
    122123    Clock_driver_ticks++;
    123 
     124 
    124125    rtems_clock_tick();
    125126}
     
    129130    rtems_isr_entry previous_isr;
    130131    rtems_unsigned32 pvr, iocr;
    131 
     132 
    132133    Clock_driver_ticks = 0;
    133 
    134     asm volatile ("mfiocr %0" : "=r" (iocr));
     134 
     135    asm volatile ("mfdcr %0, 0xa0" : "=r" (iocr)); /* IOCR */
    135136    iocr &= ~4;
    136137    iocr |= 4;  /* Select external timer clock */
    137     asm volatile ("mtiocr %0" : "=r" (iocr) : "0" (iocr));
    138 
    139     asm volatile ("mfpvr %0" : "=r" ((pvr)));
    140 
     138    asm volatile ("mtdcr 0xa0, %0" : "=r" (iocr) : "0" (iocr)); /* IOCR */
     139 
     140    asm volatile ("mfspr %0, 0x11f" : "=r" ((pvr))); /* PVR */
     141 
    141142    if (((pvr & 0xffff0000) >> 16) != 0x0020)
    142         return; /* Not a ppc403 */
    143 
     143      return; /* Not a ppc403 */
     144 
    144145    if ((pvr & 0xff00) == 0x0000) /* 403GA */
    145         auto_restart = (pvr & 0x00f0) > 0x0000 ? 1 : 0;
     146      auto_restart = (pvr & 0x00f0) > 0x0000 ? 1 : 0;
    146147    else if ((pvr & 0xff00) == 0x0100) /* 403GB */
    147         auto_restart = 1;
    148 
     148      auto_restart = 1;
     149 
    149150    pit_value = BSP_Configuration.microseconds_per_tick *
    150         Cpu_table.clicks_per_usec;
    151 
     151      Cpu_table.clicks_per_usec;
     152 
    152153    if (BSP_Configuration.ticks_per_timeslice)
    153154    {
    154         register rtems_unsigned32 tcr;
     155      register rtems_unsigned32 tcr;
     156
    155157        /*
    156158         * initialize the interval here
     
    160162         * interrupt overhead
    161163         */
    162 
    163         rtems_interrupt_catch(clock_isr, PPC_IRQ_PIT,
    164                               &previous_isr);
    165 
    166         asm volatile ("mtpit %0" : : "r" (pit_value));
    167 
    168         asm volatile ("mftcr %0" : "=r" ((tcr)));
    169 
    170         tcr &= ~ 0x04400000;
    171 
    172         tcr |= (auto_restart ? 0x04400000 : 0x04000000);
    173 
    174         tick_time = get_itimer() + pit_value;
    175 
    176         asm volatile ("mttcr %0" : "=r" ((tcr)) : "0" ((tcr)));
     164 
     165      rtems_interrupt_catch(clock_isr, PPC_IRQ_PIT, &previous_isr);
     166 
     167      asm volatile ("mtspr 0x3db, %0" : : "r" (pit_value)); /* PIT */
     168 
     169      asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */
     170 
     171      tcr &= ~ 0x04400000;
     172 
     173      tcr |= (auto_restart ? 0x04400000 : 0x04000000);
     174 
     175      tick_time = get_itimer() + pit_value;
     176 
     177      asm volatile ("mtspr 0x3da, %0" : "=r" ((tcr)) : "0" ((tcr))); /* TCR */
    177178    }
    178179    atexit(Clock_exit);
     
    187188    rtems_interrupt_disable(isrlevel);
    188189   
    189     rtems_interrupt_catch(new_clock_isr, PPC_IRQ_PIT,
    190                           &previous_isr);
     190    rtems_interrupt_catch(new_clock_isr, PPC_IRQ_PIT, &previous_isr);
    191191
    192192    rtems_interrupt_enable(isrlevel);
     
    204204    if ( BSP_Configuration.ticks_per_timeslice )
    205205    {
    206         register rtems_unsigned32 tcr;
    207 
    208         asm volatile ("mftcr %0" : "=r" ((tcr)));
    209 
    210         tcr &= ~ 0x04400000;
    211 
    212         asm volatile ("mttcr %0" : "=r" ((tcr)) : "0" ((tcr)));
    213 
    214         (void) set_vector(0, PPC_IRQ_PIT, 1);
    215     }
     206      register rtems_unsigned32 tcr;
     207 
     208      asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */
     209 
     210      tcr &= ~ 0x04400000;
     211 
     212      asm volatile ("mtspr 0x3da, %0" : "=r" ((tcr)) : "0" ((tcr))); /* TCR */
     213 
     214      (void) set_vector(0, PPC_IRQ_PIT, 1);
     215    }
     216
    216217}
    217218
  • c/src/lib/libcpu/powerpc/ppc403/console/console.c

    r289ad86 re57b0e2  
    22 *  This file contains the PowerPC 403GA console IO package.
    33 *
    4  *  Author:     Andrew Bray <andy@i-cubed.demon.co.uk>
     4 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
    55 *
    66 *  COPYRIGHT (c) 1995 by i-cubed ltd.
     
    146146
    147147  /* Initialise the serial port */
    148   asm volatile ("mfiocr %0" : "=r" (tmp));
     148  asm volatile ("mfdcr %0, 0xa0" : "=r" (tmp)); /* IOCR */
    149149  tmp &= ~3;
    150150  tmp |= (Cpu_table.serial_external_clock ? 2 : 0) |
    151151      (Cpu_table.serial_cts_rts ? 1 : 0);
    152   asm volatile ("mtiocr %0" : "=r" (tmp) : "0" (tmp));
     152  asm volatile ("mtdcr 0xa0, %0" : "=r" (tmp) : "0" (tmp)); /* IOCR */
    153153  port->SPLS = (LSRDataReady | LSRFramingError | LSROverrunError |
    154                LSRParityError | LSRBreakInterrupt);
     154         LSRParityError | LSRBreakInterrupt);
    155155  tmp = Cpu_table.serial_per_sec / Cpu_table.serial_rate;
    156156  tmp = ((tmp + 8) >> 4) - 1;
     
    158158  port->BRDH = tmp >> 8;
    159159  port->SPCTL = (CRNormal | CRDtr | CRRts | CRWordLength8 | CRParityDisable |
    160                 CRStopBitsOne);
     160    CRStopBitsOne);
    161161  port->SPRC = (RCREnable | RCRIntDisable | RCRPauseEnable);
    162162  port->SPTC = (TCREnable | TCRIntDisable);
     
    229229    {
    230230      if ((status = port->SPLS) & LSRDataReady)
    231         break;
     231              break;
    232232
    233233      /* Clean any dodgy status */
    234234      if ((status & (LSRFramingError | LSROverrunError | LSRParityError |
    235235                     LSRBreakInterrupt)) != 0)
    236         {
    237           port->SPLS = (LSRFramingError | LSROverrunError | LSRParityError |
    238                         LSRBreakInterrupt);
    239         }
     236            {
     237              port->SPLS = (LSRFramingError | LSROverrunError | LSRParityError |
     238                            LSRBreakInterrupt);
     239            }
    240240    }
    241241
     
    270270        port->SPHS = (HSRDsr | HSRCts);
    271271      else if (status & LSRTxHoldEmpty)
    272         break;
     272              break;
    273273    }
    274274
    275275  if (Cpu_table.serial_xon_xoff)
    276276    while (is_character_ready(&status))
    277       {
    278         if (status == XOFFchar)
    279           do
    280             {
    281               while (!is_character_ready(&status));
    282             }
    283           while (status != XONchar);
    284       }
     277    {
     278            if (status == XOFFchar)
     279              do {
     280                while (!is_character_ready(&status));
     281              } while (status != XONchar);
     282    }
    285283
    286284  port->SPTB = ch;
  • c/src/lib/libcpu/powerpc/ppc403/timer/timer.c

    r289ad86 re57b0e2  
    77 *        determined when porting or modifying this code.
    88 *
    9  *  Author:     Andrew Bray <andy@i-cubed.demon.co.uk>
     9 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
    1010 *
    1111 *  COPYRIGHT (c) 1995 by i-cubed ltd.
     
    5050   rtems_unsigned32 ret;
    5151
    52    asm volatile ("mftblo %0" : "=r" ((ret)));
     52   asm volatile ("mfspr %0, 0x3dd" : "=r" ((ret))); /* TBLO */
    5353
    5454   return ret;
     
    5959  rtems_unsigned32 iocr;
    6060
    61   asm volatile ("mfiocr %0" : "=r" (iocr));
     61  asm volatile ("mfdcr %0, 0xa0" : "=r" (iocr)); /* IOCR */
    6262  iocr &= ~4;
    6363  iocr |= 4;  /* Select external timer clock */
    64   asm volatile ("mtiocr %0" : "=r" (iocr) : "0" (iocr));
     64  asm volatile ("mtdcr 0xa0, %0" : "=r" (iocr) : "0" (iocr)); /* IOCR */
    6565
    6666  Timer_starting = get_itimer();
  • c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.s

    r289ad86 re57b0e2  
    1 /*  align_h.s   1.0 - 95/09/26
     1/*  align_h.s   1.1 - 95/12/04
    22 *
    33 *  This file contains the assembly code for the PowerPC 403
     
    2626 * Modifications:
    2727 *
    28  *  Author:     Andrew Bray <andy@i-cubed.demon.co.uk>
     28 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
    2929 *
    3030 *  COPYRIGHT (c) 1995 by i-cubed ltd.
     
    122122        stw     r9,Open_cr(r1)
    123123        stw     r10,Open_ctr(r1)
    124         mfsrr2  r7
    125         mfsrr3  r8
    126         mfsrr0  r9
    127         mfsrr1  r10
     124        mfspr   r7, srr2                /* SRR 2 */
     125        mfspr   r8, srr3                /* SRR 3 */
     126        mfspr   r9, srr0                /* SRR 0 */
     127        mfspr   r10, srr1               /* SRR 1 */
    128128        stw     r7,Open_srr2(r1)
    129129        stw     r8,Open_srr3(r1)
     
    132132
    133133/*      Set up common registers */
    134         mfdear  r5                      /* R5 is data exception address */
     134        mfspr   r5, dear                /* DEAR: R5 is data exception address */
    135135        lwz     r9,Open_srr0(r1)        /* get faulting instruction */
    136136        addi    r7,r9,4                 /* bump instruction */
     
    426426        mtctr   r26
    427427        mtcrf   0xFF, r27
    428         mtsrr2  r28
    429         mtsrr3  r29
    430         mtsrr0  r30
    431         mtsrr1  r31
    432         mttcr   r30
    433         mtexier r31
     428        mtspr   srr2, r28               /* SRR 2 */
     429        mtspr   srr3, r29               /* SRR 3 */
     430        mtspr   srr0, r30               /* SRR 0 */
     431        mtspr   srr1, r31               /* SRR 1 */
    434432        lmw     r0,Open_gpr0+ALIGN_REGS(r0)
    435433        rfi
    436 
  • c/src/lib/libcpu/powerpc/ppc403/vectors/vectors.s

    r289ad86 re57b0e2  
    1 /*  vectors.s   1.0 - 95/08/08
     1/*  vectors.s   1.1 - 95/12/04
    22 *
    33 *  This file contains the assembly code for the PowerPC 403
    44 *  interrupt veneers for RTEMS.
    55 *
    6  *  Author:     Andrew Bray <andy@i-cubed.demon.co.uk>
     6 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
    77 *
    88 *  COPYRIGHT (c) 1995 by i-cubed ltd.
     
    1919 *      of this software for any purpose.
    2020 *
    21  *  $Id$
    2221 */
    2322
     
    3837 *  offset from 0x????0000 to the first location in the file.  This
    3938 *  will usually be 0x0000 or 0x0100.
     39 *
     40 *  $Id$
    4041 */
    4142
     
    114115/* Critical error handling */
    115116        .org    crit_vector - file_base
    116         mtsprg1 r0
    117         mfsprg2 r0
    118         mtmsr   r0
    119 #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
    120 #if (PPC_HAS_FPU)
    121         stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
    122 #else
    123         stwu    r1, -(20*4 + IP_END)(r1)
    124 #endif
    125 #else
    126         stwu    r1, -(IP_END)(r1)
    127 #endif
    128         mfsprg1 r0
     117#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
     118#if (PPC_HAS_FPU)
     119        stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
     120#else
     121        stwu    r1, -(20*4 + IP_END)(r1)
     122#endif
     123#else
     124        stwu    r1, -(IP_END)(r1)
     125#endif
    129126        stw     r0, IP_0(r1)
    130127
     
    134131/* Machine check exception */
    135132        .org    mach_vector - file_base
    136         mtsprg1 r0
    137         mfsprg2 r0
    138         mtmsr   r0
    139 #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
    140 #if (PPC_HAS_FPU)
    141         stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
    142 #else
    143         stwu    r1, -(20*4 + IP_END)(r1)
    144 #endif
    145 #else
    146         stwu    r1, -(IP_END)(r1)
    147 #endif
    148         mfsprg1 r0
     133#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
     134#if (PPC_HAS_FPU)
     135        stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
     136#else
     137        stwu    r1, -(20*4 + IP_END)(r1)
     138#endif
     139#else
     140        stwu    r1, -(IP_END)(r1)
     141#endif
    149142        stw     r0, IP_0(r1)
    150143
     
    154147/* Protection exception */
    155148        .org    prot_vector - file_base
    156         mtsprg0 r0
    157         mfsprg2 r0
    158         mtmsr   r0
    159 #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
    160 #if (PPC_HAS_FPU)
    161         stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
    162 #else
    163         stwu    r1, -(20*4 + IP_END)(r1)
    164 #endif
    165 #else
    166         stwu    r1, -(IP_END)(r1)
    167 #endif
    168         mfsprg0 r0
     149#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
     150#if (PPC_HAS_FPU)
     151        stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
     152#else
     153        stwu    r1, -(20*4 + IP_END)(r1)
     154#endif
     155#else
     156        stwu    r1, -(IP_END)(r1)
     157#endif
    169158        stw     r0, IP_0(r1)
    170159
     
    174163/* External interrupt */
    175164        .org    ext_vector - file_base
    176         mtsprg0 r0
    177         mfsprg2 r0
    178         mtmsr   r0
    179 #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
    180 #if (PPC_HAS_FPU)
    181         stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
    182 #else
    183         stwu    r1, -(20*4 + IP_END)(r1)
    184 #endif
    185 #else
    186         stwu    r1, -(IP_END)(r1)
    187 #endif
    188         mfsprg0 r0
     165#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
     166#if (PPC_HAS_FPU)
     167        stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
     168#else
     169        stwu    r1, -(20*4 + IP_END)(r1)
     170#endif
     171#else
     172        stwu    r1, -(IP_END)(r1)
     173#endif
    189174        stw     r0, IP_0(r1)
    190175
     
    199184/* Program exception */
    200185        .org    prog_vector - file_base
    201         mtsprg0 r0
    202         mfsprg2 r0
    203         mtmsr   r0
    204 #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
    205 #if (PPC_HAS_FPU)
    206         stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
    207 #else
    208         stwu    r1, -(20*4 + IP_END)(r1)
    209 #endif
    210 #else
    211         stwu    r1, -(IP_END)(r1)
    212 #endif
    213         mfsprg0 r0
     186#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
     187#if (PPC_HAS_FPU)
     188        stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
     189#else
     190        stwu    r1, -(20*4 + IP_END)(r1)
     191#endif
     192#else
     193        stwu    r1, -(IP_END)(r1)
     194#endif
    214195        stw     r0, IP_0(r1)
    215196
     
    219200/* System call */
    220201        .org    sys_vector - file_base
    221         mtsprg0 r0
    222         mfsprg2 r0
    223         mtmsr   r0
    224 #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
    225 #if (PPC_HAS_FPU)
    226         stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
    227 #else
    228         stwu    r1, -(20*4 + IP_END)(r1)
    229 #endif
    230 #else
    231         stwu    r1, -(IP_END)(r1)
    232 #endif
    233         mfsprg0 r0
     202#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
     203#if (PPC_HAS_FPU)
     204        stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
     205#else
     206        stwu    r1, -(20*4 + IP_END)(r1)
     207#endif
     208#else
     209        stwu    r1, -(IP_END)(r1)
     210#endif
    234211        stw     r0, IP_0(r1)
    235212
     
    239216/* PIT interrupt */
    240217        .org    pit_vector - file_base
    241         b       pit
     218#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
     219#if (PPC_HAS_FPU)
     220        stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
     221#else
     222        stwu    r1, -(20*4 + IP_END)(r1)
     223#endif
     224#else
     225        stwu    r1, -(IP_END)(r1)
     226#endif
     227        stw     r0, IP_0(r1)
     228
     229        li      r0, PPC_IRQ_PIT
     230        b       PROC (_ISR_Handler)
    242231                       
    243232/* FIT interrupt */
    244233        .org    fit_vector - file_base
    245         b       fit
     234#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
     235#if (PPC_HAS_FPU)
     236        stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
     237#else
     238        stwu    r1, -(20*4 + IP_END)(r1)
     239#endif
     240#else
     241        stwu    r1, -(IP_END)(r1)
     242#endif
     243        stw     r0, IP_0(r1)
     244
     245        li      r0, PPC_IRQ_FIT
     246        b       PROC (_ISR_Handler)
    246247                       
    247248/* Watchdog interrupt */
    248249        .org    wadt_vector - file_base
    249         b       watch
    250                
    251 /* PIT interrupt */
    252 pit:
    253         mtsprg0 r0
    254         mfsprg2 r0
    255         mtmsr   r0
    256 #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
    257 #if (PPC_HAS_FPU)
    258         stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
    259 #else
    260         stwu    r1, -(20*4 + IP_END)(r1)
    261 #endif
    262 #else
    263         stwu    r1, -(IP_END)(r1)
    264 #endif
    265         mfsprg0 r0
    266         stw     r0, IP_0(r1)
    267 
    268         li      r0, PPC_IRQ_PIT
    269         b       PROC (_ISR_Handler)
    270        
    271 /* FIT interrupt */
    272 fit:
    273         mtsprg0 r0
    274         mfsprg2 r0
    275         mtmsr   r0
    276 #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
    277 #if (PPC_HAS_FPU)
    278         stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
    279 #else
    280         stwu    r1, -(20*4 + IP_END)(r1)
    281 #endif
    282 #else
    283         stwu    r1, -(IP_END)(r1)
    284 #endif
    285         mfsprg0 r0
    286         stw     r0, IP_0(r1)
    287 
    288         li      r0, PPC_IRQ_FIT
    289         b       PROC (_ISR_Handler)
    290 
    291 /* Watchdog interrupt */
    292 watch:
    293         mtsprg1 r0
    294         mfsprg2 r0
    295         mtmsr   r0
    296 #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
    297 #if (PPC_HAS_FPU)
    298         stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
    299 #else
    300         stwu    r1, -(20*4 + IP_END)(r1)
    301 #endif
    302 #else
    303         stwu    r1, -(IP_END)(r1)
    304 #endif
    305         mfsprg1 r0
     250#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
     251#if (PPC_HAS_FPU)
     252        stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
     253#else
     254        stwu    r1, -(20*4 + IP_END)(r1)
     255#endif
     256#else
     257        stwu    r1, -(IP_END)(r1)
     258#endif
    306259        stw     r0, IP_0(r1)
    307260
     
    311264/* Debug exception */
    312265debug:
    313         mtsprg1 r0
    314         mfsprg2 r0
    315         mtmsr   r0
    316 #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
    317 #if (PPC_HAS_FPU)
    318         stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
    319 #else
    320         stwu    r1, -(20*4 + IP_END)(r1)
    321 #endif
    322 #else
    323         stwu    r1, -(IP_END)(r1)
    324 #endif
    325         mfsprg1 r0
     266#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
     267#if (PPC_HAS_FPU)
     268        stwu    r1, -(20*4 + 18*8 + IP_END)(r1)
     269#else
     270        stwu    r1, -(20*4 + IP_END)(r1)
     271#endif
     272#else
     273        stwu    r1, -(IP_END)(r1)
     274#endif
    326275        stw     r0, IP_0(r1)
    327276
Note: See TracChangeset for help on using the changeset viewer.