[PATCH] D41131: [AArch64] Implement stack probing for windows

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 13:22:36 PST 2017


mstorsjo created this revision.
mstorsjo added reviewers: t.p.northover, compnerd, eli.friedman.
Herald added subscribers: kristof.beyls, javed.absar, rengolin, aemerson.

This seems to work fine in practice.

However, for the testcase, if `-verify-machineinstrs` is added, it fails with this message:

  *** Bad machine code: Illegal physical register for instruction ***
  - function:    check_watermark
  - basic block: %bb.0 entry (0xb0cbf8)
  - instruction: %sp = SUBXrx
  - operand 2:   killed %x15
  %x15 is not a GPR32 register.

How to work around this?? The intended instruction is `sub sp, sp, x15, lsl #4`, and I don't see why the x15 operand would need to be a GPR32 register. Is this a bug in the instruction definition patterns (expecting the extend register operand be something like `w15, uxtw #4`)?


https://reviews.llvm.org/D41131

Files:
  lib/Target/AArch64/AArch64FrameLowering.cpp
  test/CodeGen/AArch64/chkstk.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41131.126615.patch
Type: text/x-patch
Size: 6309 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171212/9d5c7ca8/attachment.bin>


More information about the llvm-commits mailing list