|
|
@@ -1,5 +1,6 @@
|
|
|
#include "Assembly.h"
|
|
|
|
|
|
+#include "Critical.h"
|
|
|
#include "InMemoryBuffer.h"
|
|
|
|
|
|
#ifndef WIN32
|
|
|
@@ -726,8 +727,8 @@ public:
|
|
|
class OperationCodeTable : public Framework::ReferenceCounter
|
|
|
{
|
|
|
public:
|
|
|
- thread_local static Framework::RCArray<OperationCodeTable>
|
|
|
- machineCodeTranslationTable;
|
|
|
+ static Framework::RCArray<OperationCodeTable> machineCodeTranslationTable;
|
|
|
+ static Framework::Critical machineCodeTranslationTableLock;
|
|
|
|
|
|
private:
|
|
|
Framework::Assembly::Operation op;
|
|
|
@@ -1485,9 +1486,11 @@ public:
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-thread_local Framework::RCArray<OperationCodeTable>
|
|
|
+Framework::RCArray<OperationCodeTable>
|
|
|
OperationCodeTable::machineCodeTranslationTable;
|
|
|
|
|
|
+Framework::Critical OperationCodeTable::machineCodeTranslationTableLock;
|
|
|
+
|
|
|
std::function<bool(const Framework::Assembly::OperationArgument& arg)>
|
|
|
isGPRegister(Framework::Assembly::MemoryBlockSize size)
|
|
|
{
|
|
|
@@ -1589,6 +1592,7 @@ isFPRegisterOrMEmoryAccess(Framework::Assembly::MemoryBlockSize regSize,
|
|
|
|
|
|
void __intializeMachineCodeTranslationTable()
|
|
|
{
|
|
|
+ OperationCodeTable::machineCodeTranslationTableLock.lock();
|
|
|
if (!OperationCodeTable::machineCodeTranslationTable.getEntryCount())
|
|
|
{
|
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
@@ -6667,6 +6671,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
READ),
|
|
|
}));
|
|
|
}
|
|
|
+ OperationCodeTable::machineCodeTranslationTableLock.unlock();
|
|
|
}
|
|
|
|
|
|
bool Framework::Assembly::OperationArgument::usesRegister(GPRegister reg) const
|