Skip to content

Commit 641ea02

Browse files
jcapikmcb30
authored andcommitted
[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>
1 parent d0ea2b1 commit 641ea02

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/arch/x86/prefix/unlzma.S

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
4545

4646
.section ".note.GNU-stack", "", @progbits
4747
.code32
48-
.arch i486
48+
.arch i386
4949
.section ".prefix.lib", "ax", @progbits
5050

5151
#ifdef CODE16
@@ -962,7 +962,9 @@ decompress:
962962
ADDR32 lodsb /* discard initial byte */
963963
print_hex_byte %al
964964
ADDR32 lodsl
965-
bswapl %eax
965+
xchgb %al, %ah
966+
roll $16, %eax
967+
xchgb %al, %ah
966968
print_hex_dword %eax
967969
print_character $('\n')
968970
movl %eax, rc_code(%ebp)

0 commit comments

Comments
 (0)