[PATCH] D87367: [MC] [Win64EH] Canonicalize ARM64 unwind opcodes

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 23:01:14 PDT 2020


mstorsjo added inline comments.


================
Comment at: llvm/lib/MC/MCWin64EH.cpp:561
+               Inst.Register == 19) {
+      Inst.Operation = Win64EH::UOP_SaveR19R20X;
+    } else if (Inst.Operation == Win64EH::UOP_AddFP && Inst.Offset == 0) {
----------------
efriedma wrote:
> I think at least save_r19r20_x has a different range from the corresponding long opcode.
Oh, good catch! Will fix. That will probably complicate one of the later patches though...


================
Comment at: llvm/lib/MC/MCWin64EH.cpp:570
+      // as current versions of Windows (up to at least 20.04) is buggy
+      // regarding SaveNext for float pairs.
+    }
----------------
efriedma wrote:
> Can we file a spec bug with Microsoft?
I discussed it with @TomTan and he said they've noticed it themselves, and they're planning to ship a fix later (late this year in insider previews, and they've noticed that neither MSVC nor Clang actually have produced this opcode so far), and they've also got some documentation update regarding these opcodes coming up. (The docs also say that another save_next after the last integer register will start restoring float registers, but it doesn't work that way in practice.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87367/new/

https://reviews.llvm.org/D87367



More information about the llvm-commits mailing list