@@ -104,41 +104,6 @@ extern uint32_t high32(uint64_t value);
104
104
extern uint32_t low32 (uint64_t value );
105
105
#endif
106
106
107
- /* These macros are to load and store 32-bit values from un-aligned
108
- addresses. This is required for processors that do not allow unaligned
109
- loads. */
110
- #ifdef ALIGNMENT_32BIT_REQUIRED
111
- /* Note that if it's in a variable, you can memcpy it */
112
- #ifdef WORDS_BIGENDIAN
113
- #define PUT_32 (addr , value ) \
114
- { \
115
- ((unsigned char *)(addr))[0] = (value >> 24); \
116
- ((unsigned char *)(addr))[1] = (value >> 16) & 0xff; \
117
- ((unsigned char *)(addr))[2] = (value >> 8) & 0xff; \
118
- ((unsigned char *)(addr))[3] = (value)&0xff; \
119
- }
120
- #define GET_32 (addr ) \
121
- ((((unsigned char *)(addr))[0] << 24) | \
122
- (((unsigned char *)(addr))[1] << 16) | \
123
- (((unsigned char *)(addr))[2] << 8) | (((unsigned char *)(addr))[3]))
124
- #else
125
- #define PUT_32 (addr , value ) \
126
- { \
127
- ((unsigned char *)(addr))[3] = (value >> 24); \
128
- ((unsigned char *)(addr))[2] = (value >> 16) & 0xff; \
129
- ((unsigned char *)(addr))[1] = (value >> 8) & 0xff; \
130
- ((unsigned char *)(addr))[0] = (value)&0xff; \
131
- }
132
- #define GET_32 (addr ) \
133
- ((((unsigned char *)(addr))[3] << 24) | \
134
- (((unsigned char *)(addr))[2] << 16) | \
135
- (((unsigned char *)(addr))[1] << 8) | (((unsigned char *)(addr))[0]))
136
- #endif // WORDS_BIGENDIAN
137
- #else
138
- #define PUT_32 (addr , value ) *(((uint32_t *) (addr)) = (value)
139
- #define GET_32 (addr ) (*(((uint32_t *) (addr)))
140
- #endif
141
-
142
107
#ifdef __cplusplus
143
108
}
144
109
#endif
0 commit comments