Change HuiStatic.cpp to avoid VFP instructions in the static initialiser - avoids Bug 3937
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiStatic.cpp Wed Oct 13 15:34:15 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiStatic.cpp Fri Nov 12 11:42:24 2010 +0000
@@ -38,9 +38,13 @@
#include "alfcommanddebug.h"
#endif
+#ifdef __WINSCW__
+#define HUISTATIC_USE_TLS
+#endif
+
// Global writeable data, used in HW instead of TLS which relatively slow
-#ifndef __WINSCW__
-TTlsData globalWriteableData;
+#ifndef HUISTATIC_USE_TLS
+TTlsData* globalWriteableDataPtr = 0;
#endif
void CleanupWg(TAny* aWg)
@@ -396,8 +400,8 @@
iData->iCommandDebugger = CAlfCommandDebug::NewL();
#endif
-#ifndef __WINSCW__
- globalWriteableData = *iData;
+#ifndef HUISTATIC_USE_TLS
+ globalWriteableDataPtr = iData;
#ifdef USE_MODULE_TEST_HOOKS_FOR_ALF
// For testing purposes, test data needs to be included into TLS
// because test cases require information stored in TLS.
@@ -438,7 +442,12 @@
}
iChangeNotifier->Cancel();
delete iChangeNotifier;
-#if defined( __WINSCW__ ) || defined( USE_MODULE_TEST_HOOKS_FOR_ALF )
+#ifndef HUISTATIC_USE_TLS
+ globalWriteableDataPtr = 0;
+ #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF
+ Dll::FreeTls();
+ #endif
+#else
Dll::FreeTls();
#endif
delete iData;
@@ -447,8 +456,8 @@
EXPORT_C TTlsData* CHuiStatic::Data()
{
-#ifndef __WINSCW__
- return &globalWriteableData;
+#ifndef HUISTATIC_USE_TLS
+ return globalWriteableDataPtr;
#else
return static_cast<TTlsData*>(Dll::Tls());
#endif