Skip to content

Commit

Permalink
Remove 5x64 implementation - no actual benefits
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Dec 1, 2013
1 parent 399c03f commit 60442b8
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 764 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ JAVA_FILES := src/java/org_bitcoin_NativeSecp256k1.h src/java/org_bitcoin_Native
OBJS :=

ifeq ($(USE_ASM), 1)
OBJS := $(OBJS) obj/field_5x$(HAVE_LIMB)_asm.o
OBJS := $(OBJS) obj/field_5x52_asm.o
endif
STD="gnu99"

Expand All @@ -20,9 +20,6 @@ clean:
obj/field_5x52_asm.o: src/field_5x52_asm.asm
$(YASM) -f elf64 -o obj/field_5x52_asm.o src/field_5x52_asm.asm

obj/field_5x64_asm.o: src/field_5x64_asm.asm
$(YASM) -f elf64 -o obj/field_5x64_asm.o src/field_5x64_asm.asm

obj/secp256k1.o: $(FILES) src/secp256k1.c include/secp256k1.h
$(CC) -fPIC -std=$(STD) $(CFLAGS) $(CFLAGS_EXTRA) -DNDEBUG -$(OPTLEVEL) src/secp256k1.c -c -o obj/secp256k1.o

Expand Down
14 changes: 0 additions & 14 deletions bench_all

This file was deleted.

11 changes: 2 additions & 9 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ if [ "$?" = 0 ]; then
HAVE_INT128=1
fi

#default limb size
HAVE_LIMB=52

for arg in "$@"; do
case "$arg" in
--no-yasm)
Expand All @@ -110,9 +107,6 @@ for arg in "$@"; do
;;
--no-openssl)
HAVE_OPENSSL=0
;;
--use-5x64)
HAVE_LIMB=64
;;
--use-endomorphism)
USE_ENDOMORPHISM=1
Expand All @@ -126,10 +120,10 @@ USE_ASM=0

# select field implementation
if [ "$HAVE_YASM" = "1" ]; then
CFLAGS_FIELD="-DUSE_FIELD_5X$HAVE_LIMB -DUSE_FIELD_5X${HAVE_LIMB}_ASM"
CFLAGS_FIELD="-DUSE_FIELD_5X52 -DUSE_FIELD_5X52_ASM"
USE_ASM=1
elif [ "$HAVE_INT128" = "1" ]; then
CFLAGS_FIELD="-DUSE_FIELD_5X$HAVE_LIMB -DUSE_FIELD_5X${HAVE_LIMB}_INT128"
CFLAGS_FIELD="-DUSE_FIELD_5X52 -DUSE_FIELD_5X52_INT128"
elif [ "$HAVE_GMP" = "1" ]; then
CFLAGS_FIELD="-DUSE_FIELD_GMP"
LINK_GMP=1
Expand Down Expand Up @@ -176,5 +170,4 @@ echo "CFLAGS_TEST_EXTRA=$CFLAGS_TEST_EXTRA" >> config.mk
echo "LDFLAGS_EXTRA=$LDFLAGS_EXTRA" >> config.mk
echo "LDFLAGS_TEST_EXTRA=$LDFLAGS_TEST_EXTRA" >> config.mk
echo "USE_ASM=$USE_ASM" >>config.mk
echo "HAVE_LIMB=$HAVE_LIMB" >>config.mk
echo "OPTLEVEL=O2" >>config.mk
2 changes: 0 additions & 2 deletions src/field.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#include "field_10x26.h"
#elif defined(USE_FIELD_5X52)
#include "field_5x52.h"
#elif defined(USE_FIELD_5X64)
#include "field_5x64.h"
#else
#error "Please select field implementation"
#endif
Expand Down
19 changes: 0 additions & 19 deletions src/field_5x64.h

This file was deleted.

Loading

0 comments on commit 60442b8

Please sign in to comment.