[PATCH] D110869: [X86] Implement -fzero-call-used-regs option
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 3 17:42:22 PST 2022
nickdesaulniers added a comment.
In D110869#3295559 <https://reviews.llvm.org/D110869#3295559>, @void wrote:
> Weird. We generate similar code to GCC:
>
> Clang:
> _paravirt_ident_64: # @_paravirt_ident_64
> movq %rdi, %rax
> xorq %rdi, %rdi
> retq
>
> GCC:
> _paravirt_ident_64:
> movq %rdi, %rax # tmp85, x
> xorl %edi, %edi #
> ret
Does `xorl` not zero the upper 32b?
Definitely something magical about this function. Perhaps it should have the function attribute to disable zeroing added to the kernel sources?
tools/objtool/objtool.c mentions something about `_paravirt_ident_64` and `paravirt_patch`.
I'm curious @nathanchance if you move the definition of `_paravirt_ident_64` to an external assembler file, and see whether the mere `xorl` vs `xorq` makes a difference for some reason for boot?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110869/new/
https://reviews.llvm.org/D110869
More information about the cfe-commits
mailing list