[PATCH] D53878: [AArch64] Mark condition flags as clobbered when calling __chkstk

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 30 13:47:11 PDT 2018


mstorsjo added a comment.

In https://reviews.llvm.org/D53878#1281069, @efriedma wrote:

> 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.


Ok, thanks!

>> (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.

Oh, ok.


Repository:
  rL LLVM

https://reviews.llvm.org/D53878





More information about the llvm-commits mailing list