[clang] [llvm] [X86] Support reserving EDI and ESI on x86-32 (PR #186123)

via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 13 20:00:27 PDT 2026


zhouguangyuan0718 wrote:

> I'm not really opposed in general, I guess? It's just a matter of whether it's actually practical for the specific registers in question.
> 
> ESI in particular has a problem this patch doesn't address: we use it as the base register, to refer to the stack in certain functions. See X86RegisterInfo::X86RegisterInfo .

Thanks for review, Now I removed reserving ESI support, only EDI are supported to reserve. And when reserving EDI, rep stos/movs are disabled. 
Also, I fixed the logic in `validateGlobalRegisterVariable` and added a testcase for it.

https://github.com/llvm/llvm-project/pull/186123


More information about the cfe-commits mailing list