Update contrib.
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "ARM EABI LICENCE.txt"
5 // which accompanies this distribution, and is available
6 // in kernel/eka/compsupp.
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
17 #include <e32std_private.h>
19 // support functions for ARM supplied softvfp compiler-helper functions
23 //void __rt_fp_status_register_cleanup(TAny * aReg)
28 // set up the fp status register
29 EXPORT_C void _fp_init(void)
31 TUint32 * aReg = (TUint32 *)User::AllocZ(sizeof(TUint32));
34 Dll::SetTls(aReg /*, __rt_fp_status_register_cleanup*/);
38 // This will force us to try again if we actually get an FP
40 Dll::SetTls(0 /*, __rt_fp_status_register_cleanup*/);
44 EXPORT_C TAny * __rt_fp_status_addr(void)
46 //return &__fp_status_register;
47 TAny* aTls = Dll::Tls();
50 // we obviously failed to set it up before. Try again, so we can
51 // at least try to error meaningfully
52 TUint32* aReg = (TUint32*)User::AllocZ(sizeof(TUint32));
53 _LIT(KFpGeneralPanic, "FP Emulator");
56 TInt r = Dll::SetTls(aReg /*, __rt_fp_status_register_cleanup*/);
59 // if we get here we really in trouble. Just Panic.
60 User::Panic(KFpGeneralPanic, KErrGeneral);
64 // If we get here, we're toast anyway....
65 User::Panic(KFpGeneralPanic, KErrNoMemory);