mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 04:35:46 +00:00
Implement PSET, refactor common comparison funcs
This commit is contained in:
parent
f7e0d532a8
commit
c6e6e4bc7e
9 changed files with 88 additions and 101 deletions
|
@ -15,12 +15,12 @@ void ICMP(TranslatorVisitor& v, u64 insn, const IR::U32& src_a, const IR::U32& o
|
|||
BitField<0, 8, IR::Reg> dest_reg;
|
||||
BitField<8, 8, IR::Reg> src_reg;
|
||||
BitField<48, 1, u64> is_signed;
|
||||
BitField<49, 3, ComparisonOp> compare_op;
|
||||
BitField<49, 3, CompareOp> compare_op;
|
||||
} const icmp{insn};
|
||||
|
||||
const IR::U32 zero{v.ir.Imm32(0)};
|
||||
const bool is_signed{icmp.is_signed != 0};
|
||||
const IR::U1 cmp_result{IntegerCompare(v, operand, zero, icmp.compare_op, is_signed)};
|
||||
const IR::U1 cmp_result{IntegerCompare(v.ir, operand, zero, icmp.compare_op, is_signed)};
|
||||
|
||||
const IR::U32 src_reg{v.X(icmp.src_reg)};
|
||||
const IR::U32 result{v.ir.Select(cmp_result, src_reg, src_a)};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue