Skip to content

Commit

Permalink
merged mbb+tfa+jba
Browse files Browse the repository at this point in the history
  • Loading branch information
jba-uminho committed Sep 28, 2024
1 parent 218f5ef commit d4168e1
Show file tree
Hide file tree
Showing 16 changed files with 6,137 additions and 4,941 deletions.
4 changes: 2 additions & 2 deletions bench/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# TODO: cleanup / improve depen. / generic

# --------------------------------------------------------------------
CC= clang-14
CFLAGS= -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
CC ?= clang-14
CFLAGS ?= -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE

BIN ?= bin
TARGETS ?= \
Expand Down
5 changes: 4 additions & 1 deletion bench/src/jasmin/avx2/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
.PHONY: libkyber768_avx2.a clean distclean

# pick the compiler from the submodule
JASMINC ?= ../../../../jasmin/compiler/jasminc

libkyber768_avx2.a:
$(CC) $(CFLAGS) -c jkem.s
$(AR) -r $@ jkem.o

jkem.s: jkem.jazz
jasminc -nowarning -lea $< -o $@
$(JASMINC) -nowarning -lea $< -o $@

clean:
rm -f *.o *.a
Expand Down
2 changes: 1 addition & 1 deletion bench/src/jasmin/avx2/jkem.jazz
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require "../../../../code/jasmin/avx2/jkem.jazz"
require "../../../../code/jasmin/mlkem_avx2/jkem.jazz"
4 changes: 2 additions & 2 deletions bench/src/pqclean/avx2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ KECCAK4XDIR=./keccak4x
KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o
KECCAK4X=$(KECCAK4XDIR)/$(KECCAK4XOBJ)

CC = clang-14
CFLAGS = -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE -I../../randombytes $(EXTRAFLAGS)
CC ?= clang-14
CFLAGS ?= -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE -I../../randombytes $(EXTRAFLAGS)
#CFLAGS=-mavx2 -mbmi2 -mpopcnt -O3 -Wall -Wextra -Wpedantic -Werror \
# -Wmissing-prototypes -Wredundant-decls \
# -Wpointer-arith -Wshadow \
Expand Down
4 changes: 2 additions & 2 deletions bench/src/pqclean/clean/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ LIB=libkyber768_clean.a
HEADERS=api.h cbd.h indcpa.h kem.h ntt.h params.h poly.h polyvec.h reduce.h symmetric.h verify.h fips202.h
OBJECTS=cbd.o indcpa.o kem.o ntt.o poly.o polyvec.o reduce.o symmetric-shake.o verify.o fips202.o

CC=clang-14
CFLAGS=-march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE -I../../randombytes $(EXTRAFLAGS)
CC ?= clang-14
CFLAGS ?= -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE -I../../randombytes $(EXTRAFLAGS)
#CFLAGS=-O3 -Wall -Wextra -Wpedantic -Werror -Wmissing-prototypes -Wredundant-decls -std=c99 -I../../randombytes $(EXTRAFLAGS)

all: $(LIB)
Expand Down
4 changes: 2 additions & 2 deletions bench/src/randombytes/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CC = clang-14
CFLAGS = -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
CC ?= clang-14
CFLAGS ?= -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE

default: librandombytes1.a

Expand Down
3 changes: 3 additions & 0 deletions code/jasmin/mlkem_avx2/extraction/Array2144.ec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from Jasmin require import JArray.

clone export PolyArray as Array2144 with op size <- 2144.
3 changes: 3 additions & 0 deletions code/jasmin/mlkem_avx2/extraction/WArray2144.ec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from Jasmin require import JWord_array.

clone export WArray as WArray2144 with op size <- 2144.
9,200 changes: 5,138 additions & 4,062 deletions code/jasmin/mlkem_avx2/extraction/jkem_avx2.ec

Large diffs are not rendered by default.

Loading

0 comments on commit d4168e1

Please sign in to comment.