Force MD5 tables to be page-aligned, which should save a cycle in some cases.

This commit is contained in:
Stephen Heumann 2017-07-04 14:37:17 -05:00
parent e90af7c1a4
commit 2f34f006ba
3 changed files with 15 additions and 13 deletions

View File

@ -6,17 +6,17 @@ PROGRAMS = aescbctest aesctrtest aestest aescrypt sha1sum sha1test \
.PHONY: default
default: $(PROGRAMS)
aescbctest: aesalign.asm aescbctest.c aesmodes.c aes.asm aes.macros aes.h
occ $(CFLAGS) aesalign.asm aescbctest.c aesmodes.c aes.asm -o aescbctest
aescbctest: pagealign.asm aescbctest.c aesmodes.c aes.asm aes.macros aes.h
occ $(CFLAGS) pagealign.asm aescbctest.c aesmodes.c aes.asm -o aescbctest
aesctrtest: aesalign.asm aesctrtest.c aesmodes.c aes.asm aes.macros aes.h
occ $(CFLAGS) aesalign.asm aesctrtest.c aesmodes.c aes.asm -o aesctrtest
aesctrtest: pagealign.asm aesctrtest.c aesmodes.c aes.asm aes.macros aes.h
occ $(CFLAGS) pagealign.asm aesctrtest.c aesmodes.c aes.asm -o aesctrtest
aestest: aesalign.asm aestest.c aes.asm aes.macros aes.h
occ $(CFLAGS) aesalign.asm aestest.c aes.asm -o aestest
aestest: pagealign.asm aestest.c aes.asm aes.macros aes.h
occ $(CFLAGS) pagealign.asm aestest.c aes.asm -o aestest
aescrypt: aesalign.asm aescrypt.c aesmodes.c aes.asm aes.macros aes.h
occ $(CFLAGS) aesalign.asm aescrypt.c aesmodes.c aes.asm -o aescrypt
aescrypt: pagealign.asm aescrypt.c aesmodes.c aes.asm aes.macros aes.h
occ $(CFLAGS) pagealign.asm aescrypt.c aesmodes.c aes.asm -o aescrypt
sha1sum: sha1sum.c sha1.cc sha1.asm sha1.macros sha1.h
occ $(CFLAGS) sha1sum.c sha1.cc -o sha1sum
@ -30,11 +30,11 @@ sha256sum: sha256sum.c sha256.cc sha256.asm sha256.macros sha256.h
sha256test: sha256test.c sha256.cc sha256.asm sha256.macros sha256.h
occ $(CFLAGS) sha256test.c sha256.cc -o sha256test
md5sum: md5sum.c md5.cc md5.asm md5.macros md5.h
occ $(CFLAGS) md5sum.c md5.cc -o md5sum
md5sum: pagealign.asm md5sum.c md5.cc md5.asm md5.macros md5.h
occ $(CFLAGS) pagealign.asm md5sum.c md5.cc -o md5sum
md5test: md5test.c md5.cc md5.asm md5.macros md5.h
occ $(CFLAGS) md5test.c md5.cc -o md5test
md5test: pagealign.asm md5test.c md5.cc md5.asm md5.macros md5.h
occ $(CFLAGS) pagealign.asm md5test.c md5.cc -o md5test
.PHONY: clean
clean:

View File

@ -39,6 +39,7 @@ m gequ 60
* Precomputed values of g*4 for each loop iteration, for indexing the message
align 256
g_times_4 private
dc i4' 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60'
dc i4' 4, 24, 44, 0, 20, 40, 60, 16, 36, 56, 12, 32, 52, 8, 28, 48'
@ -46,6 +47,7 @@ g_times_4 private
dc i4' 0, 28, 56, 20, 48, 12, 40, 4, 32, 60, 24, 52, 16, 44, 8, 36'
end
align 256
k private
dc i4'$d76aa478, $e8c7b756, $242070db, $c1bdceee'
dc i4'$f57c0faf, $4787c62a, $a8304613, $fd469501'

View File

@ -1,4 +1,4 @@
* Dummy segment to be linked first to set the alignment.
* Dummy segment to be linked first to set 256-byte (page) alignment.
* This needs to be linked before the root file generated by ORCA/C.
align 256
dummy private