diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-19 18:32:18 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-19 18:32:18 +0000 |
commit | 38ffa0cee29a03a2158fb7d020986743c0f3bc07 (patch) | |
tree | 00efaa165f7efaadb3394b630bdf9d241d96286c /c/src/exec/score/cpu/m68k/cpu.c | |
parent | Minor bug fixes to get all targets compilable and running. The (diff) | |
download | rtems-38ffa0cee29a03a2158fb7d020986743c0f3bc07.tar.bz2 |
Incorporated the submission from John S. Gwynne
<jsg@coulomb.eng.ohio-state.edu> of the rest of the 68000-ish support
for interrupt handling and bfffo support, the two BSPs he submitted
(efi68k and efi332), and SGI Irix 5.3 host support.
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/score/cpu/m68k/cpu.c | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/c/src/exec/score/cpu/m68k/cpu.c b/c/src/exec/score/cpu/m68k/cpu.c index fdba64bffe..a6d6750a5f 100644 --- a/c/src/exec/score/cpu/m68k/cpu.c +++ b/c/src/exec/score/cpu/m68k/cpu.c @@ -1,5 +1,5 @@ /* - * Motorola MC68020 Dependent Source + * Motorola MC68xxx Dependent Source * * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. * On-Line Applications Research Corporation (OAR). @@ -32,9 +32,7 @@ void _CPU_Initialize( void (*thread_dispatch) /* ignored on this CPU */ ) { - _CPU_Table = *cpu_table; - } /*PAGE @@ -66,9 +64,13 @@ void _CPU_ISR_install_raw_handler( m68k_get_vbr( interrupt_table ); +#if ( M68K_HAS_VBR == 1) *old_handler = interrupt_table[ vector ]; - interrupt_table[ vector ] = new_handler; +#else + *old_handler = *(proc_ptr *)( (int)interrupt_table+ (int)vector*6-10); + *(proc_ptr *)( (int)interrupt_table+ (int)vector*6-10) = new_handler; +#endif /* M68K_HAS_VBR */ } /*PAGE @@ -120,24 +122,24 @@ void _CPU_Install_interrupt_stack( void ) #if ( M68K_HAS_BFFFO != 1 ) /* - * Returns log2(x) 0<x<256 + * Returns table for duplication of the BFFFO instruction (16 bits only) */ -const unsigned char __log2table[256] = { - 0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 +const unsigned char __BFFFOtable[256] = { + 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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