summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-04-20 18:52:01 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-04-20 18:52:01 (GMT)
commit8e5c8417e8ef79c1b475cb1b86a1754b24f9af78 (patch)
tree650a39bde7a5367995b471a562aa766febd505bc /src/core
parentc177597d6da5dedb32aa176e8370db8ffb7f87aa (diff)
Shared immediate operands in order to avoid useless allocations.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/processors.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/processors.c b/src/core/processors.c
index 864b066..193cd25 100644
--- a/src/core/processors.c
+++ b/src/core/processors.c
@@ -29,6 +29,7 @@
#include <string.h>
+#include "../arch/immediate.h"
#include "../arch/arm/v7/core.h"
#include "../arch/arm/v7/processor.h"
#include "../arch/dalvik/core.h"
@@ -141,7 +142,7 @@ bool load_hard_coded_processors_definitions(void)
{
bool result; /* Bilan à retourner */
- result = true;
+ result = init_imm_operand_sharing();
result &= register_processor_type("armv7", "ARM v7", G_TYPE_ARMV7_PROCESSOR,
#ifdef DEBUG_DUMP_STATS
@@ -194,6 +195,8 @@ void unload_processors_definitions(void)
_processors_definitions = NULL;
_processors_definitions_count = 0;
+ exit_imm_operand_sharing();
+
G_UNLOCK(_pdef_access);
}
@@ -319,6 +322,8 @@ void display_share_stats(GArchProcessor *proc)
G_LOCK(_pdef_access);
+ dump_imm_operand_share_stats();
+
for (i = 0; i < _processors_definitions_count; i++)
if (_processors_definitions[i].instance == type)
{