From de8f0cb9423ee384d1f431ad76cb54886836b014 Mon Sep 17 00:00:00 2001 From: Santiago Arranz Olmos Date: Fri, 20 Oct 2023 21:03:30 +0200 Subject: [PATCH] Spill to MMX --- src/common/keccak/common/fips202_ref_DIRTY.jinc | 6 +++--- src/crypto_kem/kyber/kyber768/amd64/ref/poly.jinc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/keccak/common/fips202_ref_DIRTY.jinc b/src/common/keccak/common/fips202_ref_DIRTY.jinc index d0d7a49e..511dc383 100644 --- a/src/common/keccak/common/fips202_ref_DIRTY.jinc +++ b/src/common/keccak/common/fips202_ref_DIRTY.jinc @@ -4,7 +4,7 @@ from Jade require "common/keccak/keccak1600/amd64/ref1/keccak1600.jinc" #[returnaddress="stack"] fn _shake256_128_33(reg ptr u8[128] out, reg const ptr u8[33] in, reg u64 ms) -> stack u8[128], #msf reg u64 { - stack ptr u8[128] s_out; + #mmx reg ptr u8[128] s_out; stack u64[25] _state; reg ptr u64[25] state; reg u8 c; @@ -80,7 +80,7 @@ fn _shake256_192_33(reg ptr u8[192] out, reg const ptr u8[33] in) -> stack u8[19 #[returnaddress="stack"] fn _sha3_512_32(reg ptr u8[64] out, reg const ptr u8[32] in, reg u64 ms) -> stack u8[64], #msf reg u64 { - stack ptr u8[64] s_out; + #mmx reg ptr u8[64] s_out; stack u64[25] _state; reg ptr u64[25] state; reg u8 c; @@ -153,7 +153,7 @@ fn _sha3_256(reg ptr u8[32] out, reg u64 in inlen, reg u64 ms) -> reg ptr u8[32] { stack u64[25] _state; reg ptr u64[25] state; - stack ptr u8[32] s_out; + #mmx reg ptr u8[32] s_out; stack u64 s_in s_ilen s_r8; reg u64 ilen r8 t64; reg u8 t8; diff --git a/src/crypto_kem/kyber/kyber768/amd64/ref/poly.jinc b/src/crypto_kem/kyber/kyber768/amd64/ref/poly.jinc index 0f4be023..3c8ca986 100644 --- a/src/crypto_kem/kyber/kyber768/amd64/ref/poly.jinc +++ b/src/crypto_kem/kyber/kyber768/amd64/ref/poly.jinc @@ -447,7 +447,7 @@ fn _poly_getnoise(reg ptr u16[KYBER_N] rp, reg ptr u8[KYBER_SYMBYTES] seed, reg reg u64 i j; inline int k; - stack ptr u16[KYBER_N] srp; + #mmx reg ptr u16[KYBER_N] srp; srp = rp;