A64: Implement CFINV

This commit is contained in:
Lioncash 2019-03-06 13:56:04 -05:00 committed by MerryMage
parent 597a8be5d5
commit 51b526e453
3 changed files with 21 additions and 1 deletions

View file

@ -175,6 +175,7 @@ add_library(dynarmic
frontend/A64/translate/impl/simd_vector_x_indexed_element.cpp
frontend/A64/translate/impl/sys_dc.cpp
frontend/A64/translate/impl/system.cpp
frontend/A64/translate/impl/system_flag_manipulation.cpp
frontend/A64/translate/translate.cpp
frontend/A64/translate/translate.h
frontend/A64/types.cpp

View file

@ -81,7 +81,7 @@ INST(MSR_reg, "MSR (register)", "11010
INST(MRS, "MRS", "110101010011poooNNNNMMMMooottttt")
// System - Flag manipulation instructions
//INST(CFINV, "CFINV", "11010101000000000100000000011111") // ARMv8.4
INST(CFINV, "CFINV", "11010101000000000100000000011111") // ARMv8.4
//INST(RMIF, "RMIF", "10111010000iiiiii00001nnnnn0IIII") // ARMv8.4
//INST(SETF8, "SETF8", "0011101000000000000010nnnnn01101") // ARMv8.4
//INST(SETF16, "SETF16", "0011101000000000010010nnnnn01101") // ARMv8.4

View file

@ -0,0 +1,19 @@
/* This file is part of the dynarmic project.
* Copyright (c) 2019 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 {
bool TranslatorVisitor::CFINV() {
const IR::U32 nzcv = ir.GetNZCVRaw();
const IR::U32 result = ir.Eor(nzcv, ir.Imm32(0x20000000));
ir.SetNZCVRaw(result);
return true;
}
} // namespace Dynarmic::A64