Skip to content

Commit 6416463

Browse files
Integral-TechDaniel Kiper
authored andcommitted
lib/x86_64/setjmp: Use 32-bit zero idiom for shorter encoding
Switch from "xorq %rax, %rax" to "xorl %eax, %eax". In 64-bit mode zeroing EAX implicitly clears RAX and the 32-bit form encodes are one byte smaller while keeping identical semantics. Signed-off-by: George Hu <integral@archlinux.org> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1 parent d07ebd1 commit 6416463

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grub-core/lib/x86_64/setjmp.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ GRUB_MOD_LICENSE "GPLv3+"
3636
*/
3737
FUNCTION(grub_setjmp)
3838
pop %rsi /* Return address, and adjust the stack */
39-
xorq %rax, %rax
39+
xorl %eax, %eax
4040
movq %rbx, 0(%rdi) /* RBX */
4141
movq %rsp, 8(%rdi) /* RSP */
4242
push %rsi

0 commit comments

Comments
 (0)