sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "ARM EABI LICENCE.txt" sl@0: // which accompanies this distribution, and is available sl@0: // in kernel/eka/compsupp. sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // This file is part of drtrvct.dll and drtrvct_vfpv2.dll. sl@0: // sl@0: // sl@0: sl@0: #include sl@0: #include sl@0: sl@0: sl@0: extern "C" { sl@0: sl@0: EXPORT_C void _fp_init() sl@0: { sl@0: } sl@0: sl@0: EXPORT_C TAny * __rt_fp_status_addr() sl@0: { sl@0: TAny* aTls = Dll::Tls(); sl@0: sl@0: if (aTls) sl@0: return aTls; sl@0: sl@0: // If this is the first time we are called we need to set up some TLS for sl@0: // the FP status word. sl@0: sl@0: TUint32* aReg = (TUint32*)User::AllocZ(sizeof(TUint32)); sl@0: sl@0: _LIT(KFpGeneralPanic, "FP Emulator"); sl@0: sl@0: if (aReg) sl@0: { sl@0: TInt r = Dll::SetTls(aReg); sl@0: if (r==KErrNone) sl@0: return aReg; sl@0: sl@0: // if we get here we really in trouble. Just Panic. sl@0: User::Panic(KFpGeneralPanic, KErrGeneral); sl@0: } sl@0: else sl@0: { sl@0: // If we get here, we're toast anyway.... sl@0: User::Panic(KFpGeneralPanic, KErrNoMemory); sl@0: } sl@0: sl@0: return 0; sl@0: } sl@0: sl@0: } sl@0: