| Index: src/typing-asm.cc
|
| diff --git a/src/typing-asm.cc b/src/typing-asm.cc
|
| index 2390e7e7b12a824229e8d68768896c35791836d4..085c544a6084f14891ddd76259982c6e8c122382 100644
|
| --- a/src/typing-asm.cc
|
| +++ b/src/typing-asm.cc
|
| @@ -1299,6 +1299,16 @@ void AsmTyper::VisitBinaryOperation(BinaryOperation* expr) {
|
| FAIL(expr, "too many consecutive multiplicative ops");
|
| }
|
| }
|
| + if (expr->op() == Token::MOD || expr->op() == Token::DIV) {
|
| + if (!((left_type->Is(cache_.kAsmSigned) &&
|
| + right_type->Is(cache_.kAsmSigned)) ||
|
| + (left_type->Is(cache_.kAsmUnsigned) &&
|
| + right_type->Is(cache_.kAsmUnsigned)))) {
|
| + FAIL(expr,
|
| + "left and right side of integer / or % "
|
| + "must match and be signed or unsigned");
|
| + }
|
| + }
|
| RECURSE(IntersectResult(expr, cache_.kAsmInt));
|
| return;
|
| }
|
|
|