LLVM DSL: implement absd and match helpers

Matcheable expression absd(a, b) (absolute difference).
This commit is contained in:
Nekotekina 2021-09-05 20:33:19 +03:00
parent 2268aa9093
commit 67b3fc70f8
2 changed files with 61 additions and 1 deletions

View file

@ -6417,7 +6417,7 @@ public:
void ABSDB(spu_opcode_t op)
{
const auto [a, b] = get_vrs<u8[16]>(op.ra, op.rb);
set_vr(op.rt, max(a, b) - min(a, b));
set_vr(op.rt, absd(a, b));
}
template <typename T>