| 38 | } |
| 39 | |
| 40 | static inline uint64_t load64( const void *src ) |
| 41 | { |
| 42 | #if defined(NATIVE_LITTLE_ENDIAN) && !defined(HAVE_ALIGNED_ACCESS_REQUIRED) |
| 43 | return *( uint64_t * )( src ); |
| 44 | #else |
| 45 | const uint8_t *p = ( uint8_t * )src; |
| 46 | uint64_t w = *p++; |
| 47 | w |= ( uint64_t )( *p++ ) << 8; |
| 48 | w |= ( uint64_t )( *p++ ) << 16; |
| 49 | w |= ( uint64_t )( *p++ ) << 24; |
| 50 | w |= ( uint64_t )( *p++ ) << 32; |
| 51 | w |= ( uint64_t )( *p++ ) << 40; |
| 52 | w |= ( uint64_t )( *p++ ) << 48; |
| 53 | w |= ( uint64_t )( *p++ ) << 56; |
| 54 | return w; |
| 55 | #endif |
| 56 | } |
| 57 | |
| 58 | static inline void store32( void *dst, uint32_t w ) |
| 59 | { |
no outgoing calls
no test coverage detected