[llvm-commits] First draft of ARM EHABI support

Anton Korobeynikov anton at korobeynikov.info
Mon Jan 24 15:51:42 PST 2011


Hello Everyone

Please find attached the first series of patches which start
implementation of ARM EHABI support.

All stuff can be split into 2 parts:

1. Emission of exception section directives (.fnstart / .fnend /
.personality / .handlerdata and friends)
2. Emission of frame unwinding directives

Doing 1. is pretty much straightforward and can be done easily within
the current exception lowering infrastructure.
2. is more complicated. The main problem is that current MachineMoves
stuff seems not to be flexible enough: we don't care about offsets of
the registers, but rather about the order how they pushed on stack,
how we model stack frame allocation, etc. (Also, since we have post-RA
scheduler that we will need to somehow update the MachineMoves set
because the relative order of the instructions might be changed by a
scheduler, etc.)

All this is mostly due to fact that most of callee-save spills /
reloads are done via load/store-multiple instructions, so frame
unwinding directives follow instruction set in some way. My idea to
handle this was to make prologue expansion code to mark the
"interesting" instruction with the special flag and during MC lowering
phase recognize the instructions and emit the necessary directives
(yes we will need to make sure that no codegen pass running after
prologue expansion would clobber these flags, but this is a separate
task).

Attached is the very first approximation showing how the stuff will be
implemented, there are some limitations, e.g. thumb is not supported,
stuff is not tested in all situations (e.g. with the presence of stack
realignment, etc.)

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Shorten-AsmPrinterFlags-filed-to-accomodate-for-futu.patch
Type: application/octet-stream
Size: 1618 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110125/f17e8dfc/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-FrameSetup-MI-flags.patch
Type: application/octet-stream
Size: 7227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110125/f17e8dfc/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Some-first-rudimentary-support-for-ARM-EHABI-print-e.patch
Type: application/octet-stream
Size: 14167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110125/f17e8dfc/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Provide-hooks-to-set-MI-flags-in-MachineInstrBuilder.patch
Type: application/octet-stream
Size: 1089 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110125/f17e8dfc/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Preliminary-support-for-ARM-frame-save-directives-em.patch
Type: application/octet-stream
Size: 30770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110125/f17e8dfc/attachment-0004.obj>


More information about the llvm-commits mailing list