Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
ovf op codes do not apply to floats. (#8357)
Browse files Browse the repository at this point in the history
  • Loading branch information
yowl authored Oct 5, 2020
1 parent 24f1edc commit 151abd3
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/ILCompiler.WebAssembly/src/CodeGen/ILToWebAssemblyImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3834,21 +3834,6 @@ private void ImportBinaryOperation(ILOpcode opcode)
case ILOpcode.rem:
result = _builder.BuildFRem(left, right, "frem");
break;

// TODO: Overflow checks
case ILOpcode.add_ovf:
case ILOpcode.add_ovf_un:
result = _builder.BuildFAdd(left, right, "fadd");
break;
case ILOpcode.sub_ovf:
case ILOpcode.sub_ovf_un:
result = _builder.BuildFSub(left, right, "fsub");
break;
case ILOpcode.mul_ovf:
case ILOpcode.mul_ovf_un:
result = _builder.BuildFMul(left, right, "fmul");
break;

default:
throw new InvalidOperationException(); // Should be unreachable
}
Expand Down

0 comments on commit 151abd3

Please sign in to comment.