From f900cf2efa89825668a005e886e66ae0e687adc2 Mon Sep 17 00:00:00 2001 From: "balazs.kilvady@imgtec.com" Date: Tue, 28 Oct 2014 16:54:35 +0000 Subject: [PATCH] MIPS: [turbofan] Complete support for integer division/modulus in simplified lowering. Port r24942 (c5055ce) Original commit message: Also add backend flags that tell whether integer division/modulus is generally safe, i.e. does not trap on overflow or divide by zero. TEST=unittests BUG= R=dusan.milosavljevic@imgtec.com Review URL: https://codereview.chromium.org/679393003 Cr-Commit-Position: refs/heads/master@{#24956} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/compiler/mips/instruction-selector-mips.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compiler/mips/instruction-selector-mips.cc b/src/compiler/mips/instruction-selector-mips.cc index dc1749ad18..9be6bb6d66 100644 --- a/src/compiler/mips/instruction-selector-mips.cc +++ b/src/compiler/mips/instruction-selector-mips.cc @@ -651,8 +651,12 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { // static MachineOperatorBuilder::Flags InstructionSelector::SupportedMachineOperatorFlags() { - return MachineOperatorBuilder::Flag::kNoFlags; + return MachineOperatorBuilder::kInt32DivIsSafe | + MachineOperatorBuilder::kInt32ModIsSafe | + MachineOperatorBuilder::kUint32DivIsSafe | + MachineOperatorBuilder::kUint32ModIsSafe; } + } // namespace compiler } // namespace internal } // namespace v8