diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-04-27 15:58:18 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-04-27 15:58:18 -0700 |
commit | f2dc4e108dbec03b05f8629626b0006454e6195e (patch) | |
tree | f9270fac8cef8ff14c4092c3d1ffa29bdbcd9c0b | |
parent | 09ed0b6f311dfe9bf01e9ed025a77ce6bf2a3d8e (diff) | |
download | syslinux-f2dc4e108dbec03b05f8629626b0006454e6195e.tar.gz |
rllpack: make all pointers 32 bits widesyslinux-3.80-pre2
The messing around with partial pointers for rllpack/rllunpack turned
out to be a source of bugs. Instead, have all the values be 32 bits
wide, and require the callers to pass them accordingly.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | core/parseconfig.inc | 4 | ||||
-rw-r--r-- | core/rllpack.inc | 13 | ||||
-rw-r--r-- | core/ui.inc | 4 |
3 files changed, 9 insertions, 12 deletions
diff --git a/core/parseconfig.inc b/core/parseconfig.inc index 962d1200..5159a1a3 100644 --- a/core/parseconfig.inc +++ b/core/parseconfig.inc @@ -433,9 +433,9 @@ commit_vk: rep stosb ; Pack into high memory - mov si,VKernelBuf + mov esi,VKernelBuf mov edi,[VKernelEnd] - mov cx,vk_size + mov ecx,vk_size call rllpack mov [VKernelEnd],edi .nolabel: diff --git a/core/rllpack.inc b/core/rllpack.inc index 717ba6ab..c3bca696 100644 --- a/core/rllpack.inc +++ b/core/rllpack.inc @@ -31,8 +31,8 @@ ; ; rllpack: -; Pack CX bytes from SI into EDI. -; Returns updated (E)SI and EDI. +; Pack ECX bytes from ESI into EDI. +; Returns updated ESI and EDI. ; rllpack: push word .pmentry @@ -44,8 +44,6 @@ rllpack: push ecx push ebx push edx - movzx ecx,cx - movzx esi,si .startseq: xor eax,eax ; Zero byte xor ebx,ebx ; Run length zero @@ -116,9 +114,9 @@ rllpack: bits 16 ; ; rllunpack: -; Unpack bytes from SI into EDI -; On return (E)SI, EDI are updated and -; (E)CX contains number of bytes output. +; Unpack bytes from ESI into EDI +; On return ESI, EDI are updated and +; ECX contains number of bytes output. ; rllunpack: push word .pmentry @@ -128,7 +126,6 @@ rllunpack: bits 32 .pmentry: push edi - movzx esi,si xor ecx,ecx .header: dec esi diff --git a/core/ui.inc b/core/ui.inc index aa86c569..cb6e03bd 100644 --- a/core/ui.inc +++ b/core/ui.inc @@ -161,7 +161,7 @@ display_labels: push cx ; save command line size - mov di,VKernelBuf + mov edi,VKernelBuf call rllunpack ; ESI updated on return @@ -350,7 +350,7 @@ vk_check: cmp esi,[VKernelEnd] jbe .not_vk - mov di,VKernelBuf + mov edi,VKernelBuf call rllunpack ; ESI updated on return |