[PATCH] D53878: [AArch64] Mark condition flags as clobbered when calling __chkstk
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 30 13:36:16 PDT 2018
efriedma added a comment.
For both cases; the "blr x16" both uses and clobbers x16, so it needs two operands to represent that. `.addReg(AArch64::X16, RegState::Implicit | RegState::Define | RegState::Dead)` is correct (just like you used for NZCV).
"RegState::Define" means it's a definition, rather than a use. RegState::Implicit means that it's not one of the explicit inputs or outputs listed in the instruction description. RegState::Dead and RegState::Kill are optimization hints; a dead definition is never used, and a "kill" use is the last use of a definition.
> (Not that I know what really would assume these registers to have any sensible value here, as this is emitted in the prologue of a function.)
In theory, if unwind tables are disabled, some code after the prologue could get rescheduled into the prologue.
> I guess AArch64 COFF linkers in general could support range extension thunks, although I don't know if link.exe does - lld doesn't at least.
I would be surprised if link.exe doesn't support it, given it supports the equivalent for 32-bit ARM.
Repository:
rL LLVM
https://reviews.llvm.org/D53878
More information about the llvm-commits
mailing list