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_exe.cia
21 static const TLinAddr User_HandleException = (TLinAddr)&User::HandleException;
22 static const TLinAddr User_Invariant = (TLinAddr)&User::Invariant;
25 void __fastcall RunThread(TBool aNotFirst, SThreadCreateInfo& aInfo);
27 // NOTE: This MUST be the first function in this module
28 __NAKED__ TInt _E32Startup()
30 // Process entry point
32 // ESP points to information block
33 BYTE(0xeb) // JMP .+16
45 BYTE(0x00) // need zero word at offset 12 from entry point
51 asm("jae not_thread_entry");
54 asm("jmp %a0": :"i"(&RunThread));
56 asm("not_thread_entry:");
58 asm("jne invalid_entry");
61 asm("mov eax, %0": : "i"(User_HandleException));
63 asm("pop eax"); // parameter
64 asm("pop eax"); // exc type
65 asm("pop eax"); // exc id
66 asm("pop eax"); // exc error code
67 asm("pop eax"); // fault address
72 asm("pop esi"); // ESP - ignore
76 asm("add esp, 4"); // SS - ignore
82 BYTE(0xcb) //asm("retf"); GCC doesn't recognise retf
84 asm("invalid_entry:");
85 asm("call %a0": : "i"(User_Invariant));