equal
deleted
inserted
replaced
|
1 // Copyright (c) 2008-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. |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This file is part of drtrvct.dll and drtrvct_vfpv2.dll. |
|
15 // |
|
16 // |
|
17 |
|
18 #include <e32std.h> |
|
19 #include <e32std_private.h> |
|
20 |
|
21 |
|
22 extern "C" { |
|
23 |
|
24 EXPORT_C void _fp_init() |
|
25 { |
|
26 } |
|
27 |
|
28 EXPORT_C TAny * __rt_fp_status_addr() |
|
29 { |
|
30 TAny* aTls = Dll::Tls(); |
|
31 |
|
32 if (aTls) |
|
33 return aTls; |
|
34 |
|
35 // If this is the first time we are called we need to set up some TLS for |
|
36 // the FP status word. |
|
37 |
|
38 TUint32* aReg = (TUint32*)User::AllocZ(sizeof(TUint32)); |
|
39 |
|
40 _LIT(KFpGeneralPanic, "FP Emulator"); |
|
41 |
|
42 if (aReg) |
|
43 { |
|
44 TInt r = Dll::SetTls(aReg); |
|
45 if (r==KErrNone) |
|
46 return aReg; |
|
47 |
|
48 // if we get here we really in trouble. Just Panic. |
|
49 User::Panic(KFpGeneralPanic, KErrGeneral); |
|
50 } |
|
51 else |
|
52 { |
|
53 // If we get here, we're toast anyway.... |
|
54 User::Panic(KFpGeneralPanic, KErrNoMemory); |
|
55 } |
|
56 |
|
57 return 0; |
|
58 } |
|
59 |
|
60 } |
|
61 |