summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJaromir Capik2026-01-12 02:40:28 +0100
committerMichael Brown2026-01-25 17:15:32 +0100
commit641ea020f1b10a4317f758a0b73e3c8fc00f8914 (patch)
tree18e8a6a722678db9d61e9eee61417d7f8144be3e /src
parent[ci] Use prebuilt containers to build and test iPXE (diff)
downloadipxe-641ea020f1b10a4317f758a0b73e3c8fc00f8914.tar.gz
ipxe-641ea020f1b10a4317f758a0b73e3c8fc00f8914.tar.xz
ipxe-641ea020f1b10a4317f758a0b73e3c8fc00f8914.zip
[prefix] Make unlzma.S compatible with 386 class CPUs
Replace the bswap instruction with xchgb and roll and change the module architecture from i486 to i386 to be consistent with the rest of the project. Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/prefix/unlzma.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/x86/prefix/unlzma.S b/src/arch/x86/prefix/unlzma.S
index e4d1e190d..6ab3222e2 100644
--- a/src/arch/x86/prefix/unlzma.S
+++ b/src/arch/x86/prefix/unlzma.S
@@ -45,7 +45,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
.section ".note.GNU-stack", "", @progbits
.code32
- .arch i486
+ .arch i386
.section ".prefix.lib", "ax", @progbits
#ifdef CODE16
@@ -962,7 +962,9 @@ decompress:
ADDR32 lodsb /* discard initial byte */
print_hex_byte %al
ADDR32 lodsl
- bswapl %eax
+ xchgb %al, %ah
+ roll $16, %eax
+ xchgb %al, %ah
print_hex_dword %eax
print_character $('\n')
movl %eax, rc_code(%ebp)