Changeset e57b0e2 in rtems for c/src/lib/libcpu/powerpc/ppc403
- Timestamp:
- 12/05/95 19:23:05 (27 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- e88d2db
- Parents:
- 289ad86
- Location:
- c/src/lib/libcpu/powerpc/ppc403
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libcpu/powerpc/ppc403/README
r289ad86 re57b0e2 9 9 10 10 console - Uses the 403 Internal serial port to do RTEMS 11 console I/O. Not ALL mem ebers of the 403 family11 console I/O. Not ALL members of the 403 family 12 12 have this. 13 13 … … 20 20 vectors - PowerPC 403 specific vector entry points. 21 21 Includes CPU dependant, application independant 22 handl res: alignment.22 handlers: alignment. -
c/src/lib/libcpu/powerpc/ppc403/clock/clock.c
r289ad86 re57b0e2 4 4 * PowerPC 403 CPU. The tick frequency is specified by the bsp. 5 5 * 6 * Author: Andrew Bray <andy@i-cubed.demon.co.uk>6 * Author: Andrew Bray <andy@i-cubed.co.uk> 7 7 * 8 8 * COPYRIGHT (c) 1995 by i-cubed ltd. … … 57 57 register rtems_unsigned32 rc; 58 58 59 asm volatile ("mf tblo %0" : "=r" ((rc)));59 asm volatile ("mfspr %0, 0x3dd" : "=r" ((rc))); /* TBLO */ 60 60 61 61 return rc; … … 70 70 { 71 71 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 122 123 Clock_driver_ticks++; 123 124 124 125 rtems_clock_tick(); 125 126 } … … 129 130 rtems_isr_entry previous_isr; 130 131 rtems_unsigned32 pvr, iocr; 131 132 132 133 Clock_driver_ticks = 0; 133 134 asm volatile ("mf iocr %0" : "=r" (iocr));134 135 asm volatile ("mfdcr %0, 0xa0" : "=r" (iocr)); /* IOCR */ 135 136 iocr &= ~4; 136 137 iocr |= 4; /* Select external timer clock */ 137 asm volatile ("mt iocr %0" : "=r" (iocr) : "0" (iocr));138 139 asm volatile ("mf pvr %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 141 142 if (((pvr & 0xffff0000) >> 16) != 0x0020) 142 143 143 return; /* Not a ppc403 */ 144 144 145 if ((pvr & 0xff00) == 0x0000) /* 403GA */ 145 146 auto_restart = (pvr & 0x00f0) > 0x0000 ? 1 : 0; 146 147 else if ((pvr & 0xff00) == 0x0100) /* 403GB */ 147 148 148 auto_restart = 1; 149 149 150 pit_value = BSP_Configuration.microseconds_per_tick * 150 151 151 Cpu_table.clicks_per_usec; 152 152 153 if (BSP_Configuration.ticks_per_timeslice) 153 154 { 154 register rtems_unsigned32 tcr; 155 register rtems_unsigned32 tcr; 156 155 157 /* 156 158 * initialize the interval here … … 160 162 * interrupt overhead 161 163 */ 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 */ 177 178 } 178 179 atexit(Clock_exit); … … 187 188 rtems_interrupt_disable(isrlevel); 188 189 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); 191 191 192 192 rtems_interrupt_enable(isrlevel); … … 204 204 if ( BSP_Configuration.ticks_per_timeslice ) 205 205 { 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 216 217 } 217 218 -
c/src/lib/libcpu/powerpc/ppc403/console/console.c
r289ad86 re57b0e2 2 2 * This file contains the PowerPC 403GA console IO package. 3 3 * 4 * Author: Andrew Bray <andy@i-cubed. demon.co.uk>4 * Author: Andrew Bray <andy@i-cubed.co.uk> 5 5 * 6 6 * COPYRIGHT (c) 1995 by i-cubed ltd. … … 146 146 147 147 /* Initialise the serial port */ 148 asm volatile ("mf iocr %0" : "=r" (tmp));148 asm volatile ("mfdcr %0, 0xa0" : "=r" (tmp)); /* IOCR */ 149 149 tmp &= ~3; 150 150 tmp |= (Cpu_table.serial_external_clock ? 2 : 0) | 151 151 (Cpu_table.serial_cts_rts ? 1 : 0); 152 asm volatile ("mt iocr %0" : "=r" (tmp) : "0" (tmp));152 asm volatile ("mtdcr 0xa0, %0" : "=r" (tmp) : "0" (tmp)); /* IOCR */ 153 153 port->SPLS = (LSRDataReady | LSRFramingError | LSROverrunError | 154 154 LSRParityError | LSRBreakInterrupt); 155 155 tmp = Cpu_table.serial_per_sec / Cpu_table.serial_rate; 156 156 tmp = ((tmp + 8) >> 4) - 1; … … 158 158 port->BRDH = tmp >> 8; 159 159 port->SPCTL = (CRNormal | CRDtr | CRRts | CRWordLength8 | CRParityDisable | 160 160 CRStopBitsOne); 161 161 port->SPRC = (RCREnable | RCRIntDisable | RCRPauseEnable); 162 162 port->SPTC = (TCREnable | TCRIntDisable); … … 229 229 { 230 230 if ((status = port->SPLS) & LSRDataReady) 231 break;231 break; 232 232 233 233 /* Clean any dodgy status */ 234 234 if ((status & (LSRFramingError | LSROverrunError | LSRParityError | 235 235 LSRBreakInterrupt)) != 0) 236 {237 port->SPLS = (LSRFramingError | LSROverrunError | LSRParityError |238 LSRBreakInterrupt);239 }236 { 237 port->SPLS = (LSRFramingError | LSROverrunError | LSRParityError | 238 LSRBreakInterrupt); 239 } 240 240 } 241 241 … … 270 270 port->SPHS = (HSRDsr | HSRCts); 271 271 else if (status & LSRTxHoldEmpty) 272 break;272 break; 273 273 } 274 274 275 275 if (Cpu_table.serial_xon_xoff) 276 276 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 } 285 283 286 284 port->SPTB = ch; -
c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
r289ad86 re57b0e2 7 7 * determined when porting or modifying this code. 8 8 * 9 * Author: Andrew Bray <andy@i-cubed. demon.co.uk>9 * Author: Andrew Bray <andy@i-cubed.co.uk> 10 10 * 11 11 * COPYRIGHT (c) 1995 by i-cubed ltd. … … 50 50 rtems_unsigned32 ret; 51 51 52 asm volatile ("mf tblo %0" : "=r" ((ret)));52 asm volatile ("mfspr %0, 0x3dd" : "=r" ((ret))); /* TBLO */ 53 53 54 54 return ret; … … 59 59 rtems_unsigned32 iocr; 60 60 61 asm volatile ("mf iocr %0" : "=r" (iocr));61 asm volatile ("mfdcr %0, 0xa0" : "=r" (iocr)); /* IOCR */ 62 62 iocr &= ~4; 63 63 iocr |= 4; /* Select external timer clock */ 64 asm volatile ("mt iocr %0" : "=r" (iocr) : "0" (iocr));64 asm volatile ("mtdcr 0xa0, %0" : "=r" (iocr) : "0" (iocr)); /* IOCR */ 65 65 66 66 Timer_starting = get_itimer(); -
c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.s
r289ad86 re57b0e2 1 /* align_h.s 1. 0 - 95/09/261 /* align_h.s 1.1 - 95/12/04 2 2 * 3 3 * This file contains the assembly code for the PowerPC 403 … … 26 26 * Modifications: 27 27 * 28 * Author: Andrew Bray <andy@i-cubed. demon.co.uk>28 * Author: Andrew Bray <andy@i-cubed.co.uk> 29 29 * 30 30 * COPYRIGHT (c) 1995 by i-cubed ltd. … … 122 122 stw r9,Open_cr(r1) 123 123 stw r10,Open_ctr(r1) 124 mfs rr2 r7125 mfs rr3 r8126 mfs rr0 r9127 mfs rr1 r10124 mfspr r7, srr2 /* SRR 2 */ 125 mfspr r8, srr3 /* SRR 3 */ 126 mfspr r9, srr0 /* SRR 0 */ 127 mfspr r10, srr1 /* SRR 1 */ 128 128 stw r7,Open_srr2(r1) 129 129 stw r8,Open_srr3(r1) … … 132 132 133 133 /* Set up common registers */ 134 mf dear r5 /*R5 is data exception address */134 mfspr r5, dear /* DEAR: R5 is data exception address */ 135 135 lwz r9,Open_srr0(r1) /* get faulting instruction */ 136 136 addi r7,r9,4 /* bump instruction */ … … 426 426 mtctr r26 427 427 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 */ 434 432 lmw r0,Open_gpr0+ALIGN_REGS(r0) 435 433 rfi 436 -
c/src/lib/libcpu/powerpc/ppc403/vectors/vectors.s
r289ad86 re57b0e2 1 /* vectors.s 1. 0 - 95/08/081 /* vectors.s 1.1 - 95/12/04 2 2 * 3 3 * This file contains the assembly code for the PowerPC 403 4 4 * interrupt veneers for RTEMS. 5 5 * 6 * Author: Andrew Bray <andy@i-cubed. demon.co.uk>6 * Author: Andrew Bray <andy@i-cubed.co.uk> 7 7 * 8 8 * COPYRIGHT (c) 1995 by i-cubed ltd. … … 19 19 * of this software for any purpose. 20 20 * 21 * $Id$22 21 */ 23 22 … … 38 37 * offset from 0x????0000 to the first location in the file. This 39 38 * will usually be 0x0000 or 0x0100. 39 * 40 * $Id$ 40 41 */ 41 42 … … 114 115 /* Critical error handling */ 115 116 .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 129 126 stw r0, IP_0(r1) 130 127 … … 134 131 /* Machine check exception */ 135 132 .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 149 142 stw r0, IP_0(r1) 150 143 … … 154 147 /* Protection exception */ 155 148 .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 169 158 stw r0, IP_0(r1) 170 159 … … 174 163 /* External interrupt */ 175 164 .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 189 174 stw r0, IP_0(r1) 190 175 … … 199 184 /* Program exception */ 200 185 .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 214 195 stw r0, IP_0(r1) 215 196 … … 219 200 /* System call */ 220 201 .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 234 211 stw r0, IP_0(r1) 235 212 … … 239 216 /* PIT interrupt */ 240 217 .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) 242 231 243 232 /* FIT interrupt */ 244 233 .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) 246 247 247 248 /* Watchdog interrupt */ 248 249 .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 306 259 stw r0, IP_0(r1) 307 260 … … 311 264 /* Debug exception */ 312 265 debug: 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 326 275 stw r0, IP_0(r1) 327 276
Note: See TracChangeset
for help on using the changeset viewer.