- Timestamp:
- 06/07/95 01:27:28 (29 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 9526d217
- Parents:
- 459f770
- Location:
- c/src
- Files:
-
- 12 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/score/cpu/m68k/cpu.c
r459f770 r9e86dd7d 96 96 } 97 97 98 #if ( M68K_HAS_BFFFO != 1 ) 99 /* 100 * Returns log2(x) 0<x<256 101 */ 102 const unsigned char __log2table[256] = { 103 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 104 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 105 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 106 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 107 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 108 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 109 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 110 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 111 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 112 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 113 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 114 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 115 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 116 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 117 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 118 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 119 }; 120 #endif -
c/src/exec/score/cpu/m68k/cpu.h
r459f770 r9e86dd7d 44 44 * Use the m68k's hardware interrupt stack support and have the 45 45 * interrupt manager allocate the memory for it. 46 */ 47 46 * 47 * NOTE: The definitions when M68K_HAS_SEPARATE_STACKS is 0 should 48 * change when the software interrupt stack support is implemented. 49 */ 50 51 #if ( M68K_HAS_SEPARATE_STACKS == 1) 48 52 #define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE 49 53 #define CPU_HAS_HARDWARE_INTERRUPT_STACK TRUE 50 54 #define CPU_ALLOCATE_INTERRUPT_STACK TRUE 55 #else 56 #define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE 57 #define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE 58 #define CPU_ALLOCATE_INTERRUPT_STACK FALSE 59 #endif 51 60 52 61 /* … … 317 326 318 327 #define _CPU_Bitfield_Find_first_bit( _value, _output ) \ 319 (_output) = 0 /* avoids warnings */ 320 321 #warning "FIX ME... NEEDS A SOFTWARE BFFFO IMPLEMENTATION" 322 #warning "SEE no_cpu/cpu.h FOR POSSIBLE ALGORITHMS" 328 { \ 329 extern const unsigned char __log2table[256]; \ 330 \ 331 (_output) = 0; /* avoids warnings */ \ 332 asm ( "move.w %1,%0\n"\ 333 "\tandi.w #0xff00,%0\n"\ 334 "\tjbne 0f\n"\ 335 "\tmoveq.l #0,%0\n"\ 336 "\tmove.b (%2,%1.w),%0\n"\ 337 "\tjbra 1f\n"\ 338 "0:\tmoveq.l #8,%0\n"\ 339 "\tlsr.w #8,%1\n"\ 340 "\tadd.b (%2,%1.w),%0\n"\ 341 "1:"\ 342 : "=&d" ((_output)) \ 343 : "d" ((_value)), "ao" (__log2table) \ 344 : "cc" ) ; \ 345 } 323 346 324 347 #endif … … 339 362 ( 0x8000 >> (_bit_number) ) 340 363 364 #if ( M68K_HAS_BFFFO == 1 ) 341 365 #define _CPU_Priority_Bits_index( _priority ) \ 342 366 (_priority) 367 #else 368 #define _CPU_Priority_Bits_index( _priority ) \ 369 (15 - (_priority)) 370 #endif 343 371 344 372 /* end of Priority handler macros */ -
c/src/exec/score/cpu/m68k/cpu_asm.s
r459f770 r9e86dd7d 133 133 addql #4,a7 | remove vector number 134 134 135 /* 136 * The following entry should be unnecessary once the support is 137 * in place to know what vector we got on a 68000 core. 138 */ 139 140 .global SYM (_ISR_Exit) 141 SYM (_ISR_Exit): 142 135 143 subql #1,SYM (_ISR_Nest_level) | one less nest level 136 144 subql #1,SYM (_Thread_Dispatch_disable_level) … … 138 146 bne exit | If dispatch disabled, exit 139 147 148 #if ( M68K_HAS_SEPARATE_STACKS == 1 ) 140 149 movew #0xf000,d0 | isolate format nibble 141 150 andw a7@(SAVED+FVO_OFFSET),d0 | get F/VO 142 151 cmpiw #0x1000,d0 | is it a throwaway isf? 143 152 bne exit | NOT outer level, so branch 153 #endif 144 154 145 155 tstl SYM (_Context_Switch_necessary) … … 156 166 | If sent, will be processed 157 167 #if ( M68K_HAS_SEPARATE_STACKS == 1 ) 158 movec msp,a0 | a0 = master stack pointer159 movew #0,a0@- | push format word168 movec msp,a0 | a0 = master stack pointer 169 movew #0,a0@- | push format word 160 170 movel # SYM (_ISR_Dispatch),a0@- | push return addr 161 movew a0@(6+SR_OFFSET),a0@- | push thread sr162 movec a0,msp | set master stack pointer171 movew a0@(6+SR_OFFSET),a0@- | push thread sr 172 movec a0,msp | set master stack pointer 163 173 #else 164 #warning "FIX ME ... HOW DO I DISPATCH FROM AN INTERRUPT?" 165 /* probably will simply need to push the _ISR_Dispatch frame */ 166 #endif 167 168 exit: moveml a7@+,d0-d1/a0-a1 | restore d0-d1,a0-a1 174 175 movew a7@(16+SR_OFFSET),sr 176 jsr SYM (_Thread_Dispatch) 177 178 #endif 179 180 exit: moveml a7@+,d0-d1/a0-a1 | restore d0-d1,a0-a1 169 181 rte | return to thread 170 182 | OR _Isr_dispatch -
c/src/lib/libmisc/stackchk/check.c
r459f770 r9e86dd7d 330 330 */ 331 331 332 base += 4;332 base += PATTERN_SIZE_WORDS; 333 333 for (ebase = base + length; base < ebase; base++) 334 334 if (*base != U32_PATTERN) -
c/src/libmisc/stackchk/check.c
r459f770 r9e86dd7d 330 330 */ 331 331 332 base += 4;332 base += PATTERN_SIZE_WORDS; 333 333 for (ebase = base + length; base < ebase; base++) 334 334 if (*base != U32_PATTERN)
Note: See TracChangeset
for help on using the changeset viewer.