A64: Implement HINT, NOP, YIELD, WFE, WFI, SEV, and SEVL

Truly the most difficult A64 instructions to implement.
This commit is contained in:
Lioncash 2018-01-21 19:50:31 -05:00 committed by MerryMage
parent 4d8f4aa8af
commit ae5dbcbed6
3 changed files with 49 additions and 7 deletions

View file

@ -75,6 +75,7 @@ add_library(dynarmic
frontend/A64/translate/impl/load_store_register_pair.cpp
frontend/A64/translate/impl/move_wide.cpp
frontend/A64/translate/impl/simd_three_same.cpp
frontend/A64/translate/impl/system.cpp
frontend/A64/translate/translate.cpp
frontend/A64/translate/translate.h
frontend/A64/types.cpp

View file

@ -42,13 +42,13 @@ INST(SVC, "SVC", "11010
// System
//INST(MSR_imm, "MSR (immediate)", "1101010100000ooo0100MMMMooo11111")
//INST(HINT, "HINT", "11010101000000110010MMMMooo11111")
//INST(NOP, "NOP", "11010101000000110010000000011111")
//INST(YIELD, "YIELD", "11010101000000110010000000111111")
//INST(WFE, "WFE", "11010101000000110010000001011111")
//INST(WFI, "WFI", "11010101000000110010000001111111")
//INST(SEV, "SEV", "11010101000000110010000010011111")
//INST(SEVL, "SEVL", "11010101000000110010000010111111")
INST(HINT, "HINT", "11010101000000110010MMMMooo11111")
INST(NOP, "NOP", "11010101000000110010000000011111")
INST(YIELD, "YIELD", "11010101000000110010000000111111")
INST(WFE, "WFE", "11010101000000110010000001011111")
INST(WFI, "WFI", "11010101000000110010000001111111")
INST(SEV, "SEV", "11010101000000110010000010011111")
INST(SEVL, "SEVL", "11010101000000110010000010111111")
//INST(XPAC_1, "XPACD, XPACI, XPACLRI", "110110101100000101000D11111ddddd")
//INST(XPAC_2, "XPACD, XPACI, XPACLRI", "11010101000000110010000011111111")
//INST(PACIA_1, "PACIA, PACIA1716, PACIASP, PACIAZ, PACIZA", "110110101100000100Z000nnnnnddddd")

View file

@ -0,0 +1,41 @@
/* This file is part of the dynarmic project.
* Copyright (c) 2018 MerryMage
* This software may be used and distributed according to the terms of the GNU
* General Public License version 2 or any later version.
*/
#include "frontend/A64/translate/impl/impl.h"
namespace Dynarmic {
namespace A64 {
bool TranslatorVisitor::HINT([[maybe_unused]] Imm<4> CRm, [[maybe_unused]] Imm<3> op2) {
return true;
}
bool TranslatorVisitor::NOP() {
return true;
}
bool TranslatorVisitor::YIELD() {
return true;
}
bool TranslatorVisitor::WFE() {
return true;
}
bool TranslatorVisitor::WFI() {
return true;
}
bool TranslatorVisitor::SEV() {
return true;
}
bool TranslatorVisitor::SEVL() {
return true;
}
} // namespace A64
} // namespace Dynarmic