[PATCH] D98789: [PEI] add dwarf information for stack probe

YangKeao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 18 10:39:19 PDT 2021


YangKeao added a comment.

> A care must be taken to not overwrite the arguments as well. For instance on SysV x86_64 ABI `rdi`, `rsi`, `rdx`, `rcx`, `r8`, `r9` are used to pass in integer arguments. For functions with a small number of arguments one of these could be reused, but if a function happens to use all of them, unconditional use of `rdx` would clobber the argument.

Nice catch! After eliminating `RCX`, `RDX` from the selections, it seems that the only possible "always correct" choice is `RAX` (being used as the return value doesn't bother).

> See `createVirtualRegister`.

Thanks. I have seen some usage of this function. It seems that there isn't any suitable `RegClass` for this situation (Dwarf Reg Class is not generated). Should I create one by myself?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98789



More information about the llvm-commits mailing list