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

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

Issue 121303005: Use std:: on symbols declared in C++-style C headers. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Same as the previous CL, but with an addition to cctest/test-log.cc Created 6 years, 11 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
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | test/cctest/test-api.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 } else { 1116 } else {
1117 Register reg1 = ToRegister(instr->temp()); 1117 Register reg1 = ToRegister(instr->temp());
1118 Register reg2 = ToRegister(instr->result()); 1118 Register reg2 = ToRegister(instr->result());
1119 1119
1120 // Find b which: 2^b < divisor_abs < 2^(b+1). 1120 // Find b which: 2^b < divisor_abs < 2^(b+1).
1121 unsigned b = 31 - CompilerIntrinsics::CountLeadingZeros(divisor_abs); 1121 unsigned b = 31 - CompilerIntrinsics::CountLeadingZeros(divisor_abs);
1122 unsigned shift = 32 + b; // Precision +1bit (effectively). 1122 unsigned shift = 32 + b; // Precision +1bit (effectively).
1123 double multiplier_f = 1123 double multiplier_f =
1124 static_cast<double>(static_cast<uint64_t>(1) << shift) / divisor_abs; 1124 static_cast<double>(static_cast<uint64_t>(1) << shift) / divisor_abs;
1125 int64_t multiplier; 1125 int64_t multiplier;
1126 if (multiplier_f - floor(multiplier_f) < 0.5) { 1126 if (multiplier_f - std::floor(multiplier_f) < 0.5) {
1127 multiplier = static_cast<int64_t>(floor(multiplier_f)); 1127 multiplier = static_cast<int64_t>(std::floor(multiplier_f));
1128 } else { 1128 } else {
1129 multiplier = static_cast<int64_t>(floor(multiplier_f)) + 1; 1129 multiplier = static_cast<int64_t>(std::floor(multiplier_f)) + 1;
1130 } 1130 }
1131 // The multiplier is a uint32. 1131 // The multiplier is a uint32.
1132 ASSERT(multiplier > 0 && 1132 ASSERT(multiplier > 0 &&
1133 multiplier < (static_cast<int64_t>(1) << 32)); 1133 multiplier < (static_cast<int64_t>(1) << 32));
1134 // The multiply is int64, so sign-extend to r64. 1134 // The multiply is int64, so sign-extend to r64.
1135 __ movsxlq(reg1, dividend); 1135 __ movsxlq(reg1, dividend);
1136 if (divisor < 0 && 1136 if (divisor < 0 &&
1137 instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { 1137 instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
1138 __ neg(reg1); 1138 __ neg(reg1);
1139 DeoptimizeIf(zero, instr->environment()); 1139 DeoptimizeIf(zero, instr->environment());
(...skipping 4489 matching lines...) Expand 10 before | Expand all | Expand 10 after
5629 FixedArray::kHeaderSize - kPointerSize)); 5629 FixedArray::kHeaderSize - kPointerSize));
5630 __ bind(&done); 5630 __ bind(&done);
5631 } 5631 }
5632 5632
5633 5633
5634 #undef __ 5634 #undef __
5635 5635
5636 } } // namespace v8::internal 5636 } } // namespace v8::internal
5637 5637
5638 #endif // V8_TARGET_ARCH_X64 5638 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698