mirror of
https://github.com/sheumann/65816-crypto.git
synced 2024-11-24 19:31:17 +00:00
Force MD5 tables to be page-aligned, which should save a cycle in some cases.
This commit is contained in:
parent
e90af7c1a4
commit
2f34f006ba
24
Makefile
24
Makefile
@ -6,17 +6,17 @@ PROGRAMS = aescbctest aesctrtest aestest aescrypt sha1sum sha1test \
|
|||||||
.PHONY: default
|
.PHONY: default
|
||||||
default: $(PROGRAMS)
|
default: $(PROGRAMS)
|
||||||
|
|
||||||
aescbctest: aesalign.asm aescbctest.c aesmodes.c aes.asm aes.macros aes.h
|
aescbctest: pagealign.asm aescbctest.c aesmodes.c aes.asm aes.macros aes.h
|
||||||
occ $(CFLAGS) aesalign.asm aescbctest.c aesmodes.c aes.asm -o aescbctest
|
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
|
aesctrtest: pagealign.asm aesctrtest.c aesmodes.c aes.asm aes.macros aes.h
|
||||||
occ $(CFLAGS) aesalign.asm aesctrtest.c aesmodes.c aes.asm -o aesctrtest
|
occ $(CFLAGS) pagealign.asm aesctrtest.c aesmodes.c aes.asm -o aesctrtest
|
||||||
|
|
||||||
aestest: aesalign.asm aestest.c aes.asm aes.macros aes.h
|
aestest: pagealign.asm aestest.c aes.asm aes.macros aes.h
|
||||||
occ $(CFLAGS) aesalign.asm aestest.c aes.asm -o aestest
|
occ $(CFLAGS) pagealign.asm aestest.c aes.asm -o aestest
|
||||||
|
|
||||||
aescrypt: aesalign.asm aescrypt.c aesmodes.c aes.asm aes.macros aes.h
|
aescrypt: pagealign.asm aescrypt.c aesmodes.c aes.asm aes.macros aes.h
|
||||||
occ $(CFLAGS) aesalign.asm aescrypt.c aesmodes.c aes.asm -o aescrypt
|
occ $(CFLAGS) pagealign.asm aescrypt.c aesmodes.c aes.asm -o aescrypt
|
||||||
|
|
||||||
sha1sum: sha1sum.c sha1.cc sha1.asm sha1.macros sha1.h
|
sha1sum: sha1sum.c sha1.cc sha1.asm sha1.macros sha1.h
|
||||||
occ $(CFLAGS) sha1sum.c sha1.cc -o sha1sum
|
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
|
sha256test: sha256test.c sha256.cc sha256.asm sha256.macros sha256.h
|
||||||
occ $(CFLAGS) sha256test.c sha256.cc -o sha256test
|
occ $(CFLAGS) sha256test.c sha256.cc -o sha256test
|
||||||
|
|
||||||
md5sum: md5sum.c md5.cc md5.asm md5.macros md5.h
|
md5sum: pagealign.asm md5sum.c md5.cc md5.asm md5.macros md5.h
|
||||||
occ $(CFLAGS) md5sum.c md5.cc -o md5sum
|
occ $(CFLAGS) pagealign.asm md5sum.c md5.cc -o md5sum
|
||||||
|
|
||||||
md5test: md5test.c md5.cc md5.asm md5.macros md5.h
|
md5test: pagealign.asm md5test.c md5.cc md5.asm md5.macros md5.h
|
||||||
occ $(CFLAGS) md5test.c md5.cc -o md5test
|
occ $(CFLAGS) pagealign.asm md5test.c md5.cc -o md5test
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
2
md5.asm
2
md5.asm
@ -39,6 +39,7 @@ m gequ 60
|
|||||||
|
|
||||||
|
|
||||||
* Precomputed values of g*4 for each loop iteration, for indexing the message
|
* Precomputed values of g*4 for each loop iteration, for indexing the message
|
||||||
|
align 256
|
||||||
g_times_4 private
|
g_times_4 private
|
||||||
dc i4' 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60'
|
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'
|
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'
|
dc i4' 0, 28, 56, 20, 48, 12, 40, 4, 32, 60, 24, 52, 16, 44, 8, 36'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
align 256
|
||||||
k private
|
k private
|
||||||
dc i4'$d76aa478, $e8c7b756, $242070db, $c1bdceee'
|
dc i4'$d76aa478, $e8c7b756, $242070db, $c1bdceee'
|
||||||
dc i4'$f57c0faf, $4787c62a, $a8304613, $fd469501'
|
dc i4'$f57c0faf, $4787c62a, $a8304613, $fd469501'
|
||||||
|
@ -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.
|
* This needs to be linked before the root file generated by ORCA/C.
|
||||||
align 256
|
align 256
|
||||||
dummy private
|
dummy private
|
Loading…
Reference in New Issue
Block a user