kerneltest/e32test/system/t_xprot.cpp
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 1998-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 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32test\system\t_xprot.cpp
       
    15 // 
       
    16 //
       
    17 
       
    18 #include <e32test.h>
       
    19 #include "execinfo.h"
       
    20 #include <u32arm.h>
       
    21 
       
    22 const TInt KSupervisorAddress=0x80000000;
       
    23 const TInt KGarbageAddress=0xeeddbbcc;
       
    24 
       
    25 TInt Handles[MAX_HANDLE];
       
    26 TInt DataArea[1024];
       
    27 TBuf8<1024> Buf8;
       
    28 TBuf<1024> Buf;
       
    29 TPtrC8 PtrC8(Buf8.Ptr(),10);
       
    30 TPtrC8 PtrC(Buf.Ptr(),10);
       
    31 TPtrC8 Ptr8(Buf8.Ptr(),10,1024);
       
    32 TPtrC8 Ptr(Buf.Ptr(),10,1024);
       
    33 TPtrC8 Ptr8N(NULL,10,1024);
       
    34 TPtrC8 PtrN(NULL,10,1024);
       
    35 TPtrC8 Ptr8I((TUint8*)KGarbageAddress,10,1024);
       
    36 TPtrC8 PtrI((TText*)KGarbageAddress,10,1024);
       
    37 TPtrC8 Ptr8S((TUint8*)KSupervisorAddress,10,1024);
       
    38 TPtrC8 PtrS((TText*)KSupervisorAddress,10,1024);
       
    39 TInt MessageHandle;
       
    40 
       
    41 TInt Args[4];
       
    42 
       
    43 TInt GetHandle(TInt& aState, TInt aHandleType)
       
    44 	{
       
    45 	TInt r;
       
    46 	TInt t=aHandleType?aHandleType-1:ELibrary;
       
    47 	switch(aState)
       
    48 		{
       
    49 		case 0: r=0; break;
       
    50 		case 1: r=0xdeaddead; break;
       
    51 		case 2: r=Handles[EThread]; break;
       
    52 		case 3: r=Handles[t]; break;
       
    53 		case 4: aState=0; return 0;
       
    54 		}
       
    55 	++aState;
       
    56 	return r;
       
    57 	}
       
    58 
       
    59 TInt GetAnyInt(TInt& aState)
       
    60 	{
       
    61 	TInt r;
       
    62 	switch(aState)
       
    63 		{
       
    64 		case 0: r=0; break;
       
    65 		case 1: r=1; break;
       
    66 		case 2: r=2; break;
       
    67 		case 3: r=-1; break;
       
    68 		case 4: r=299792458; break;
       
    69 		case 5: aState=0; return 0;
       
    70 		}
       
    71 	++aState;
       
    72 	return r;
       
    73 	}
       
    74 
       
    75 TInt GetAnyPtr(TInt& aState)
       
    76 	{
       
    77 	TInt r;
       
    78 	switch(aState)
       
    79 		{
       
    80 		case 0: r=0; break;
       
    81 		case 1: r=KGarbageAddress; break;
       
    82 		case 2: r=KSupervisorAddress; break;
       
    83 		case 3: r=(TInt)DataArea; break;
       
    84 		case 4: aState=0; return 0;
       
    85 		}
       
    86 	++aState;
       
    87 	return r;
       
    88 	}
       
    89 
       
    90 TInt GetIntPtr(TInt& aState)
       
    91 	{
       
    92 	TInt r;
       
    93 	switch(aState)
       
    94 		{
       
    95 		case 0: r=0; break;
       
    96 		case 1: r=KGarbageAddress; break;
       
    97 		case 2: r=((TInt)DataArea)+1; break;
       
    98 		case 3: r=KSupervisorAddress; break;
       
    99 		case 4: r=(TInt)DataArea; break;
       
   100 		case 5: aState=0; return 0;
       
   101 		}
       
   102 	++aState;
       
   103 	return r;
       
   104 	}
       
   105 
       
   106 TInt GetDes8(TInt& aState)
       
   107 	{
       
   108 	TInt r;
       
   109 	switch(aState)
       
   110 		{
       
   111 		case 0: r=0; break;
       
   112 		case 1: r=KGarbageAddress; break;
       
   113 		case 2: r=KSupervisorAddress; break;
       
   114 		case 3: r=(TInt)&Ptr8N; break;
       
   115 		case 4: r=(TInt)&Ptr8I; break;
       
   116 		case 5: r=(TInt)&Ptr8S; break;
       
   117 		case 6: r=(TInt)&Ptr8; break;
       
   118 		case 7: aState=0; return 0;
       
   119 		}
       
   120 	++aState;
       
   121 	return r;
       
   122 	}
       
   123 
       
   124 TInt GetWDes8(TInt& aState)
       
   125 	{
       
   126 	TInt r;
       
   127 	switch(aState)
       
   128 		{
       
   129 		case 0: r=0; break;
       
   130 		case 1: r=KGarbageAddress; break;
       
   131 		case 2: r=KSupervisorAddress; break;
       
   132 		case 3: r=(TInt)&Ptr8N; break;
       
   133 		case 4: r=(TInt)&Ptr8I; break;
       
   134 		case 5: r=(TInt)&Ptr8S; break;
       
   135 		case 6: r=(TInt)&PtrC8; break;
       
   136 		case 7: r=(TInt)&Ptr8; break;
       
   137 		case 8: aState=0; return 0;
       
   138 		}
       
   139 	++aState;
       
   140 	return r;
       
   141 	}
       
   142 
       
   143 TInt GetDes(TInt& aState)
       
   144 	{
       
   145 	TInt r;
       
   146 	switch(aState)
       
   147 		{
       
   148 		case 0: r=0; break;
       
   149 		case 1: r=KGarbageAddress; break;
       
   150 		case 2: r=KSupervisorAddress; break;
       
   151 		case 3: r=(TInt)&PtrN; break;
       
   152 		case 4: r=(TInt)&PtrI; break;
       
   153 		case 5: r=(TInt)&PtrS; break;
       
   154 		case 6: r=(TInt)&Ptr; break;
       
   155 		case 7: aState=0; return 0;
       
   156 		}
       
   157 	++aState;
       
   158 	return r;
       
   159 	}
       
   160 
       
   161 TInt GetWDes(TInt& aState)
       
   162 	{
       
   163 	TInt r;
       
   164 	switch(aState)
       
   165 		{
       
   166 		case 0: r=0; break;
       
   167 		case 1: r=KGarbageAddress; break;
       
   168 		case 2: r=KSupervisorAddress; break;
       
   169 		case 3: r=(TInt)&PtrN; break;
       
   170 		case 4: r=(TInt)&PtrI; break;
       
   171 		case 5: r=(TInt)&PtrS; break;
       
   172 		case 6: r=(TInt)&PtrC; break;
       
   173 		case 7: r=(TInt)&Ptr; break;
       
   174 		case 8: aState=0; return 0;
       
   175 		}
       
   176 	++aState;
       
   177 	return r;
       
   178 	}
       
   179 
       
   180 TInt GetBool(TInt& aState)
       
   181 	{
       
   182 	TInt r;
       
   183 	switch(aState)
       
   184 		{
       
   185 		case 0: r=0; break;
       
   186 		case 1: r=1; break;
       
   187 		case 2: r=299792458; break;
       
   188 		case 3: aState=0; return 0;
       
   189 		}
       
   190 	++aState;
       
   191 	return r;
       
   192 	}
       
   193 
       
   194 TInt GetObjectType(TInt& aState)
       
   195 	{
       
   196 	TInt r;
       
   197 	switch(aState)
       
   198 		{
       
   199 		case 0: r=EThread; break;
       
   200 		case 1: r=ELibrary; break;
       
   201 		case 2: r=ENumObjectType; break;
       
   202 		case 3: r=20000; break;
       
   203 		case 4: aState=0; return 0;
       
   204 		}
       
   205 	++aState;
       
   206 	return r;
       
   207 	}
       
   208 
       
   209 TInt GetDevUnit(TInt& aState)
       
   210 	{
       
   211 	TInt r;
       
   212 	switch(aState)
       
   213 		{
       
   214 		case 0: r=0; break;
       
   215 		case 1: r=1; break;
       
   216 		case 2: r=20000; break;
       
   217 		case 3: aState=0; return 0;
       
   218 		}
       
   219 	++aState;
       
   220 	return r;
       
   221 	}
       
   222 
       
   223 TInt GetMsgHandle(TInt& aState)
       
   224 	{
       
   225 	TInt r;
       
   226 	switch(aState)
       
   227 		{
       
   228 		case 0: r=0; break;
       
   229 		case 1: r=KGarbageAddress; break;
       
   230 		case 2: r=(TInt)DataArea; break;
       
   231 		case 3: r=KSupervisorAddress; break;
       
   232 		case 4: r=MessageHandle; break;
       
   233 		case 5: aState=0; return 0;
       
   234 		}
       
   235 	++aState;
       
   236 	return r;
       
   237 	}
       
   238 
       
   239 TInt GetModuleHandle(TInt& aState)
       
   240 	{
       
   241 	TInt r;
       
   242 	switch(aState)
       
   243 		{
       
   244 		case 0: r=0; break;
       
   245 		case 1: r=KGarbageAddress; break;
       
   246 		case 2: r=ModuleHandle; break;
       
   247 		case 3: aState=0; return 0;
       
   248 		}
       
   249 	++aState;
       
   250 	return r;
       
   251 	}
       
   252 
       
   253 TInt GetSessionHandlePtr(TInt& aState)
       
   254 	{
       
   255 	TInt r;
       
   256 	switch(aState)
       
   257 		{
       
   258 		case 0: r=0; break;
       
   259 		case 1: r=KGarbageAddress; break;
       
   260 		case 2: r=KSupervisorAddress; break;
       
   261 		case 3: r=(TInt)&Handles[ESession]; break;
       
   262 		case 4: aState=0; return 0;
       
   263 		}
       
   264 	++aState;
       
   265 	return r;
       
   266 	}
       
   267 
       
   268 TInt GetArgument(TInt& aState, TInt aArgType)
       
   269 	{
       
   270 	if (aArgType==NO_PAR)
       
   271 		return 0;
       
   272 	if (aArgType<MAX_HANDLE)
       
   273 		return GetHandle(aState,aArgType);
       
   274 	switch (aArgType)
       
   275 		{
       
   276 		case ANY_INT: return GetAnyInt(aState);
       
   277 		case ANY_PTR: return GetAnyPtr(aState);
       
   278 		case INT_PTR: return GetIntPtr(aState);
       
   279 		case DES8: return GetDes8(aState);
       
   280 		case WDES8: return GetWDes8(aState);
       
   281 		case DES: return GetDes(aState);
       
   282 		case WDES: return GetWDes(aState);
       
   283 		case BOOL: return GetBool(aState);
       
   284 		case OBJECT_TYPE: return GetObjectType(aState);
       
   285 		case DEV_UNIT: return GetDevUnit(aState);
       
   286 		case MSG_HANDLE: return GetMsgHandle(aState);
       
   287 		case MODULE_HANDLE: return GetModuleHandle(aState);
       
   288 		case SESSION_HANDLE_PTR: return GetSessionHandlePtr(aState);
       
   289 		}
       
   290 	User::Panic(_L("UNKNOWN ARG TYPE"),aArgType);
       
   291 	}
       
   292 
       
   293 #define FAST_EXEC(n)	asm("swi %a0" : : "i" (n|EXECUTIVE_FAST))
       
   294 __NAKED__ void DoFastExecCall(TInt /*aExecNum*/)
       
   295 	{
       
   296 	asm("ldr r1, __Args ");
       
   297 	asm("mov ip, lr ");
       
   298 	asm("ldmfd r1, {r0-r3} ");
       
   299 	asm("add pc, pc, r0, lsl #2 ");
       
   300 	asm("nop )";
       
   301 
       
   302 	FAST_EXEC(EFastExecWaitForAnyRequest);
       
   303 	FAST_EXEC(EFastExecLanguage);
       
   304 	FAST_EXEC(EFastExecHeap);
       
   305 	FAST_EXEC(EFastExecHeapSwitch);
       
   306 	FAST_EXEC(EFastExecPushTrapFrame);
       
   307 	FAST_EXEC(EFastExecPopTrapFrame);
       
   308 	FAST_EXEC(EFastExecActiveScheduler);
       
   309 	FAST_EXEC(EFastExecSetActiveScheduler);
       
   310 	FAST_EXEC(EFastExecLockPeriod);
       
   311 	FAST_EXEC(EFastExecTrapHandler);
       
   312 	FAST_EXEC(EFastExecSetTrapHandler);
       
   313 	FAST_EXEC(EFastExecLockedInc);
       
   314 	FAST_EXEC(EFastExecLockedDec);
       
   315 	FAST_EXEC(EFastExecDebugMask);
       
   316 	FAST_EXEC(EFastExecSetDebugMask);
       
   317 	FAST_EXEC(EFastExecFastCounter);
       
   318 	FAST_EXEC(EFastExecGetLocaleCharSet);
       
   319 	FAST_EXEC(EFastExecLockRamDrive);
       
   320 	FAST_EXEC(EFastExecUnlockRamDrive);
       
   321 	FAST_EXEC(EFastExecRomHeaderAddress);
       
   322 	FAST_EXEC(EFastExecRomRootDirAddress);
       
   323 	FAST_EXEC(EFastExecJustInTime);
       
   324 	FAST_EXEC(EFastExecSetJustInTime);
       
   325 	FAST_EXEC(EFastExecBlockThreads);
       
   326 	FAST_EXEC(EFastExecKernelStartup);
       
   327 	FAST_EXEC(EFastExecFatUtilityFunctions);
       
   328 	FAST_EXEC(EFastExecSafeInc);
       
   329 	FAST_EXEC(EFastExecSafeDec);
       
   330 
       
   331 	asm("__Args: ");
       
   332 	asm(".word Args ");
       
   333 	}
       
   334 
       
   335 #define SLOW_EXEC(n)	asm("swi %a0" : : "i" (n))
       
   336 __NAKED__ void DoSlowExecCall(TInt /*aExecNum*/)
       
   337 	{
       
   338 	asm("ldr r1, __Args ");
       
   339 	asm("mov ip, lr ");
       
   340 	asm("ldmfd r1, {r0-r3} ");
       
   341 	asm("add pc, pc, r0, lsl #2 ");
       
   342 	asm("nop )";
       
   343 
       
   344 	SLOW_EXEC(EExecObjectNext);
       
   345 	SLOW_EXEC(EExecChunkBase);
       
   346 	SLOW_EXEC(EExecChunkSize);
       
   347 	SLOW_EXEC(EExecChunkMaxSize);
       
   348 	SLOW_EXEC(EExecHandleAttributes);
       
   349 	SLOW_EXEC(EExecTickCount);
       
   350 	SLOW_EXEC(EExecLogicalDeviceGetCaps);
       
   351 	SLOW_EXEC(EExecLogicalDeviceQueryVersionSupported);
       
   352 	SLOW_EXEC(EExecLogicalDeviceIsAvailable);
       
   353 	SLOW_EXEC(EExecDllGlobalAlloc);
       
   354 	SLOW_EXEC(EExecChangeLocale);
       
   355 	SLOW_EXEC(EExecChannelRequest);
       
   356 	SLOW_EXEC(EExecMathRandom);
       
   357 	SLOW_EXEC(EExecChannelControl);
       
   358 	SLOW_EXEC(EExecResetMachine);
       
   359 	SLOW_EXEC(EExecLibraryLookup);
       
   360 	SLOW_EXEC(EExecLibraryEntryPoint);
       
   361 	SLOW_EXEC(EExecLibraryDllRefTable);
       
   362 	SLOW_EXEC(EExecStaticCallList);
       
   363 	SLOW_EXEC(EExecDynamicCallList);
       
   364 	SLOW_EXEC(EExecLibraryCallList);
       
   365 	SLOW_EXEC(EExecLibraryFileName);
       
   366 	SLOW_EXEC(EExecExecuteInSupervisorMode);
       
   367 	SLOW_EXEC(EExecMutexCount);
       
   368 	SLOW_EXEC(EExecMutexWait);
       
   369 	SLOW_EXEC(EExecMutexSignal);
       
   370 	SLOW_EXEC(EExecProcessId);
       
   371 	SLOW_EXEC(EExecDllFileName);
       
   372 	SLOW_EXEC(EExecProcessResume);
       
   373 	SLOW_EXEC(EExecProcessFileName);
       
   374 	SLOW_EXEC(EExecProcessCommandLine);
       
   375 	SLOW_EXEC(EExecProcessExitType);
       
   376 	SLOW_EXEC(EExecProcessExitReason);
       
   377 	SLOW_EXEC(EExecProcessExitCategory);
       
   378 	SLOW_EXEC(EExecProcessPriority);
       
   379 	SLOW_EXEC(EExecProcessSetPriority);
       
   380 	SLOW_EXEC(EExecProcessFlags);
       
   381 	SLOW_EXEC(EExecProcessSetFlags);
       
   382 	SLOW_EXEC(EExecProcessSetOwner);
       
   383 	SLOW_EXEC(EExecDllInitialiseData);
       
   384 	SLOW_EXEC(EExecSemaphoreCount);
       
   385 	SLOW_EXEC(EExecSemaphoreWait);
       
   386 	SLOW_EXEC(EExecSemaphoreSignal1);
       
   387 	SLOW_EXEC(EExecSemaphoreSignalN);
       
   388 	SLOW_EXEC(EExecDllFreeData);
       
   389 	SLOW_EXEC(EExecServerReceive);
       
   390 	SLOW_EXEC(EExecServerCancel);
       
   391 	SLOW_EXEC(EExecSetSessionPtr);
       
   392 	SLOW_EXEC(EExecSessionSend);
       
   393 	SLOW_EXEC(EExecThreadId);
       
   394 	SLOW_EXEC(EExecSessionShare);
       
   395 	SLOW_EXEC(EExecThreadResume);
       
   396 	SLOW_EXEC(EExecThreadSuspend);
       
   397 	SLOW_EXEC(EExecThreadPriority);
       
   398 	SLOW_EXEC(EExecThreadSetPriority);
       
   399 	SLOW_EXEC(EExecThreadProcessPriority);
       
   400 	SLOW_EXEC(EExecThreadSetProcessPriority);
       
   401 	SLOW_EXEC(EExecThreadFlags);
       
   402 	SLOW_EXEC(EExecThreadSetFlags);
       
   403 	SLOW_EXEC(EExecThreadRequestCount);
       
   404 	SLOW_EXEC(EExecThreadExitType);
       
   405 	SLOW_EXEC(EExecThreadExitReason);
       
   406 	SLOW_EXEC(EExecThreadExitCategory);
       
   407 	SLOW_EXEC(EExecThreadGetDesLength);
       
   408 	SLOW_EXEC(EExecThreadGetDesMaxLength);
       
   409 	SLOW_EXEC(EExecThreadRead8);
       
   410 	SLOW_EXEC(EExecThreadRead16);
       
   411 	SLOW_EXEC(EExecThreadWrite8);
       
   412 	SLOW_EXEC(EExecThreadWrite16);
       
   413 	SLOW_EXEC(EExecTimerCancel);
       
   414 	SLOW_EXEC(EExecTimerAfter);
       
   415 	SLOW_EXEC(EExecTimerAt);
       
   416 	SLOW_EXEC(EExecTimerLock);
       
   417 	SLOW_EXEC(EExecChangeNotifierLogon);
       
   418 	SLOW_EXEC(EExecChangeNotifierLogoff);
       
   419 	SLOW_EXEC(EExecRequestSignal);
       
   420 	SLOW_EXEC(EExecMatch8);
       
   421 	SLOW_EXEC(EExecMatch16);
       
   422 	SLOW_EXEC(EExecFind8);
       
   423 	SLOW_EXEC(EExecFind16);
       
   424 	SLOW_EXEC(EExecLocateF8);
       
   425 	SLOW_EXEC(EExecLocateF16);
       
   426 	SLOW_EXEC(EExecHandleName);
       
   427 	SLOW_EXEC(EExecHandleFullName);
       
   428 	SLOW_EXEC(EExecHandleInfo);
       
   429 	SLOW_EXEC(EExecHandleCount);
       
   430 	SLOW_EXEC(EExecAfter);
       
   431 	SLOW_EXEC(EExecAt);
       
   432 	SLOW_EXEC(EExecDayName);
       
   433 	SLOW_EXEC(EExecDayNameAbb);
       
   434 	SLOW_EXEC(EExecMonthName);
       
   435 	SLOW_EXEC(EExecMonthNameAbb);
       
   436 	SLOW_EXEC(EExecSuffix);
       
   437 	SLOW_EXEC(EExecAmPmName);
       
   438 	SLOW_EXEC(EExecCurrencySymbol);
       
   439 	SLOW_EXEC(EExecLocale);
       
   440 	SLOW_EXEC(EExecLocaleSet);
       
   441 	SLOW_EXEC(EExecLocaleMessageText);
       
   442 	SLOW_EXEC(EExecMessageComplete);
       
   443 	SLOW_EXEC(EExecTimeNow);
       
   444 	SLOW_EXEC(EExecSetHomeTime);
       
   445 	SLOW_EXEC(EExecSetMachineConfiguration);
       
   446 	SLOW_EXEC(EExecCaptureEventHook);
       
   447 	SLOW_EXEC(EExecReleaseEventHook);
       
   448 	SLOW_EXEC(EExecRequestEvent);
       
   449 	SLOW_EXEC(EExecRequestEventCancel);
       
   450 	SLOW_EXEC(EExecAddEvent);
       
   451 	SLOW_EXEC(EExecSessionSendSync);
       
   452 	SLOW_EXEC(EExecDllGlobalAllocated);
       
   453 	SLOW_EXEC(EExecDllGlobalRead);
       
   454 	SLOW_EXEC(EExecDllGlobalWrite);
       
   455 	SLOW_EXEC(EExecDllTls);
       
   456 	SLOW_EXEC(EExecHalFunction);
       
   457 	SLOW_EXEC(EExecSessionAttach);
       
   458 	SLOW_EXEC(EExecWsRegisterThread);
       
   459 	SLOW_EXEC(EExecFsRegisterThread);
       
   460 	SLOW_EXEC(EExecProcessCommandLineLength);
       
   461 	SLOW_EXEC(EExecTimerInactivity);
       
   462 	SLOW_EXEC(EExecUserInactivityTime);
       
   463 	SLOW_EXEC(EExecShortDateFormatSpec);
       
   464 	SLOW_EXEC(EExecLongDateFormatSpec);
       
   465 	SLOW_EXEC(EExecTimeFormatSpec);
       
   466 	SLOW_EXEC(EExecResetInactivityTime);
       
   467 	SLOW_EXEC(EExecDebugFunction);
       
   468 	SLOW_EXEC(EExecBreakPoint);
       
   469 	SLOW_EXEC(EExecProfileStart);
       
   470 	SLOW_EXEC(EExecProfileEnd);
       
   471 	SLOW_EXEC(EExecPasswordIsEnabled);
       
   472 	SLOW_EXEC(EExecPasswordIsValid);
       
   473 	SLOW_EXEC(EExecExceptionHandler);
       
   474 	SLOW_EXEC(EExecSetExceptionHandler);
       
   475 	SLOW_EXEC(EExecModifyExceptionMask);
       
   476 	SLOW_EXEC(EExecRaiseException);
       
   477 	SLOW_EXEC(EExecIsExceptionHandled);
       
   478 	SLOW_EXEC(EExecThreadGetRamSizes);
       
   479 	SLOW_EXEC(EExecProcessGetRamSizes);
       
   480 	SLOW_EXEC(EExecLibraryGetRamSizes);
       
   481 	SLOW_EXEC(EExecMachineConfiguration);
       
   482 	SLOW_EXEC(EExecWasChunkSetHeapInfo);
       
   483 	SLOW_EXEC(EExecLibraryType);
       
   484 	SLOW_EXEC(EExecProcessType);
       
   485 	SLOW_EXEC(EExecPasswordSetEnabled);
       
   486 	SLOW_EXEC(EExecPasswordSet);
       
   487 	SLOW_EXEC(EExecSetCurrencySymbol);
       
   488 	SLOW_EXEC(EExecProcessSetType);
       
   489 	SLOW_EXEC(EExecChunkBottom);
       
   490 	SLOW_EXEC(EExecChunkTop);
       
   491 	SLOW_EXEC(EExecThreadContext);
       
   492 	SLOW_EXEC(EExecDllDataInfo);
       
   493 	SLOW_EXEC(EExecThreadCreate);
       
   494 	SLOW_EXEC(EExecProcessCreate);
       
   495 	SLOW_EXEC(EExecProcessLoaded);
       
   496 	SLOW_EXEC(EExecFindHandleOpen);
       
   497 	SLOW_EXEC(EExecHandleClose);
       
   498 	SLOW_EXEC(EExecChunkCreate);
       
   499 	SLOW_EXEC(EExecChunkAdjust);
       
   500 	SLOW_EXEC(EExecOpenNamedObject);
       
   501 	SLOW_EXEC(EExecHandleDuplicate);
       
   502 	SLOW_EXEC(EExecMutexCreate);
       
   503 	SLOW_EXEC(EExecSemaphoreCreate);
       
   504 	SLOW_EXEC(EExecThreadOpenById);
       
   505 	SLOW_EXEC(EExecProcessOpenById);
       
   506 	SLOW_EXEC(EExecThreadKill);
       
   507 	SLOW_EXEC(EExecThreadLogon);
       
   508 	SLOW_EXEC(EExecThreadLogonCancel);
       
   509 	SLOW_EXEC(EExecDllSetTls);
       
   510 	SLOW_EXEC(EExecDllFreeTls);
       
   511 	SLOW_EXEC(EExecThreadRename);
       
   512 	SLOW_EXEC(EExecProcessRename);
       
   513 	SLOW_EXEC(EExecProcessKill);
       
   514 	SLOW_EXEC(EExecProcessOwner);
       
   515 	SLOW_EXEC(EExecProcessLogon);
       
   516 	SLOW_EXEC(EExecProcessLogonCancel);
       
   517 	SLOW_EXEC(EExecThreadSetInitialParameter);
       
   518 	SLOW_EXEC(EExecThreadProcess);
       
   519 	SLOW_EXEC(EExecThreadGetHeap);
       
   520 	SLOW_EXEC(EExecServerCreate);
       
   521 	SLOW_EXEC(EExecSessionCreate);
       
   522 	SLOW_EXEC(EExecLibraryLoadExact);
       
   523 	SLOW_EXEC(EExecLibraryLoaded);
       
   524 	SLOW_EXEC(EExecDeviceLoad);
       
   525 	SLOW_EXEC(EExecDeviceFree);
       
   526 	SLOW_EXEC(EExecChannelCreate);
       
   527 	SLOW_EXEC(EExecTimerCreate);
       
   528 	SLOW_EXEC(EExecDllAddDependency);
       
   529 	SLOW_EXEC(EExecTimerHighRes);
       
   530 	SLOW_EXEC(EExecAfterHighRes);
       
   531 	SLOW_EXEC(EExecChangeNotifierCreate);
       
   532 	SLOW_EXEC(EExecUndertakerCreate);
       
   533 	SLOW_EXEC(EExecUndertakerLogon);
       
   534 	SLOW_EXEC(EExecUndertakerLogonCancel);
       
   535 	SLOW_EXEC(EExecKernelHeapDebug);
       
   536 	SLOW_EXEC(EExecThreadGetCpuTime);
       
   537 	}
       
   538 
       
   539 
       
   540 void TestExec(const SExecInfo& aInfo, TBool aFast)
       
   541 	{
       
   542 	TInt xn=aInfo.iExecNum;
       
   543 	TInt np=aInfo.iNumParams;
       
   544 	if (np==0)
       
   545 		return;		// no parameters
       
   546 	if (!aFast)
       
   547 		{
       
   548 		// don't do some slow execs
       
   549 		switch (xn)
       
   550 			{
       
   551 			// loader group (could be restricted to F32)
       
   552 			case EExecProcessCreate:
       
   553 			case EExecProcessLoaded:
       
   554 			case EExecLibraryLoadExact:
       
   555 			case EExecLibraryLoaded:
       
   556 			case EExecDllAddDependency:
       
   557 				return;
       
   558 			// descriptor processing (could be moved user side)
       
   559 			case EExecMatch8:
       
   560 			case EExecMatch16:
       
   561 			case EExecLocateF8:
       
   562 			case EExecLocateF16:
       
   563 			case EExecFind8:
       
   564 			case EExecFind16:
       
   565 				return;
       
   566 
       
   567 			// we don't want to do this
       
   568 			case EExecResetMachine:
       
   569 				return;
       
   570 			}
       
   571 		}
       
   572 
       
   573 	TInt state[4];
       
   574 	Mem::FillZ(state,sizeof(state));
       
   575 	}