From 565a20b09601ff3a5ec8c844504a31d7ec14f274 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 22 Feb 2021 07:30:14 -0500 Subject: [PATCH] thumb32: Implement WFI --- src/frontend/A32/decoder/thumb32.inc | 2 +- src/frontend/A32/translate/impl/thumb32_control.cpp | 4 ++++ src/frontend/A32/translate/impl/translate_thumb.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontend/A32/decoder/thumb32.inc b/src/frontend/A32/decoder/thumb32.inc index f8d215a8..dc5963cc 100644 --- a/src/frontend/A32/decoder/thumb32.inc +++ b/src/frontend/A32/decoder/thumb32.inc @@ -98,7 +98,7 @@ INST(thumb32_MOVT, "MOVT", "11110i101100iiii0iiidd INST(thumb32_NOP, "NOP", "11110011101011111000000000000000") INST(thumb32_YIELD, "YIELD", "11110011101011111000000000000001") INST(thumb32_WFE, "WFE", "11110011101011111000000000000010") -//INST(thumb32_WFI, "WFI", "111100111010----10-0-00000000011") +INST(thumb32_WFI, "WFI", "11110011101011111000000000000011") //INST(thumb32_SEV, "SEV", "111100111010----10-0-00000000100") //INST(thumb32_SEVL, "SEVL", "111100111010----10-0-00000000101") //INST(thumb32_DBG, "DBG", "111100111010----10-0-0001111----") diff --git a/src/frontend/A32/translate/impl/thumb32_control.cpp b/src/frontend/A32/translate/impl/thumb32_control.cpp index 463cbe94..e4322e51 100644 --- a/src/frontend/A32/translate/impl/thumb32_control.cpp +++ b/src/frontend/A32/translate/impl/thumb32_control.cpp @@ -42,6 +42,10 @@ bool ThumbTranslatorVisitor::thumb32_WFE() { return thumb16_WFE(); } +bool ThumbTranslatorVisitor::thumb32_WFI() { + return thumb16_WFI(); +} + bool ThumbTranslatorVisitor::thumb32_YIELD() { return thumb16_YIELD(); } diff --git a/src/frontend/A32/translate/impl/translate_thumb.h b/src/frontend/A32/translate/impl/translate_thumb.h index 171b81f5..5423f4aa 100644 --- a/src/frontend/A32/translate/impl/translate_thumb.h +++ b/src/frontend/A32/translate/impl/translate_thumb.h @@ -171,6 +171,7 @@ struct ThumbTranslatorVisitor final { bool thumb32_NOP(); bool thumb32_UDF(); bool thumb32_WFE(); + bool thumb32_WFI(); bool thumb32_YIELD(); // thumb32 branch instructions