A64: Implement CCMN (register)
This commit is contained in:
parent
dd2a6684fe
commit
c5033b5dda
3 changed files with 26 additions and 1 deletions
|
@ -66,6 +66,7 @@ add_library(dynarmic
|
||||||
frontend/A64/translate/impl/branch.cpp
|
frontend/A64/translate/impl/branch.cpp
|
||||||
frontend/A64/translate/impl/data_processing_addsub.cpp
|
frontend/A64/translate/impl/data_processing_addsub.cpp
|
||||||
frontend/A64/translate/impl/data_processing_bitfield.cpp
|
frontend/A64/translate/impl/data_processing_bitfield.cpp
|
||||||
|
frontend/A64/translate/impl/data_processing_conditional_compare.cpp
|
||||||
frontend/A64/translate/impl/data_processing_conditional_select.cpp
|
frontend/A64/translate/impl/data_processing_conditional_select.cpp
|
||||||
frontend/A64/translate/impl/data_processing_crc32.cpp
|
frontend/A64/translate/impl/data_processing_crc32.cpp
|
||||||
frontend/A64/translate/impl/data_processing_logical.cpp
|
frontend/A64/translate/impl/data_processing_logical.cpp
|
||||||
|
|
|
@ -299,7 +299,7 @@ INST(SBC, "SBC", "z1011
|
||||||
INST(SBCS, "SBCS", "z1111010000mmmmm000000nnnnnddddd")
|
INST(SBCS, "SBCS", "z1111010000mmmmm000000nnnnnddddd")
|
||||||
|
|
||||||
// Data Processing - Register - Conditional compare
|
// Data Processing - Register - Conditional compare
|
||||||
//INST(CCMN_reg, "CCMN (register)", "z0111010010mmmmmcccc00nnnnn0ffff")
|
INST(CCMN_reg, "CCMN (register)", "z0111010010mmmmmcccc00nnnnn0ffff")
|
||||||
//INST(CCMP_reg, "CCMP (register)", "z1111010010mmmmmcccc00nnnnn0ffff")
|
//INST(CCMP_reg, "CCMP (register)", "z1111010010mmmmmcccc00nnnnn0ffff")
|
||||||
//INST(CCMN_imm, "CCMN (immediate)", "z0111010010iiiiicccc10nnnnn0ffff")
|
//INST(CCMN_imm, "CCMN (immediate)", "z0111010010iiiiicccc10nnnnn0ffff")
|
||||||
//INST(CCMP_imm, "CCMP (immediate)", "z1111010010iiiiicccc10nnnnn0ffff")
|
//INST(CCMP_imm, "CCMP (immediate)", "z1111010010iiiiicccc10nnnnn0ffff")
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/* 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 {
|
||||||
|
|
||||||
|
bool TranslatorVisitor::CCMN_reg(bool sf, Reg Rm, Cond cond, Reg Rn, Imm<4> nzcv) {
|
||||||
|
const size_t datasize = sf ? 64 : 32;
|
||||||
|
const u32 flags = nzcv.ZeroExtend<u32>() << 28;
|
||||||
|
|
||||||
|
const IR::U32U64 operand1 = X(datasize, Rn);
|
||||||
|
const IR::U32U64 operand2 = X(datasize, Rm);
|
||||||
|
|
||||||
|
const IR::NZCV then_flags = ir.NZCVFrom(ir.AddWithCarry(operand1, operand2, ir.Imm1(0)));
|
||||||
|
const IR::NZCV else_flags = ir.NZCVFromPackedFlags(ir.Imm32(flags));
|
||||||
|
ir.SetNZCV(ir.ConditionalSelect(cond, then_flags, else_flags));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Dynarmic::A64
|
Loading…
Reference in a new issue