From 8aa445e2fc7a95399538dcb061c429c57020fcfc Mon Sep 17 00:00:00 2001 From: John Reiser Date: Tue, 30 Jul 2024 14:14:23 -0700 Subject: [PATCH] i386 stub: prefer movzbl over movb fetch [stragglers] modified: stub/src/arch/i386/nrv2d_d32-easy.S modified: stub/src/arch/i386/nrv2e_d32-easy.S --- src/stub/src/arch/i386/nrv2d_d32-easy.S | 6 +++--- src/stub/src/arch/i386/nrv2e_d32-easy.S | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/stub/src/arch/i386/nrv2d_d32-easy.S b/src/stub/src/arch/i386/nrv2d_d32-easy.S index 0ff92b0f..53065c0a 100644 --- a/src/stub/src/arch/i386/nrv2d_d32-easy.S +++ b/src/stub/src/arch/i386/nrv2d_d32-easy.S @@ -38,7 +38,7 @@ lit_n2d: incl %esi; movb %dl,(%edi) incl %edi top_n2d: - movb (%esi),%dl // speculate: literal, or bottom 8 bits of offset + movzbl (%esi),%edx // speculate: literal, or bottom 8 bits of offset jnextb1yp lit_n2d push $1; pop off jmp getoff_n2d @@ -51,8 +51,8 @@ getoff_n2d: jnextb0np off_n2d subl $ 3,off; jc offprev_n2d - shll $ 8,off; movzbl %dl,%edx - orl %edx,off; incl %esi + shll $ 8,off; incl %esi + orl %edx,off xorl $~0,off; jz eof sarl off // Carry= original low bit movl off,disp // XXX: 2GB diff --git a/src/stub/src/arch/i386/nrv2e_d32-easy.S b/src/stub/src/arch/i386/nrv2e_d32-easy.S index b99a1287..fbae90ef 100644 --- a/src/stub/src/arch/i386/nrv2e_d32-easy.S +++ b/src/stub/src/arch/i386/nrv2e_d32-easy.S @@ -38,7 +38,7 @@ lit_n2e: incl %esi; movb %dl,(%edi) incl %edi top_n2e: - movb (%esi),%dl # speculate: literal, or bottom 8 bits of offset + movzbl (%esi),%edx # speculate: literal, or bottom 8 bits of offset jnextb1yp lit_n2e push $1; pop off jmp getoff_n2e @@ -51,8 +51,8 @@ getoff_n2e: jnextb0np off_n2e subl $ 3,off; jc offprev_n2e - shll $ 8,off; movzbl %dl,%edx - orl %edx,off; incl %esi + shll $ 8,off; incl %esi + orl %edx,off xorl $~0,off; jz eof sarl off # Carry= original low bit movl off,disp # XXX: 2GB