From 2a6619d59c2c22d92ff8eac6a26b632545d769dd Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 13 Feb 2018 12:23:04 +0000 Subject: [PATCH] A64: Implement CLREX --- src/frontend/A64/decoder/a64.inc | 2 +- src/frontend/A64/translate/impl/system.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontend/A64/decoder/a64.inc b/src/frontend/A64/decoder/a64.inc index d6345a63..4ce46a1d 100644 --- a/src/frontend/A64/decoder/a64.inc +++ b/src/frontend/A64/decoder/a64.inc @@ -61,7 +61,7 @@ INST(SEVL, "SEVL", "11010 //INST(AUTIB_2, "AUTIB, AUTIB1716, AUTIBSP, AUTIBZ, AUTIZB", "1101010100000011001000-111-11111") //INST(ESB, "ESB", "11010101000000110010001000011111") //INST(PSB, "PSB CSYNC", "11010101000000110010001000111111") -//INST(CLREX, "CLREX", "11010101000000110011MMMM01011111") +INST(CLREX, "CLREX", "11010101000000110011MMMM01011111") INST(DSB, "DSB", "11010101000000110011MMMM10011111") INST(DMB, "DMB", "11010101000000110011MMMM10111111") //INST(ISB, "ISB", "11010101000000110011MMMM11011111") diff --git a/src/frontend/A64/translate/impl/system.cpp b/src/frontend/A64/translate/impl/system.cpp index f6ee1bcd..2bfa0f82 100644 --- a/src/frontend/A64/translate/impl/system.cpp +++ b/src/frontend/A64/translate/impl/system.cpp @@ -36,6 +36,11 @@ bool TranslatorVisitor::SEVL() { return true; } +bool TranslatorVisitor::CLREX(Imm<4> /*CRm*/) { + ir.ClearExclusive(); + return true; +} + bool TranslatorVisitor::DSB(Imm<4> /*CRm*/) { ir.DataSynchronizationBarrier(); return true;