[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 12:57:34 PDT 2018


mstorsjo added a comment.

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

> Missing implicit-def of r16/r17?


For both cases, or just the first one? (The other one has got `.addReg(AArch64::X16, RegState::Kill)` already. Would that be `.addReg(AArch64::X16, RegState::Implicit | RegState::Define)` for both X16 and X17 there? I can't say I really understand what all these flags mean.

> On a sort-of-related note, I'm confused about the difference between small/large code model; doesn't the AArch64 linker support range-extension thunks?  (This is related because range-extension thunks can clobber r16/r17.)

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. The `__chkstk` function itself also clobbers both X16 and X17, so they definitely should be considered clobbered here. (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.)


Repository:
  rL LLVM

https://reviews.llvm.org/D53878





More information about the llvm-commits mailing list