shader: Implement LEA

This commit is contained in:
ameerj 2021-03-05 01:15:16 -05:00
parent d1edc16ba8
commit 5465cb1561
9 changed files with 136 additions and 29 deletions

View file

@ -62,6 +62,10 @@ Id EmitINeg32(EmitContext& ctx, Id value) {
return ctx.OpSNegate(ctx.U32[1], value);
}
Id EmitINeg64(EmitContext& ctx, Id value) {
return ctx.OpSNegate(ctx.U64, value);
}
Id EmitIAbs32(EmitContext& ctx, Id value) {
return ctx.OpSAbs(ctx.U32[1], value);
}
@ -74,6 +78,10 @@ Id EmitShiftRightLogical32(EmitContext& ctx, Id a, Id b) {
return ctx.OpShiftRightLogical(ctx.U32[1], a, b);
}
Id EmitShiftRightLogical64(EmitContext& ctx, Id a, Id b) {
return ctx.OpShiftRightLogical(ctx.U64, a, b);
}
Id EmitShiftRightArithmetic32(EmitContext& ctx, Id a, Id b) {
return ctx.OpShiftRightArithmetic(ctx.U32[1], a, b);
}