27 #ifndef CDIO_BYTESEX_ASM_H_ 28 #define CDIO_BYTESEX_ASM_H_ 29 #if !defined(DISABLE_ASM_OPTIMIZE) 33 #if !defined CDIO_INLINE 34 #if defined(__cplusplus) || defined(inline) 35 #define CDIO_INLINE inline 36 #elif defined(__GNUC__) 37 #define CDIO_INLINE __inline__ 38 #elif defined(_MSC_VER) 39 #define CDIO_INLINE __inline 45 #if defined(__powerpc__) && defined(__GNUC__) 48 uint32_t uint32_swap_le_be_asm(
const uint32_t a)
52 __asm__ (
"lwbrx %0,0,%1" 60 uint16_t uint16_swap_le_be_asm(
const uint16_t a)
64 __asm__ (
"lhbrx %0,0,%1" 71 #define UINT16_SWAP_LE_BE uint16_swap_le_be_asm 72 #define UINT32_SWAP_LE_BE uint32_swap_le_be_asm 74 #elif defined(__mc68000__) && defined(__STORMGCC__) 77 uint32_t uint32_swap_le_be_asm(uint32_t a __asm__(
"d0"))
81 __asm__(
"move.l %1,d0;rol.w #8,d0;swap d0;rol.w #8,d0;move.l d0,%0" 89 uint16_t uint16_swap_le_be_asm(uint16_t a __asm__(
"d0"))
91 __asm__(
"move.l %1,d0;rol.w #8,d0;move.l d0,%0" 98 #define UINT16_SWAP_LE_BE uint16_swap_le_be_asm 99 #define UINT32_SWAP_LE_BE uint32_swap_le_be_asm 101 #elif 0 && defined(__i386__) && defined(__GNUC__) 104 uint32_t uint32_swap_le_be_asm(uint32_t a)
106 __asm__(
"xchgb %b0,%h0\n\t" 116 uint16_t uint16_swap_le_be_asm(uint16_t a)
118 __asm__(
"xchgb %b0,%h0" 125 #define UINT16_SWAP_LE_BE uint16_swap_le_be_asm 126 #define UINT32_SWAP_LE_BE uint32_swap_le_be_asm Common type definitions used pervasively in libcdio.
#define CDIO_INLINE
Definition: bytesex_asm.h:41