Update contrib.
1 // Copyright (c) 2007-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\euser\epoc\x86\uc_trp.cia
22 #ifndef __LEAVE_EQUALS_THROW__
24 void __stdcall DoTrap(TTrap* aFrame);
26 EXPORT_C __NAKED__ TInt TTrap::Trap(TInt& /*aResult*/)
28 // Save the enter frame state and return 0.
32 asm("mov edx, [esp]");
33 asm("mov [ecx+0], edx");
34 asm("mov [ecx+4], ebx");
35 asm("mov [ecx+8], ebp");
36 asm("mov [ecx+12], esp");
37 asm("mov [ecx+16], esi");
38 asm("mov [ecx+20], edi");
39 asm("mov [ecx+24], ds");
40 asm("mov [ecx+28], es");
41 asm("mov [ecx+32], fs");
42 asm("mov [ecx+36], gs");
43 asm("mov edx, [esp+4]");
45 asm("mov [edx], eax");
46 asm("mov [ecx+%0], edx": : "i"_FOFF(TTrap,iResult));
48 asm("call %a0": : "i"(&DoTrap));
53 __NAKED__ void DoLeave(TTrap*)
55 asm("mov ecx, [esp+4]");
56 asm("mov edx, [ecx+0]");
57 asm("mov ebx, [ecx+4]");
58 asm("mov ebp, [ecx+8]");
59 asm("mov esp, [ecx+12]");
60 asm("mov esi, [ecx+16]");
61 asm("mov edi, [ecx+20]");
62 asm("mov ds, [ecx+24]");
63 asm("mov es, [ecx+28]");
64 asm("mov fs, [ecx+32]");
65 asm("mov gs, [ecx+36]");
66 asm("mov [esp], edx");
71 #endif // !__LEAVE_EQUALS_THROW__