typedef long bb__aliased_long FIX_ALIASING;
typedef uint16_t bb__aliased_uint16_t FIX_ALIASING;
typedef uint32_t bb__aliased_uint32_t FIX_ALIASING;
+typedef uint64_t bb__aliased_uint64_t FIX_ALIASING;
/* NB: unaligned parameter should be a pointer, aligned one -
* a lvalue. This makes it more likely to not swap them by mistake
if (swap_needed)
t = bb_bswap_64(t);
/* wbuffer is suitably aligned for this */
- memcpy(&ctx->wbuffer[64 - 8], &t, sizeof(t));
+ *(bb__aliased_uint64_t *) (&ctx->wbuffer[64 - 8]) = t;
}
ctx->process_block(ctx);
if (remaining >= 8)
uint64_t t;
t = ctx->total64[0] << 3;
t = SWAP_BE64(t);
- memcpy(&ctx->wbuffer[128 - 8], &t, sizeof(t));
+ *(bb__aliased_uint64_t *) (&ctx->wbuffer[128 - 8]) = t;
t = (ctx->total64[1] << 3) | (ctx->total64[0] >> 61);
t = SWAP_BE64(t);
- memcpy(&ctx->wbuffer[128 - 16], &t, sizeof(t));
+ *(bb__aliased_uint64_t *) (&ctx->wbuffer[128 - 16]) = t;
}
sha512_process_block128(ctx);
if (remaining >= 16)