A64: Implement CSEL
This commit is contained in:
parent
6395f09f94
commit
144b629d8a
3 changed files with 28 additions and 1 deletions
|
@ -62,6 +62,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_select.cpp
|
||||||
frontend/A64/translate/impl/data_processing_logical.cpp
|
frontend/A64/translate/impl/data_processing_logical.cpp
|
||||||
frontend/A64/translate/impl/data_processing_pcrel.cpp
|
frontend/A64/translate/impl/data_processing_pcrel.cpp
|
||||||
frontend/A64/translate/impl/exception_generating.cpp
|
frontend/A64/translate/impl/exception_generating.cpp
|
||||||
|
|
|
@ -331,7 +331,7 @@ INST(SBCS, "SBCS", "z1111
|
||||||
//INST(CCMP_imm, "CCMP (immediate)", "z1111010010iiiiicccc10nnnnn0ffff")
|
//INST(CCMP_imm, "CCMP (immediate)", "z1111010010iiiiicccc10nnnnn0ffff")
|
||||||
|
|
||||||
// Data Processing - Register - Conditional select
|
// Data Processing - Register - Conditional select
|
||||||
//INST(CSEL, "CSEL", "z0011010100mmmmmcccc00nnnnnddddd")
|
INST(CSEL, "CSEL", "z0011010100mmmmmcccc00nnnnnddddd")
|
||||||
//INST(CSINC, "CSINC", "z0011010100mmmmmcccc01nnnnnddddd")
|
//INST(CSINC, "CSINC", "z0011010100mmmmmcccc01nnnnnddddd")
|
||||||
//INST(CSINV, "CSINV", "z1011010100mmmmmcccc00nnnnnddddd")
|
//INST(CSINV, "CSINV", "z1011010100mmmmmcccc00nnnnnddddd")
|
||||||
//INST(CSNEG, "CSNEG", "z1011010100mmmmmcccc01nnnnnddddd")
|
//INST(CSNEG, "CSNEG", "z1011010100mmmmmcccc01nnnnnddddd")
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
/* 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::CSEL(bool sf, Reg Rm, Cond cond, Reg Rn, Reg Rd) {
|
||||||
|
size_t datasize = sf ? 64 : 32;
|
||||||
|
|
||||||
|
IR::U32U64 operand1 = X(datasize, Rn);
|
||||||
|
IR::U32U64 operand2 = X(datasize, Rm);
|
||||||
|
|
||||||
|
IR::U32U64 result = ir.ConditionalSelect(cond, operand1, operand2);
|
||||||
|
|
||||||
|
X(datasize, Rd, result);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace A64
|
||||||
|
} // namespace Dynarmic
|
Loading…
Reference in a new issue