lib/x86_64/setjmp: Use 32-bit zero idiom for shorter encoding
PATCH RESEND 1/1 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 one byte smaller while keeping identical semantics.
Signed-off-by George Hu <[email protected]>
--- grub-core/lib/x86_64/setjmp.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/lib/x86_64/setjmp.S +1 -1
@@ -36,7 +36,7 @@ GRUB_MOD_LICENSE "GPLv3+" */ FUNCTION(grub_setjmp) pop %rsi /* Return address, and adjust the stack */ - xorq %rax, %rax + xorl %eax, %eax movq %rbx, 0(%rdi) /* RBX */ movq %rsp, 8(%rdi) /* RSP */ push %rsi
Signature · 7 lines
2.52.0 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 5 lines · George Hu
Switch from
xorq %rax, %raxtoxorl %eax, %eax. In 64-bit mode, zeroing EAX implicitly clears RAX, and the 32-bit form encodes one byte smaller while keeping identical semantics.Signed-off-by George Hu <[email protected]>
Reviewed-by Daniel Kiper <[email protected]>
Daniel
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel