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

Side by Side Diff: src/arm/ic-arm.cc

Issue 2876011: Do integer mod via sum-of-digits technique. This benefits the date (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 6 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1715 static const uint32_t exponent_word_for_1 = 1715 static const uint32_t exponent_word_for_1 =
1716 kBinary32ExponentBias << kBinary32ExponentShift; 1716 kBinary32ExponentBias << kBinary32ExponentShift;
1717 1717
1718 __ orr(fval, fval, Operand(exponent_word_for_1), LeaveCC, eq); 1718 __ orr(fval, fval, Operand(exponent_word_for_1), LeaveCC, eq);
1719 __ b(&done); 1719 __ b(&done);
1720 1720
1721 __ bind(&not_special); 1721 __ bind(&not_special);
1722 // Count leading zeros. 1722 // Count leading zeros.
1723 // Gets the wrong answer for 0, but we already checked for that case above. 1723 // Gets the wrong answer for 0, but we already checked for that case above.
1724 Register zeros = scratch2; 1724 Register zeros = scratch2;
1725 __ CountLeadingZeros(ival, scratch1, zeros); 1725 __ CountLeadingZeros(zeros, ival, scratch1);
1726 1726
1727 // Compute exponent and or it into the exponent register. 1727 // Compute exponent and or it into the exponent register.
1728 __ rsb(scratch1, 1728 __ rsb(scratch1,
1729 zeros, 1729 zeros,
1730 Operand((kBitsPerInt - 1) + kBinary32ExponentBias)); 1730 Operand((kBitsPerInt - 1) + kBinary32ExponentBias));
1731 1731
1732 __ orr(fval, 1732 __ orr(fval,
1733 fval, 1733 fval,
1734 Operand(scratch1, LSL, kBinary32ExponentShift)); 1734 Operand(scratch1, LSL, kBinary32ExponentShift));
1735 1735
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
2137 GenerateMiss(masm); 2137 GenerateMiss(masm);
2138 } 2138 }
2139 2139
2140 2140
2141 #undef __ 2141 #undef __
2142 2142
2143 2143
2144 } } // namespace v8::internal 2144 } } // namespace v8::internal
2145 2145
2146 #endif // V8_TARGET_ARCH_ARM 2146 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698