|
1 // Copyright (c) 1995-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 "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Mike Kinghan, mikek@symbian.org, for Symbian Foundation |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // kernelhwsrv/kernel/eka/common/arm/gccehlp.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 #include "../common.h" |
|
19 #include <nkern.h> |
|
20 |
|
21 extern "C" { |
|
22 EXPORT_C int __aeabi_idiv0 (int return_value) |
|
23 { |
|
24 FAULT(); |
|
25 return return_value; |
|
26 } |
|
27 |
|
28 EXPORT_C long long __aeabi_ldiv0 (long long return_value) |
|
29 { |
|
30 FAULT(); |
|
31 return return_value; |
|
32 } |
|
33 |
|
34 EXPORT_C __NAKED__ void __rt_exporter_dummy(void) |
|
35 { |
|
36 asm(".comm _ZTVN10__cxxabiv117__class_type_infoE,4"); |
|
37 asm(".comm _ZTVN10__cxxabiv120__si_class_type_infoE,4"); |
|
38 asm(".comm _ZTVN10__cxxabiv121__vmi_class_type_infoE,4"); |
|
39 asm(".comm _ZTVN10__cxxabiv121__vmi_class_type_infoE,4"); |
|
40 asm(".comm __aeabi_lasr,4"); |
|
41 asm(".comm __aeabi_lcmp,4"); |
|
42 asm(".comm __aeabi_llsl,4"); |
|
43 asm(".comm __aeabi_llsr,4"); |
|
44 asm(".comm __aeabi_lmul,4"); |
|
45 asm(".comm __aeabi_ulcmp,4"); |
|
46 asm(".comm __aeabi_uread4,4"); |
|
47 asm(".comm __aeabi_uread8,4"); |
|
48 asm(".comm __aeabi_uwrite4,4"); |
|
49 asm(".comm __aeabi_uwrite8,4"); |
|
50 asm(".comm __cxa_guard_abort,4"); |
|
51 asm(".comm __cxa_guard_acquire,4"); |
|
52 asm(".comm __cxa_guard_release,4"); |
|
53 } |
|
54 |
|
55 EXPORT_C int __cxa_pure_virtual() |
|
56 // |
|
57 // Gets called for any unreplaced pure virtual methods. |
|
58 // |
|
59 { |
|
60 #ifdef __STANDALONE_NANOKERNEL__ |
|
61 __NK_ASSERT_ALWAYS(0); |
|
62 #else |
|
63 Panic(EPureVirtualCalled); |
|
64 #endif |
|
65 return 0; |
|
66 } |
|
67 |
|
68 #ifdef __KERNEL_MODE__ |
|
69 |
|
70 void __cxa_end_catch(){} |
|
71 |
|
72 void __cxa_begin_catch(){} |
|
73 |
|
74 void __cxa_rethrow(){} |
|
75 // std::terminate |
|
76 |
|
77 void __cxa_call_unexpected() {} |
|
78 |
|
79 void __aeabi_unwind_cpp_pr0() {} |
|
80 |
|
81 void __cxa_end_cleanup() {} |
|
82 |
|
83 #endif |
|
84 } |
|
85 |
|
86 #include "../common.h" |
|
87 #include <kernel/kernel.h> |
|
88 |
|
89 EXPORT_C TAny* operator new[](TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW |
|
90 { |
|
91 (void) aNoThrow; |
|
92 return Kern::Alloc(aSize); |
|
93 } |
|
94 |
|
95 EXPORT_C TAny* operator new(TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW |
|
96 // |
|
97 // The global new operator. |
|
98 // |
|
99 { |
|
100 (void) aNoThrow; |
|
101 return Kern::Alloc(aSize); |
|
102 } |
|
103 |
|
104 |