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

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

Issue 813813003: Revert of Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 < std::numeric_limits<double>::min() && 1207 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) {
1208 rounded > -std::numeric_limits<double>::min() && rounded != 0) {
1209 set_fcsr_bit(kFCSRUnderflowFlagBit, true); 1208 set_fcsr_bit(kFCSRUnderflowFlagBit, true);
1210 ret = true; 1209 ret = true;
1211 } 1210 }
1212 1211
1213 if (rounded > max_int32 || rounded < min_int32) { 1212 if (rounded > max_int32 || rounded < min_int32) {
1214 set_fcsr_bit(kFCSROverflowFlagBit, true); 1213 set_fcsr_bit(kFCSROverflowFlagBit, true);
1215 // The reference is not really clear but it seems this is required: 1214 // The reference is not really clear but it seems this is required:
1216 set_fcsr_bit(kFCSRInvalidOpFlagBit, true); 1215 set_fcsr_bit(kFCSRInvalidOpFlagBit, true);
1217 ret = true; 1216 ret = true;
1218 } 1217 }
(...skipping 11 matching lines...) Expand all
1230 1229
1231 if (!std::isfinite(original) || !std::isfinite(rounded)) { 1230 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1232 set_fcsr_bit(kFCSRInvalidOpFlagBit, true); 1231 set_fcsr_bit(kFCSRInvalidOpFlagBit, true);
1233 ret = true; 1232 ret = true;
1234 } 1233 }
1235 1234
1236 if (original != rounded) { 1235 if (original != rounded) {
1237 set_fcsr_bit(kFCSRInexactFlagBit, true); 1236 set_fcsr_bit(kFCSRInexactFlagBit, true);
1238 } 1237 }
1239 1238
1240 if (rounded < std::numeric_limits<double>::min() && 1239 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) {
1241 rounded > -std::numeric_limits<double>::min() && rounded != 0) {
1242 set_fcsr_bit(kFCSRUnderflowFlagBit, true); 1240 set_fcsr_bit(kFCSRUnderflowFlagBit, true);
1243 ret = true; 1241 ret = true;
1244 } 1242 }
1245 1243
1246 if (rounded > max_int64 || rounded < min_int64) { 1244 if (rounded > max_int64 || rounded < min_int64) {
1247 set_fcsr_bit(kFCSROverflowFlagBit, true); 1245 set_fcsr_bit(kFCSROverflowFlagBit, true);
1248 // The reference is not really clear but it seems this is required: 1246 // The reference is not really clear but it seems this is required:
1249 set_fcsr_bit(kFCSRInvalidOpFlagBit, true); 1247 set_fcsr_bit(kFCSRInvalidOpFlagBit, true);
1250 ret = true; 1248 ret = true;
1251 } 1249 }
(...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after
3449 } 3447 }
3450 3448
3451 3449
3452 #undef UNSUPPORTED 3450 #undef UNSUPPORTED
3453 3451
3454 } } // namespace v8::internal 3452 } } // namespace v8::internal
3455 3453
3456 #endif // USE_SIMULATOR 3454 #endif // USE_SIMULATOR
3457 3455
3458 #endif // V8_TARGET_ARCH_MIPS64 3456 #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