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

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 04:42:07 PDT 2020


mstorsjo created this revision.
mstorsjo added reviewers: efriedma, ssijaric, TomTan, rnk.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
Herald added a project: LLVM.
mstorsjo requested review of this revision.

Convert 2-byte opcodes to equivalent 1-byte ones.

Adjust the existing exhaustive testcase to avoid being altered by the simplification rules (to keep that test exercising all individual opcodes).

Fix the assembler parser limits for register pairs; for .seh_save_regp and .seh_save_regp_x, we can allow up to x29, for a x29+x30 pair (which gets remapped to the UOP_SaveFPLR(X) opcodes), for .seh_save_fregp and .seh_save_fregpx, allow up to d14+d15.

Not creating .seh_save_next for float register pairs, as the actual unwinder implementation in current versions of Windows is buggy for that case.

This gives a minimal but measurable size reduction. (For a 6.5 MB DLL with 300 KB .xdata, the .xdata shrinks by 48 bytes.) Additionally it helps for further processing of the opcodes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87367

Files:
  llvm/lib/MC/MCWin64EH.cpp
  llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  llvm/test/MC/AArch64/seh-optimize.s
  llvm/test/MC/AArch64/seh.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87367.290704.patch
Type: text/x-patch
Size: 10581 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200909/53a7f118/attachment.bin>


More information about the llvm-commits mailing list