mirror of
https://github.com/sheumann/65816-crypto.git
synced 2024-11-21 16:31:11 +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
|
||||
macro
|
||||
ROTL4AUTO &loc,&n
|
||||
ROTL4AUTO &loc,&n,&haveLocPlus2
|
||||
aif &n>5,.skip1
|
||||
ROTL4 &loc,&n
|
||||
mexit
|
||||
@ -158,22 +158,31 @@
|
||||
mexit
|
||||
.skip3
|
||||
aif &n>15,.skip4
|
||||
lda &loc
|
||||
aif C:&haveLocPlus2>0,.noload1
|
||||
ldy &loc+2
|
||||
ago .didload1
|
||||
.noload1
|
||||
tay
|
||||
.didload1
|
||||
lda &loc
|
||||
sta &loc+2
|
||||
sty &loc
|
||||
ROTR4CONT &loc,16-&n
|
||||
mexit
|
||||
.skip4
|
||||
aif &n>16,.skip5
|
||||
lda &loc
|
||||
ldy &loc+2
|
||||
sta &loc+2
|
||||
sty &loc
|
||||
aif C:&haveLocPlus2>0,.noload2
|
||||
lda &loc+2
|
||||
.noload2
|
||||
ldy &loc
|
||||
sta &loc
|
||||
sty &loc+2
|
||||
mexit
|
||||
.skip5
|
||||
aif &n>20,.skip6
|
||||
aif C:&haveLocPlus2>0,.noload2
|
||||
lda &loc+2
|
||||
.noload2
|
||||
ldy &loc
|
||||
sta &loc
|
||||
sty &loc+2
|
||||
@ -312,7 +321,7 @@
|
||||
iny
|
||||
sty idx
|
||||
|
||||
ROTL4AUTO temp,&shift
|
||||
ROTL4AUTO temp,&shift,1
|
||||
|
||||
clc
|
||||
lda &b
|
||||
|
Loading…
Reference in New Issue
Block a user