mirror of
https://github.com/sheumann/65816-crypto.git
synced 2024-11-22 07:31:58 +00:00
Small optimization to eliminate some unnecessary loads in MD5.
This commit is contained in:
parent
129f371902
commit
e90af7c1a4
23
md5.macros
23
md5.macros
@ -133,7 +133,7 @@
|
|||||||
|
|
||||||
* Left-rotate with various optimizations applied
|
* Left-rotate with various optimizations applied
|
||||||
macro
|
macro
|
||||||
ROTL4AUTO &loc,&n
|
ROTL4AUTO &loc,&n,&haveLocPlus2
|
||||||
aif &n>5,.skip1
|
aif &n>5,.skip1
|
||||||
ROTL4 &loc,&n
|
ROTL4 &loc,&n
|
||||||
mexit
|
mexit
|
||||||
@ -158,22 +158,31 @@
|
|||||||
mexit
|
mexit
|
||||||
.skip3
|
.skip3
|
||||||
aif &n>15,.skip4
|
aif &n>15,.skip4
|
||||||
lda &loc
|
aif C:&haveLocPlus2>0,.noload1
|
||||||
ldy &loc+2
|
ldy &loc+2
|
||||||
|
ago .didload1
|
||||||
|
.noload1
|
||||||
|
tay
|
||||||
|
.didload1
|
||||||
|
lda &loc
|
||||||
sta &loc+2
|
sta &loc+2
|
||||||
sty &loc
|
sty &loc
|
||||||
ROTR4CONT &loc,16-&n
|
ROTR4CONT &loc,16-&n
|
||||||
mexit
|
mexit
|
||||||
.skip4
|
.skip4
|
||||||
aif &n>16,.skip5
|
aif &n>16,.skip5
|
||||||
lda &loc
|
aif C:&haveLocPlus2>0,.noload2
|
||||||
ldy &loc+2
|
lda &loc+2
|
||||||
sta &loc+2
|
.noload2
|
||||||
sty &loc
|
ldy &loc
|
||||||
|
sta &loc
|
||||||
|
sty &loc+2
|
||||||
mexit
|
mexit
|
||||||
.skip5
|
.skip5
|
||||||
aif &n>20,.skip6
|
aif &n>20,.skip6
|
||||||
|
aif C:&haveLocPlus2>0,.noload2
|
||||||
lda &loc+2
|
lda &loc+2
|
||||||
|
.noload2
|
||||||
ldy &loc
|
ldy &loc
|
||||||
sta &loc
|
sta &loc
|
||||||
sty &loc+2
|
sty &loc+2
|
||||||
@ -312,7 +321,7 @@
|
|||||||
iny
|
iny
|
||||||
sty idx
|
sty idx
|
||||||
|
|
||||||
ROTL4AUTO temp,&shift
|
ROTL4AUTO temp,&shift,1
|
||||||
|
|
||||||
clc
|
clc
|
||||||
lda &b
|
lda &b
|
||||||
|
Loading…
Reference in New Issue
Block a user