A64: Implement ADDP (scalar)
This commit is contained in:
parent
84f1c9b7f4
commit
bd2b415850
3 changed files with 27 additions and 1 deletions
|
@ -98,6 +98,7 @@ add_library(dynarmic
|
|||
frontend/A64/translate/impl/simd_copy.cpp
|
||||
frontend/A64/translate/impl/simd_modified_immediate.cpp
|
||||
frontend/A64/translate/impl/simd_permute.cpp
|
||||
frontend/A64/translate/impl/simd_scalar_pairwise.cpp
|
||||
frontend/A64/translate/impl/simd_scalar_three_same.cpp
|
||||
frontend/A64/translate/impl/simd_shift_by_immediate.cpp
|
||||
frontend/A64/translate/impl/simd_three_same.cpp
|
||||
|
|
|
@ -422,7 +422,7 @@ INST(DUP_elt_1, "DUP (element)", "01011
|
|||
//INST(FCVTXN_1, "FCVTXN, FCVTXN2", "011111100z100001011010nnnnnddddd")
|
||||
|
||||
// Data Processing - FP and SIMD - SIMD Scalar pairwise
|
||||
//INST(ADDP_pair, "ADDP (scalar)", "01011110zz110001101110nnnnnddddd")
|
||||
INST(ADDP_pair, "ADDP (scalar)", "01011110zz110001101110nnnnnddddd")
|
||||
//INST(FMAXNMP_pair_1, "FMAXNMP (scalar)", "0101111000110000110010nnnnnddddd")
|
||||
//INST(FMAXNMP_pair_2, "FMAXNMP (scalar)", "011111100z110000110010nnnnnddddd")
|
||||
//INST(FADDP_pair_1, "FADDP (scalar)", "0101111000110000110110nnnnnddddd")
|
||||
|
|
25
src/frontend/A64/translate/impl/simd_scalar_pairwise.cpp
Normal file
25
src/frontend/A64/translate/impl/simd_scalar_pairwise.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
/* 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::ADDP_pair(Imm<2> size, Vec Vn, Vec Vd) {
|
||||
if (size != 0b11) {
|
||||
return ReservedValue();
|
||||
}
|
||||
|
||||
const IR::U64 operand1 = ir.VectorGetElement(64, V(128, Vn), 0);
|
||||
const IR::U64 operand2 = ir.VectorGetElement(64, V(128, Vn), 1);
|
||||
const IR::U128 result = ir.ZeroExtendToQuad(ir.Add(operand1, operand2));
|
||||
V(128, Vd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace A64
|
||||
} // namespace Dynarmic
|
Loading…
Reference in a new issue