[PATCH] D50166: [ARM64] [Windows] MCLayer support for exception handling

Sanjin Sijaric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 1 17:33:50 PDT 2018


ssijaric created this revision.
ssijaric added reviewers: rnk, mstorsjo, TomTan, haripul.
Herald added a reviewer: javed.absar.
Herald added subscribers: chrib, kristof.beyls.

This patch adds the ARM64 unwind opcodes to the MCLayer, as well as SEH directives that will be emitted by the frame lowering in a patch that will follow.  This patch, in conjunction with the frame lowering patch, was tested on a couple of SPEC CPU2006 C++ benchmarks that make use of exception handling.  We only emit the unwinding opcodes into object files for now.

A couple of notes:

1. I am not sure how to create a test case with this patch only, and without the frame lowering patch that actually emits the SEH directives.  Perhaps I can create a MIR test case with the SEH opcodes, and use llvm-objdump to check the .xdata section?

2. We tacked the ARM64 Windows unwind code emits to MCStreamer.cpp, as it already had unwinding info for Windows on X86, parts of which we reused.  I think this should go into AArch64TargetStreamer, AArch64WinCOFFTargetStreamer and AArch64TargetAsmStreamer, so that we don't clutter MCStreamer further.


Repository:
  rL LLVM

https://reviews.llvm.org/D50166

Files:
  include/llvm/MC/MCStreamer.h
  include/llvm/MC/MCWin64EH.h
  include/llvm/MC/MCWinEH.h
  include/llvm/Support/Win64EH.h
  lib/MC/MCAsmStreamer.cpp
  lib/MC/MCStreamer.cpp
  lib/MC/MCWin64EH.cpp
  lib/Target/AArch64/AArch64AsmPrinter.cpp
  lib/Target/AArch64/AArch64InstrInfo.td
  lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50166.158669.patch
Type: text/x-patch
Size: 42516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180802/0d2520a4/attachment.bin>


More information about the llvm-commits mailing list