Skip to content

Commit f7bbc23

Browse files
committed
Avoid alignment issues on x86_64
1 parent 0f36275 commit f7bbc23

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/ipcrypt2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ typedef __m128i BlockVec;
232232
/**
233233
* Expand an 8-byte tweak into a 128-bit register.
234234
*/
235-
# define TWEAK_EXPAND(tweak) _mm_cvtepu16_epi32(_mm_cvtsi64_si128(*(const int64_t *) (tweak)))
235+
# define TWEAK_EXPAND(tweak) \
236+
_mm_set_epi8(0, 0, tweak[7], tweak[6], 0, 0, tweak[5], tweak[4], 0, 0, tweak[3], tweak[2], \
237+
0, 0, tweak[1], tweak[0])
236238
#else
237239
# error This architecture is not supported yet
238240
#endif

0 commit comments

Comments
 (0)