mirror of
https://github.com/elliotnunn/NetBoot.git
synced 2025-02-05 00:29:57 +00:00
Init performance fix
Quite an embarrassing one. I search the stack for a known 4-byte value. This search starts at the stack pointer and continues towards low memory. Oops! I was searching nearly the entire address space.
This commit is contained in:
parent
a96d61eca7
commit
c5947f2652
@ -56,8 +56,8 @@ ResumeAfterCopy
|
|||||||
; We do this by scanning the stack for the return address of the original _Read.
|
; We do this by scanning the stack for the return address of the original _Read.
|
||||||
move.l $2AE,A0 ; A0 = ROMBase (lower limit)
|
move.l $2AE,A0 ; A0 = ROMBase (lower limit)
|
||||||
lea $4000(A0),A1 ; A1 = ROMBase + a bit (upper limit)
|
lea $4000(A0),A1 ; A1 = ROMBase + a bit (upper limit)
|
||||||
lea -2(SP),A2
|
move.l SP,A2
|
||||||
.loop subq.l #2,A2 ; A2 = where we search the stack
|
.loop addq.l #2,A2 ; A2 = where we search the stack
|
||||||
move.l (A2),A3 ; A3 = potential return address
|
move.l (A2),A3 ; A3 = potential return address
|
||||||
cmp.l A0,A3 ; lower limit check
|
cmp.l A0,A3 ; lower limit check
|
||||||
bls.s .loop
|
bls.s .loop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user