Skip to content

x86 change mov 0, %reg to xor %reg, %reg

Kanna Scarlet lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1x86: Change mov $0, %reg with xor %reg, %regarch/x86/boot/compressed/head_64.S arch/x86/boot/compressed/mem_encrypt.S arch/x86/kernel/ftrace_32.S +3 more+7 -711 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] x86 change mov 0, %reg to xor %reg, %reg

Hello Linux x86 maintainers,

I'm an informatic student 19 y.o. I am still studying Linux kernel open source in GNU/Weeb community. I want to be a linux kerne dev in the future. This is my first time sending a patch to Linux Kernel, I am still learning the community. I may make a mistake in this email, please correct me if i am wrong

I want to improve x86-64 assembly code with this patch. This patch changes mov $0, %reg with xor %reg, %reg because xor %reg, %reg is smaller so it is good to save space

asm:

ba 00 00 00 00  mov   $0x0,%edx
31 d2           xor   %edx,%edx

Regards,

---

Kanna Scarlet (1):
x86: Change mov $0, %reg with xor %reg, %reg

 arch/x86/boot/compressed/head_64.S     | 2 +-
 arch/x86/boot/compressed/mem_encrypt.S | 2 +-
 arch/x86/kernel/ftrace_32.S            | 4 ++--
 arch/x86/kernel/head_64.S              | 2 +-
 arch/x86/math-emu/div_Xsig.S           | 2 +-
 arch/x86/math-emu/reg_u_sub.S          | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

base-commit: ff89dd08c0f0a3fd330c9ef9d775e880f82c291e

Signature · 1 line
Kanna Scarlet