This patch copies implementation from cpuid.h, which preserve base register %rbx around cpuid. It fixes PR50133.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Seems reasonable, thanks.
We really ought to solve the general problem one day. It is kind of pig-headed that the backend just picks two arbitrary CSRs, the base and frame pointers, and doesn't bother checking if any instructions clobber those registers.
clang-format: please reformat the code