shader: Add integer division opcodes

This commit is contained in:
ReinUsesLisp 2021-07-25 21:27:21 -03:00 committed by Fernando Sahmkow
parent 43aa695a04
commit 95761cc6a7
9 changed files with 37 additions and 0 deletions

View file

@ -1145,6 +1145,10 @@ U32 IREmitter::IMul(const U32& a, const U32& b) {
return Inst<U32>(Opcode::IMul32, a, b);
}
U32 IREmitter::IDiv(const U32& a, const U32& b, bool is_signed) {
return Inst<U32>(is_signed ? Opcode::SDiv32 : Opcode::UDiv32, a, b);
}
U32U64 IREmitter::INeg(const U32U64& value) {
switch (value.Type()) {
case Type::U32: