Fix Clang support

The amalgamated release is now confirmed to be working with Clang,
including its integrated assembler.

Fixes #41
This commit is contained in:
Justine Tunney 2021-02-06 00:24:35 -08:00
parent e06c90fafc
commit d7733579d3
103 changed files with 384 additions and 359 deletions

View file

@ -20,7 +20,7 @@
#include "libc/crypto/rijndael.h"
#include "libc/nexgen32e/x86feature.h"
forceinline aes_block_t unrijndael$westmere(uint32_t n, aes_block_t x,
forceinline aes_block_t unrijndael_westmere(uint32_t n, aes_block_t x,
const struct Rijndael *ctx) {
x ^= ctx->rk[n--].xmm;
do {
@ -30,7 +30,7 @@ forceinline aes_block_t unrijndael$westmere(uint32_t n, aes_block_t x,
return x;
}
static noinline aes_block_t unrijndael$pure(uint32_t n, aes_block_t x,
static noinline aes_block_t unrijndael_pure(uint32_t n, aes_block_t x,
const struct Rijndael *ctx) {
uint32_t j;
__v16qu b1, b2;
@ -57,8 +57,8 @@ static noinline aes_block_t unrijndael$pure(uint32_t n, aes_block_t x,
*/
aes_block_t unrijndael(uint32_t n, aes_block_t x, const struct Rijndael *ctx) {
if (X86_HAVE(AES)) {
return unrijndael$westmere(n, x, ctx);
return unrijndael_westmere(n, x, ctx);
} else {
return unrijndael$pure(n, x, ctx);
return unrijndael_pure(n, x, ctx);
}
}