[llvm-commits] [compiler-rt] r85531 - in /compiler-rt/trunk: lib/arm/save_restore_d8_d15.S make/AppleBI.mk

Edward O'Callaghan eocallaghan at auroraux.org
Sat Oct 31 08:26:50 PDT 2009


Hi Nick,

Could you also make the relevant changes to not only the old Apple
Makefiles but also the portable CMake system please.

Thanks,
Edward.

2009/10/29 Nick Kledzik <kledzik at apple.com>:
> Author: kledzik
> Date: Thu Oct 29 17:31:39 2009
> New Revision: 85531
>
> URL: http://llvm.org/viewvc/llvm-project?rev=85531&view=rev
> Log:
> add __save_vfp_d8_d15_regs and __restore_vfp_d8_d15_regs for ARM
>
> Added:
>    compiler-rt/trunk/lib/arm/save_restore_d8_d15.S
> Modified:
>    compiler-rt/trunk/make/AppleBI.mk
>
> Added: compiler-rt/trunk/lib/arm/save_restore_d8_d15.S
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/arm/save_restore_d8_d15.S?rev=85531&view=auto
>
> ==============================================================================
> --- compiler-rt/trunk/lib/arm/save_restore_d8_d15.S (added)
> +++ compiler-rt/trunk/lib/arm/save_restore_d8_d15.S Thu Oct 29 17:31:39 2009
> @@ -0,0 +1,45 @@
> +//===-- save_restore_regs.S - Implement save/restore* ---------------------===//
> +//
> +//                     The LLVM Compiler Infrastructure
> +//
> +// This file is distributed under the University of Illinois Open Source
> +// License. See LICENSE.TXT for details.
> +//
> +//===----------------------------------------------------------------------===//
> +
> +#include "../assembly.h"
> +
> +//
> +// When compiling C++ functions that need to handle thrown exceptions the
> +// compiler is required to save all registers and call __Unwind_SjLj_Register
> +// in the function prolog.  But when compiling for thumb1, there are
> +// no instructions to access the floating point registers, so the
> +// compiler needs to add a call to the helper function _save_vfp_d8_d15_regs
> +// written in ARM to save the float registers.  In the epilog, the compiler
> +// must also add a call to __restore_vfp_d8_d15_regs to restore those registers.
> +//
> +
> +       .text
> +       .syntax unified
> +
> +//
> +// Save registers d8-d15 onto stack
> +//
> +DEFINE_COMPILERRT_PRIVATE_FUNCTION(__save_vfp_d8_d15_regs)
> +       vstmdb  sp!, {d8-d15}           // push registers d8-d15 onto stack
> +       bx      lr                      // return to prolog
> +
> +
> +
> +//
> +// Restore registers d8-d15 from stack
> +//
> +DEFINE_COMPILERRT_PRIVATE_FUNCTION(__restore_vfp_d8_d15_regs)
> +       vldmia  sp!, {d8-d15}           // pop registers d8-d15 off stack
> +       bx      lr                      // return to prolog
> +
> +
> +
> +       // tell linker it can break up file at label boundaries
> +       .subsections_via_symbols
> +
>
> Modified: compiler-rt/trunk/make/AppleBI.mk
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/AppleBI.mk?rev=85531&r1=85530&r2=85531&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/make/AppleBI.mk (original)
> +++ compiler-rt/trunk/make/AppleBI.mk Thu Oct 29 17:31:39 2009
> @@ -58,7 +58,7 @@
>                                muldf3vfp.o mulsf3vfp.o \
>                                nedf2vfp.o negdf2vfp.o negsf2vfp.o nesf2vfp.o \
>                                subdf3vfp.o subsf3vfp.o truncdfsf2vfp.o unorddf2vfp.o unordsf2vfp.o \
> -                               modsi3.o umodsi3.o udivsi3.o divsi3.o switch.o
> +                               modsi3.o umodsi3.o udivsi3.o divsi3.o switch.o save_restore_d8_d15.o
>
>
>  # copies any public headers to DSTROOT
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
-- 
Edward O'Callaghan
http://www.auroraux.org/
eocallaghan at auroraux dot org




More information about the llvm-commits mailing list