mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-10 00:18:23 +01:00
Implement DC instructions
This commit is contained in:
parent
a9153218bd
commit
5edd623b9d
18 changed files with 218 additions and 33 deletions
52
src/frontend/A64/translate/impl/sys_dc.cpp
Normal file
52
src/frontend/A64/translate/impl/sys_dc.cpp
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/* 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::A64 {
|
||||
|
||||
static bool DataCacheInstruction(TranslatorVisitor& tv, IREmitter& ir, DataCacheOperation op, const Reg Rt) {
|
||||
ir.DataCacheOperationRaised(op, tv.X(64, Rt));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::DC_IVAC(Reg Rt) {
|
||||
return DataCacheInstruction(*this, ir, DataCacheOperation::InvaldiateByVAToPoC, Rt);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::DC_ISW(Reg Rt) {
|
||||
return DataCacheInstruction(*this, ir, DataCacheOperation::InvalidateBySetWay, Rt);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::DC_CSW(Reg Rt) {
|
||||
return DataCacheInstruction(*this, ir, DataCacheOperation::CleanBySetWay, Rt);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::DC_CISW(Reg Rt) {
|
||||
return DataCacheInstruction(*this, ir, DataCacheOperation::CleanAndInvalidateBySetWay, Rt);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::DC_ZVA(Reg Rt) {
|
||||
return DataCacheInstruction(*this, ir, DataCacheOperation::ZeroByVA, Rt);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::DC_CVAC(Reg Rt) {
|
||||
return DataCacheInstruction(*this, ir, DataCacheOperation::CleanByVAToPoC, Rt);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::DC_CVAU(Reg Rt) {
|
||||
return DataCacheInstruction(*this, ir, DataCacheOperation::CleanByVAToPoU, Rt);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::DC_CVAP(Reg Rt) {
|
||||
return DataCacheInstruction(*this, ir, DataCacheOperation::CleanByVAToPoP, Rt);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::DC_CIVAC(Reg Rt) {
|
||||
return DataCacheInstruction(*this, ir, DataCacheOperation::CleanAndInvalidateByVAToPoC, Rt);
|
||||
}
|
||||
|
||||
} // namespace Dynarmic::A64
|
||||
Loading…
Add table
Add a link
Reference in a new issue