[PATCH] D132073: [CodeGen] Zero out only modified registers

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 1 16:05:12 PDT 2022


efriedma added a comment.

> The important bit is the movq %rdi, %rax right after the callq *pv_ops+536(%rip) instruction.

I read that clump of assembly as "if paravirtualization is on, call `*pv_ops+536(%rip)`; if it's off, replace the call with `movq %rdi, %rax`".  There isn't any expectation that RDI is preserved.

At least, that's my understanding of the intent.  It looks like the asm doesn't mark up its outputs/clobbers correctly, though; it needs to mark all the registers the calling convention says are caller-saved (rcx, rdx, rdi, rsi, r8, r9, r10, r11) as outputs or clobbers.  Not sure if that ends up mattering here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132073/new/

https://reviews.llvm.org/D132073



More information about the llvm-commits mailing list