[llvm-commits] eh.return for Mips

Sasa Stankovic Sasa.Stankovic at rt-rk.com
Mon Dec 17 05:34:37 PST 2012


Hi,

Attached is the patch that implements EH_RETURN lowering for Mips. The
EH_RETURN is the result of lowering llvm.eh.return which in turn is
generated from __builtin_eh_return (offset, handler) .The effect of this
is to adjust the stack pointer by "offset" and then branch to "handler".

The generated code is similar to what gcc does. Offset is stored in
register $v1 which is in gcc defined with the macro
EH_RETURN_STACKADJ_RTX. gcc also  saves registers a0-a3 on stack in
function prologue and restores them in function epilogue (in gcc this is
done in function mips_compute_frame_info in file config/mips/mips.c). This
is also implemented in the patch.

Regards,
Sasa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eh-return.patch
Type: text/x-patch
Size: 22669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121217/dcc3b32b/attachment.bin>


More information about the llvm-commits mailing list