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

Side by Side Diff: src/mips64/simulator-mips64.cc

Issue 798413003: Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Svens smiley. Created 6 years 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/mips64/lithium-codegen-mips64.cc ('k') | src/ppc/code-stubs-ppc.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> 5 #include <limits.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 1197
1198 if (!std::isfinite(original) || !std::isfinite(rounded)) { 1198 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1199 set_fcsr_bit(kFCSRInvalidOpFlagBit, true); 1199 set_fcsr_bit(kFCSRInvalidOpFlagBit, true);
1200 ret = true; 1200 ret = true;
1201 } 1201 }
1202 1202
1203 if (original != rounded) { 1203 if (original != rounded) {
1204 set_fcsr_bit(kFCSRInexactFlagBit, true); 1204 set_fcsr_bit(kFCSRInexactFlagBit, true);
1205 } 1205 }
1206 1206
1207 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) { 1207 if (rounded < std::numeric_limits<double>::min() &&
1208 rounded > -std::numeric_limits<double>::min() && rounded != 0) {
1208 set_fcsr_bit(kFCSRUnderflowFlagBit, true); 1209 set_fcsr_bit(kFCSRUnderflowFlagBit, true);
1209 ret = true; 1210 ret = true;
1210 } 1211 }
1211 1212
1212 if (rounded > max_int32 || rounded < min_int32) { 1213 if (rounded > max_int32 || rounded < min_int32) {
1213 set_fcsr_bit(kFCSROverflowFlagBit, true); 1214 set_fcsr_bit(kFCSROverflowFlagBit, true);
1214 // The reference is not really clear but it seems this is required: 1215 // The reference is not really clear but it seems this is required:
1215 set_fcsr_bit(kFCSRInvalidOpFlagBit, true); 1216 set_fcsr_bit(kFCSRInvalidOpFlagBit, true);
1216 ret = true; 1217 ret = true;
1217 } 1218 }
(...skipping 11 matching lines...) Expand all
1229 1230
1230 if (!std::isfinite(original) || !std::isfinite(rounded)) { 1231 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1231 set_fcsr_bit(kFCSRInvalidOpFlagBit, true); 1232 set_fcsr_bit(kFCSRInvalidOpFlagBit, true);
1232 ret = true; 1233 ret = true;
1233 } 1234 }
1234 1235
1235 if (original != rounded) { 1236 if (original != rounded) {
1236 set_fcsr_bit(kFCSRInexactFlagBit, true); 1237 set_fcsr_bit(kFCSRInexactFlagBit, true);
1237 } 1238 }
1238 1239
1239 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) { 1240 if (rounded < std::numeric_limits<double>::min() &&
1241 rounded > -std::numeric_limits<double>::min() && rounded != 0) {
1240 set_fcsr_bit(kFCSRUnderflowFlagBit, true); 1242 set_fcsr_bit(kFCSRUnderflowFlagBit, true);
1241 ret = true; 1243 ret = true;
1242 } 1244 }
1243 1245
1244 if (rounded > max_int64 || rounded < min_int64) { 1246 if (rounded > max_int64 || rounded < min_int64) {
1245 set_fcsr_bit(kFCSROverflowFlagBit, true); 1247 set_fcsr_bit(kFCSROverflowFlagBit, true);
1246 // The reference is not really clear but it seems this is required: 1248 // The reference is not really clear but it seems this is required:
1247 set_fcsr_bit(kFCSRInvalidOpFlagBit, true); 1249 set_fcsr_bit(kFCSRInvalidOpFlagBit, true);
1248 ret = true; 1250 ret = true;
1249 } 1251 }
(...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after
3447 } 3449 }
3448 3450
3449 3451
3450 #undef UNSUPPORTED 3452 #undef UNSUPPORTED
3451 3453
3452 } } // namespace v8::internal 3454 } } // namespace v8::internal
3453 3455
3454 #endif // USE_SIMULATOR 3456 #endif // USE_SIMULATOR
3455 3457
3456 #endif // V8_TARGET_ARCH_MIPS64 3458 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698