mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-06-05 07:35:01 -06:00
Select for U64 constants
This commit is contained in:
parent
760133c9cc
commit
221629b8b5
@ -191,6 +191,7 @@ Id EmitCompositeShuffleF32x4(EmitContext& ctx, Id composite1, Id composite2, u32
|
|||||||
u32 comp2, u32 comp3);
|
u32 comp2, u32 comp3);
|
||||||
Id EmitSelectU1(EmitContext& ctx, Id cond, Id true_value, Id false_value);
|
Id EmitSelectU1(EmitContext& ctx, Id cond, Id true_value, Id false_value);
|
||||||
Id EmitSelectU32(EmitContext& ctx, Id cond, Id true_value, Id false_value);
|
Id EmitSelectU32(EmitContext& ctx, Id cond, Id true_value, Id false_value);
|
||||||
|
Id EmitSelectU64(EmitContext& ctx, Id cond, Id true_value, Id false_value);
|
||||||
Id EmitSelectF32(EmitContext& ctx, Id cond, Id true_value, Id false_value);
|
Id EmitSelectF32(EmitContext& ctx, Id cond, Id true_value, Id false_value);
|
||||||
Id EmitBitCastU16F16(EmitContext& ctx, Id value);
|
Id EmitBitCastU16F16(EmitContext& ctx, Id value);
|
||||||
Id EmitBitCastU32F32(EmitContext& ctx, Id value);
|
Id EmitBitCastU32F32(EmitContext& ctx, Id value);
|
||||||
|
|||||||
@ -14,6 +14,10 @@ Id EmitSelectU32(EmitContext& ctx, Id cond, Id true_value, Id false_value) {
|
|||||||
return ctx.OpSelect(ctx.U32[1], cond, true_value, false_value);
|
return ctx.OpSelect(ctx.U32[1], cond, true_value, false_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Id EmitSelectU64(EmitContext& ctx, Id cond, Id true_value, Id false_value) {
|
||||||
|
return ctx.OpSelect(ctx.U64, cond, true_value, false_value);
|
||||||
|
}
|
||||||
|
|
||||||
Id EmitSelectF32(EmitContext& ctx, Id cond, Id true_value, Id false_value) {
|
Id EmitSelectF32(EmitContext& ctx, Id cond, Id true_value, Id false_value) {
|
||||||
return ctx.OpSelect(ctx.F32[1], cond, true_value, false_value);
|
return ctx.OpSelect(ctx.F32[1], cond, true_value, false_value);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -886,6 +886,8 @@ Value IREmitter::Select(const U1& condition, const Value& true_value, const Valu
|
|||||||
return Inst(Opcode::SelectU1, condition, true_value, false_value);
|
return Inst(Opcode::SelectU1, condition, true_value, false_value);
|
||||||
case Type::U32:
|
case Type::U32:
|
||||||
return Inst(Opcode::SelectU32, condition, true_value, false_value);
|
return Inst(Opcode::SelectU32, condition, true_value, false_value);
|
||||||
|
case Type::U64:
|
||||||
|
return Inst(Opcode::SelectU64, condition, true_value, false_value);
|
||||||
case Type::F32:
|
case Type::F32:
|
||||||
return Inst(Opcode::SelectF32, condition, true_value, false_value);
|
return Inst(Opcode::SelectF32, condition, true_value, false_value);
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -182,6 +182,7 @@ OPCODE(CompositeShuffleF32x4, F32x4, F32x
|
|||||||
// Select operations
|
// Select operations
|
||||||
OPCODE(SelectU1, U1, U1, U1, U1, )
|
OPCODE(SelectU1, U1, U1, U1, U1, )
|
||||||
OPCODE(SelectU32, U32, U1, U32, U32, )
|
OPCODE(SelectU32, U32, U1, U32, U32, )
|
||||||
|
OPCODE(SelectU64, U64, U1, U32, U32, )
|
||||||
OPCODE(SelectF32, F32, U1, F32, F32, )
|
OPCODE(SelectF32, F32, U1, F32, F32, )
|
||||||
|
|
||||||
// Bitwise conversions
|
// Bitwise conversions
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user