diff options
| author | hpa <hpa> | 2004-12-16 06:22:37 +0000 |
|---|---|---|
| committer | hpa <hpa> | 2004-12-16 06:22:37 +0000 |
| commit | 541652ee52a66c8600fb01bc283a2ca7bead2d9f (patch) | |
| tree | 1fadf845884bc600613f37d0ecb2ca904b345f25 /ldlinux.asm | |
| parent | 55d3481671736d0944115e55be5e4506cf496161 (diff) | |
| download | syslinux-541652ee52a66c8600fb01bc283a2ca7bead2d9f.tar.gz | |
scas uses the destination operand, so don't use it.
Diffstat (limited to 'ldlinux.asm')
| -rw-r--r-- | ldlinux.asm | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/ldlinux.asm b/ldlinux.asm index 54ece593..b9ef9bc5 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -1511,13 +1511,12 @@ getcachesector: mov gs,si mov si,CachePtrs ; Sector cache pointers mov cx,65536/SECTOR_SIZE - repne scasd ; Do we have it? - jne .miss - ; We have it; get the pointer - sub si,CachePtrs+4 - shl si,SECTOR_SHIFT-2 - pop cx - ret +.search: + cmp eax,[si] + jz .hit + add si,4 + loop .search + .miss: ; Need to load it. Highly inefficient cache replacement ; algorithm: Least Recently Written (LRW) @@ -1541,6 +1540,13 @@ getcachesector: pop cx ret + +.hit: ; We have it; get the pointer + sub si,CachePtrs + shl si,SECTOR_SHIFT-2 + pop cx + ret + ; ----------------------------------------------------------------------------- ; Common modules ; ----------------------------------------------------------------------------- |
