Changeset 9f9871f in rtems
- Timestamp:
- 03/06/02 14:37:38 (21 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 8264d23
- Parents:
- b04ee63
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/score/cpu/m68k/ChangeLog
rb04ee63 r9f9871f 1 2002-03-06 Victor V. Vengerov <vvv@oktet.ru> 2 3 * rtems/score/m68k.h [M68K_COLDFIRE_ARCH] (CPU_swap_u16, CPU_swap_u32): 4 Generic implementation of endian swap primitives added for Coldfire 5 family. 6 1 7 2002-01-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 8 -
c/src/exec/score/cpu/m68k/rtems/score/m68k.h
rb04ee63 r9f9871f 228 228 #error "Unsupported CPU model -- are you sure you're running a 68k compiler?" 229 229 230 #endif 231 232 #ifndef ASM 233 #include <rtems/score/m68ktypes.h> 230 234 #endif 231 235 … … 327 331 * It must be static because it is referenced indirectly. 328 332 */ 333 #if ( M68K_COLDFIRE_ARCH == 1 ) 334 335 /* There are no rotate commands in Coldfire architecture. We will use 336 * generic implementation of endian swapping for Coldfire. 337 */ 338 static inline unsigned int CPU_swap_u32( 339 unsigned int value 340 ) 341 { 342 unsigned32 byte1, byte2, byte3, byte4, swapped; 343 344 byte4 = (value >> 24) & 0xff; 345 byte3 = (value >> 16) & 0xff; 346 byte2 = (value >> 8) & 0xff; 347 byte1 = value & 0xff; 348 349 swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 350 return( swapped ); 351 } 352 353 static inline unsigned int m68k_swap_u16( 354 unsigned int value 355 ) 356 { 357 return (((value & 0xff) << 8) | ((value >> 8) & 0xff)); 358 } 359 360 #else 329 361 330 362 static inline unsigned int m68k_swap_u32( … … 351 383 return( swapped ); 352 384 } 385 #endif 353 386 354 387 #define CPU_swap_u32( value ) m68k_swap_u32( value ) -
cpukit/score/cpu/m68k/ChangeLog
rb04ee63 r9f9871f 1 2002-03-06 Victor V. Vengerov <vvv@oktet.ru> 2 3 * rtems/score/m68k.h [M68K_COLDFIRE_ARCH] (CPU_swap_u16, CPU_swap_u32): 4 Generic implementation of endian swap primitives added for Coldfire 5 family. 6 1 7 2002-01-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 8 -
cpukit/score/cpu/m68k/rtems/score/m68k.h
rb04ee63 r9f9871f 228 228 #error "Unsupported CPU model -- are you sure you're running a 68k compiler?" 229 229 230 #endif 231 232 #ifndef ASM 233 #include <rtems/score/m68ktypes.h> 230 234 #endif 231 235 … … 327 331 * It must be static because it is referenced indirectly. 328 332 */ 333 #if ( M68K_COLDFIRE_ARCH == 1 ) 334 335 /* There are no rotate commands in Coldfire architecture. We will use 336 * generic implementation of endian swapping for Coldfire. 337 */ 338 static inline unsigned int CPU_swap_u32( 339 unsigned int value 340 ) 341 { 342 unsigned32 byte1, byte2, byte3, byte4, swapped; 343 344 byte4 = (value >> 24) & 0xff; 345 byte3 = (value >> 16) & 0xff; 346 byte2 = (value >> 8) & 0xff; 347 byte1 = value & 0xff; 348 349 swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 350 return( swapped ); 351 } 352 353 static inline unsigned int m68k_swap_u16( 354 unsigned int value 355 ) 356 { 357 return (((value & 0xff) << 8) | ((value >> 8) & 0xff)); 358 } 359 360 #else 329 361 330 362 static inline unsigned int m68k_swap_u32( … … 351 383 return( swapped ); 352 384 } 385 #endif 353 386 354 387 #define CPU_swap_u32( value ) m68k_swap_u32( value )
Note: See TracChangeset
for help on using the changeset viewer.