case Token::SLASH:
return this->writeBinaryOperation(resultType, *operandType, lhs, rhs, SpvOpFDiv,
SpvOpSDiv, SpvOpUDiv, SpvOpUndef, out);
+ case Token::PERCENT:
+ return this->writeBinaryOperation(resultType, *operandType, lhs, rhs, SpvOpFMod,
+ SpvOpSMod, SpvOpUMod, SpvOpUndef, out);
case Token::PLUSEQ: {
SpvId result = this->writeBinaryOperation(resultType, *operandType, lhs, rhs, SpvOpFAdd,
SpvOpIAdd, SpvOpIAdd, SpvOpUndef, out);
lvalue->store(result, out);
return result;
}
+ case Token::PERCENTEQ: {
+ SpvId result = this->writeBinaryOperation(resultType, *operandType, lhs, rhs, SpvOpFMod,
+ SpvOpSMod, SpvOpUMod, SpvOpUndef, out);
+ ASSERT(lvalue);
+ lvalue->store(result, out);
+ return result;
+ }
default:
// FIXME: missing support for some operators (bitwise, &&=, ||=, shift...)
ABORT("unsupported binary expression: %s", b.description().c_str());