Skip to content

Commit 5deeaea

Browse files
authored
Merge pull request #687 from pabuhler/remove-put-get
remove unused GET_32 and PUT_32
2 parents 1396c2a + 2b10bfd commit 5deeaea

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

crypto/include/integers.h

-35
Original file line numberDiff line numberDiff line change
@@ -104,41 +104,6 @@ extern uint32_t high32(uint64_t value);
104104
extern uint32_t low32(uint64_t value);
105105
#endif
106106

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-
142107
#ifdef __cplusplus
143108
}
144109
#endif

0 commit comments

Comments
 (0)