Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 196653009: Remove uses of RangeCanInclude() in flooring division by power of 2. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: RangeCanInclude() is gone now Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 __ sar(dividend, shift); 1630 __ sar(dividend, shift);
1631 return; 1631 return;
1632 } 1632 }
1633 1633
1634 // If the divisor is negative, we have to negate and handle edge cases. 1634 // If the divisor is negative, we have to negate and handle edge cases.
1635 Label not_kmin_int, done; 1635 Label not_kmin_int, done;
1636 __ neg(dividend); 1636 __ neg(dividend);
1637 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { 1637 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
1638 DeoptimizeIf(zero, instr->environment()); 1638 DeoptimizeIf(zero, instr->environment());
1639 } 1639 }
1640 if (instr->hydrogen()->left()->RangeCanInclude(kMinInt)) { 1640 if (instr->hydrogen()->CheckFlag(HValue::kLeftCanBeMinInt)) {
1641 // Note that we could emit branch-free code, but that would need one more 1641 // Note that we could emit branch-free code, but that would need one more
1642 // register. 1642 // register.
1643 __ j(no_overflow, &not_kmin_int, Label::kNear);
1644 if (divisor == -1) { 1643 if (divisor == -1) {
1645 DeoptimizeIf(no_condition, instr->environment()); 1644 DeoptimizeIf(overflow, instr->environment());
1646 } else { 1645 } else {
1646 __ j(no_overflow, &not_kmin_int, Label::kNear);
1647 __ mov(dividend, Immediate(kMinInt / divisor)); 1647 __ mov(dividend, Immediate(kMinInt / divisor));
1648 __ jmp(&done, Label::kNear); 1648 __ jmp(&done, Label::kNear);
1649 } 1649 }
1650 } 1650 }
1651 __ bind(&not_kmin_int); 1651 __ bind(&not_kmin_int);
1652 __ sar(dividend, shift); 1652 __ sar(dividend, shift);
1653 __ bind(&done); 1653 __ bind(&done);
1654 } 1654 }
1655 1655
1656 1656
(...skipping 4674 matching lines...) Expand 10 before | Expand all | Expand 10 after
6331 FixedArray::kHeaderSize - kPointerSize)); 6331 FixedArray::kHeaderSize - kPointerSize));
6332 __ bind(&done); 6332 __ bind(&done);
6333 } 6333 }
6334 6334
6335 6335
6336 #undef __ 6336 #undef __
6337 6337
6338 } } // namespace v8::internal 6338 } } // namespace v8::internal
6339 6339
6340 #endif // V8_TARGET_ARCH_IA32 6340 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698