mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-03 05:04:41 +01:00
A64: Reorganize decoder tables (some vector entries were grouped with scalar entries)
This commit is contained in:
parent
7b33772ac6
commit
2a0850c068
2 changed files with 117 additions and 117 deletions
|
|
@ -34,51 +34,6 @@ bool TranslatorVisitor::ADD_vector(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::BIC_asimd_reg(bool Q, Vec Vm, Vec Vn, Vec Vd) {
|
||||
const size_t datasize = Q ? 128 : 64;
|
||||
|
||||
const IR::U128 operand1 = V(datasize, Vn);
|
||||
const IR::U128 operand2 = V(datasize, Vm);
|
||||
|
||||
IR::U128 result = ir.VectorAnd(operand1, ir.VectorNot(operand2));
|
||||
if (datasize == 64) {
|
||||
result = ir.VectorZeroUpper(result);
|
||||
}
|
||||
|
||||
V(datasize, Vd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::CMEQ_reg_2(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||
if (size == 0b11 && !Q) return ReservedValue();
|
||||
const size_t esize = 8 << size.ZeroExtend<size_t>();
|
||||
const size_t datasize = Q ? 128 : 64;
|
||||
|
||||
const IR::U128 operand1 = V(datasize, Vn);
|
||||
const IR::U128 operand2 = V(datasize, Vm);
|
||||
|
||||
IR::U128 result = [&]{
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return ir.VectorEqual8(operand1, operand2);
|
||||
case 16:
|
||||
return ir.VectorEqual16(operand1, operand2);
|
||||
case 32:
|
||||
return ir.VectorEqual32(operand1, operand2);
|
||||
default:
|
||||
return ir.VectorEqual64(operand1, operand2);
|
||||
}
|
||||
}();
|
||||
|
||||
if (datasize == 64) {
|
||||
result = ir.VectorZeroUpper(result);
|
||||
}
|
||||
|
||||
V(datasize, Vd, result);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::ADDP_vec(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||
if (size == 0b11 && !Q) return ReservedValue();
|
||||
const size_t esize = 8 << size.ZeroExtend<size_t>();
|
||||
|
|
@ -118,6 +73,21 @@ bool TranslatorVisitor::AND_asimd(bool Q, Vec Vm, Vec Vn, Vec Vd) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::BIC_asimd_reg(bool Q, Vec Vm, Vec Vn, Vec Vd) {
|
||||
const size_t datasize = Q ? 128 : 64;
|
||||
|
||||
const IR::U128 operand1 = V(datasize, Vn);
|
||||
const IR::U128 operand2 = V(datasize, Vm);
|
||||
|
||||
IR::U128 result = ir.VectorAnd(operand1, ir.VectorNot(operand2));
|
||||
if (datasize == 64) {
|
||||
result = ir.VectorZeroUpper(result);
|
||||
}
|
||||
|
||||
V(datasize, Vd, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::ORR_asimd_reg(bool Q, Vec Vm, Vec Vn, Vec Vd) {
|
||||
const size_t datasize = Q ? 128 : 64;
|
||||
|
||||
|
|
@ -148,6 +118,36 @@ bool TranslatorVisitor::ORN_asimd(bool Q, Vec Vm, Vec Vn, Vec Vd) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::CMEQ_reg_2(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) {
|
||||
if (size == 0b11 && !Q) return ReservedValue();
|
||||
const size_t esize = 8 << size.ZeroExtend<size_t>();
|
||||
const size_t datasize = Q ? 128 : 64;
|
||||
|
||||
const IR::U128 operand1 = V(datasize, Vn);
|
||||
const IR::U128 operand2 = V(datasize, Vm);
|
||||
|
||||
IR::U128 result = [&]{
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return ir.VectorEqual8(operand1, operand2);
|
||||
case 16:
|
||||
return ir.VectorEqual16(operand1, operand2);
|
||||
case 32:
|
||||
return ir.VectorEqual32(operand1, operand2);
|
||||
default:
|
||||
return ir.VectorEqual64(operand1, operand2);
|
||||
}
|
||||
}();
|
||||
|
||||
if (datasize == 64) {
|
||||
result = ir.VectorZeroUpper(result);
|
||||
}
|
||||
|
||||
V(datasize, Vd, result);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::EOR_asimd(bool Q, Vec Vm, Vec Vn, Vec Vd) {
|
||||
const size_t datasize = Q ? 128 : 64;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue