mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-09 07:58:16 +01:00
IR: Vector instructions now take esize argument in emitter
This commit is contained in:
parent
1d0cd95b23
commit
d3a4e1efe2
7 changed files with 126 additions and 226 deletions
|
|
@ -22,19 +22,7 @@ bool TranslatorVisitor::SHL_2(bool Q, Imm<4> immh, Imm<3> immb, Vec Vn, Vec Vd)
|
|||
const u8 shift_amount = concatenate(immh, immb).ZeroExtend<u8>() - static_cast<u8>(esize);
|
||||
|
||||
const IR::U128 operand = V(datasize, Vn);
|
||||
const IR::U128 result = [&]{
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return ir.VectorLogicalShiftLeft8(operand, shift_amount);
|
||||
case 16:
|
||||
return ir.VectorLogicalShiftLeft16(operand, shift_amount);
|
||||
case 32:
|
||||
return ir.VectorLogicalShiftLeft32(operand, shift_amount);
|
||||
case 64:
|
||||
default:
|
||||
return ir.VectorLogicalShiftLeft64(operand, shift_amount);
|
||||
}
|
||||
}();
|
||||
const IR::U128 result = ir.VectorLogicalShiftLeft(esize, operand, shift_amount);
|
||||
|
||||
V(datasize, Vd, result);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue