[llvm-dev] Exception handling support for a target

陳韋任 via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 15 04:49:17 PST 2018


Hi All,

  I would like to know in order to support exception handling for
particular target, what need to be done. After doing some investigation, I
can think of the following items with questions:

  - CFI directives:

    This is for .eh_frame section. Basically all the targets insert CFI
directives in FrameLowering, but I am not sure exactly when/where I should
do so.

  - getExceptionPointerRegister and getExceptionSelectorRegister:

    TargetLowering subclass should implement both functions. The former
specifies the register used to pass the exception object to the landing pad
(or catch clause), and the latter specifies the register used to pass the
typeid object to the landing pad. Where can I know what registers should be
used? Or it's just the same as those specified in calling convention?

  - EH_RETURN:

    I see some targets define their own EH_RETURN SDNode, others don't.
What is EH_RETURN, and under what circumstances I should define my own
EH_RETURN SDNode?

  Is the above list complete? Do I understand their purpose correctly (sort
of)?

  Thanks.

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Homepage: https://people.cs.nctu.edu.tw/~chenwj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180115/09b69a35/attachment.html>


More information about the llvm-dev mailing list