A64: Implement ADD (vector), scalar variant
This commit is contained in:
parent
2a0850c068
commit
4c5871d5d5
3 changed files with 28 additions and 1 deletions
|
@ -93,6 +93,7 @@ add_library(dynarmic
|
||||||
frontend/A64/translate/impl/move_wide.cpp
|
frontend/A64/translate/impl/move_wide.cpp
|
||||||
frontend/A64/translate/impl/simd_aes.cpp
|
frontend/A64/translate/impl/simd_aes.cpp
|
||||||
frontend/A64/translate/impl/simd_copy.cpp
|
frontend/A64/translate/impl/simd_copy.cpp
|
||||||
|
frontend/A64/translate/impl/simd_scalar_three_same.cpp
|
||||||
frontend/A64/translate/impl/simd_three_same.cpp
|
frontend/A64/translate/impl/simd_three_same.cpp
|
||||||
frontend/A64/translate/impl/system.cpp
|
frontend/A64/translate/impl/system.cpp
|
||||||
frontend/A64/translate/translate.cpp
|
frontend/A64/translate/translate.cpp
|
||||||
|
|
|
@ -494,7 +494,7 @@ INST(AESIMC, "AESIMC", "01001
|
||||||
//INST(SQSHL_reg_1, "SQSHL (register)", "01011110zz1mmmmm010011nnnnnddddd")
|
//INST(SQSHL_reg_1, "SQSHL (register)", "01011110zz1mmmmm010011nnnnnddddd")
|
||||||
//INST(SRSHL_1, "SRSHL", "01011110zz1mmmmm010101nnnnnddddd")
|
//INST(SRSHL_1, "SRSHL", "01011110zz1mmmmm010101nnnnnddddd")
|
||||||
//INST(SQRSHL_1, "SQRSHL", "01011110zz1mmmmm010111nnnnnddddd")
|
//INST(SQRSHL_1, "SQRSHL", "01011110zz1mmmmm010111nnnnnddddd")
|
||||||
//INST(ADD_1, "ADD (vector)", "01011110zz1mmmmm100001nnnnnddddd")
|
INST(ADD_1, "ADD (vector)", "01011110zz1mmmmm100001nnnnnddddd")
|
||||||
//INST(CMTST_1, "CMTST", "01011110zz1mmmmm100011nnnnnddddd")
|
//INST(CMTST_1, "CMTST", "01011110zz1mmmmm100011nnnnnddddd")
|
||||||
//INST(SQDMULH_vec_1, "SQDMULH (vector)", "01011110zz1mmmmm101101nnnnnddddd")
|
//INST(SQDMULH_vec_1, "SQDMULH (vector)", "01011110zz1mmmmm101101nnnnnddddd")
|
||||||
//INST(UQADD_1, "UQADD", "01111110zz1mmmmm000011nnnnnddddd")
|
//INST(UQADD_1, "UQADD", "01111110zz1mmmmm000011nnnnnddddd")
|
||||||
|
|
26
src/frontend/A64/translate/impl/simd_scalar_three_same.cpp
Normal file
26
src/frontend/A64/translate/impl/simd_scalar_three_same.cpp
Normal file
|
@ -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 "common/bit_util.h"
|
||||||
|
#include "frontend/A64/translate/impl/impl.h"
|
||||||
|
|
||||||
|
namespace Dynarmic::A64 {
|
||||||
|
|
||||||
|
bool TranslatorVisitor::ADD_1(Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||||
|
if (size != 0b11) {
|
||||||
|
return ReservedValue();
|
||||||
|
}
|
||||||
|
const size_t esize = 8 << size.ZeroExtend<size_t>();
|
||||||
|
const size_t datasize = esize;
|
||||||
|
|
||||||
|
const IR::U64 operand1 = V_scalar(datasize, Vn);
|
||||||
|
const IR::U64 operand2 = V_scalar(datasize, Vm);
|
||||||
|
const IR::U64 result = ir.Add(operand1, operand2);
|
||||||
|
V_scalar(datasize, Vd, result);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Dynarmic::A64
|
Loading…
Reference in a new issue