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

Side by Side Diff: src/mips64/constants-mips64.h

Issue 1488613007: MIPS: Correct handling of Nan values on MIPS R6 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_MIPS_CONSTANTS_H_ 5 #ifndef V8_MIPS_CONSTANTS_H_
6 #define V8_MIPS_CONSTANTS_H_ 6 #define V8_MIPS_CONSTANTS_H_
7 7
8 #include "src/base/logging.h" 8 #include "src/base/logging.h"
9 #include "src/base/macros.h" 9 #include "src/base/macros.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 const int kPCRegister = 34; 112 const int kPCRegister = 34;
113 113
114 // Number coprocessor registers. 114 // Number coprocessor registers.
115 const int kNumFPURegisters = 32; 115 const int kNumFPURegisters = 32;
116 const int kInvalidFPURegister = -1; 116 const int kInvalidFPURegister = -1;
117 117
118 // FPU (coprocessor 1) control registers. Currently only FCSR is implemented. 118 // FPU (coprocessor 1) control registers. Currently only FCSR is implemented.
119 const int kFCSRRegister = 31; 119 const int kFCSRRegister = 31;
120 const int kInvalidFPUControlRegister = -1; 120 const int kInvalidFPUControlRegister = -1;
121 const uint32_t kFPUInvalidResult = static_cast<uint32_t>(1 << 31) - 1; 121 const uint32_t kFPUInvalidResult = static_cast<uint32_t>(1 << 31) - 1;
122 const int32_t kFPUInvalidResultNegative = static_cast<int32_t>(1 << 31);
122 const uint64_t kFPU64InvalidResult = 123 const uint64_t kFPU64InvalidResult =
123 static_cast<uint64_t>(static_cast<uint64_t>(1) << 63) - 1; 124 static_cast<uint64_t>(static_cast<uint64_t>(1) << 63) - 1;
125 const int64_t kFPU64InvalidResultNegative =
126 static_cast<int64_t>(static_cast<uint64_t>(1) << 63);
124 127
125 // FCSR constants. 128 // FCSR constants.
126 const uint32_t kFCSRInexactFlagBit = 2; 129 const uint32_t kFCSRInexactFlagBit = 2;
127 const uint32_t kFCSRUnderflowFlagBit = 3; 130 const uint32_t kFCSRUnderflowFlagBit = 3;
128 const uint32_t kFCSROverflowFlagBit = 4; 131 const uint32_t kFCSROverflowFlagBit = 4;
129 const uint32_t kFCSRDivideByZeroFlagBit = 5; 132 const uint32_t kFCSRDivideByZeroFlagBit = 5;
130 const uint32_t kFCSRInvalidOpFlagBit = 6; 133 const uint32_t kFCSRInvalidOpFlagBit = 6;
134 const uint32_t kFCSRNaN2008FlagBit = 18;
131 135
132 const uint32_t kFCSRInexactFlagMask = 1 << kFCSRInexactFlagBit; 136 const uint32_t kFCSRInexactFlagMask = 1 << kFCSRInexactFlagBit;
133 const uint32_t kFCSRUnderflowFlagMask = 1 << kFCSRUnderflowFlagBit; 137 const uint32_t kFCSRUnderflowFlagMask = 1 << kFCSRUnderflowFlagBit;
134 const uint32_t kFCSROverflowFlagMask = 1 << kFCSROverflowFlagBit; 138 const uint32_t kFCSROverflowFlagMask = 1 << kFCSROverflowFlagBit;
135 const uint32_t kFCSRDivideByZeroFlagMask = 1 << kFCSRDivideByZeroFlagBit; 139 const uint32_t kFCSRDivideByZeroFlagMask = 1 << kFCSRDivideByZeroFlagBit;
136 const uint32_t kFCSRInvalidOpFlagMask = 1 << kFCSRInvalidOpFlagBit; 140 const uint32_t kFCSRInvalidOpFlagMask = 1 << kFCSRInvalidOpFlagBit;
141 const uint32_t kFCSRNaN2008FlagMask = 1 << kFCSRNaN2008FlagBit;
137 142
138 const uint32_t kFCSRFlagMask = 143 const uint32_t kFCSRFlagMask =
139 kFCSRInexactFlagMask | 144 kFCSRInexactFlagMask |
140 kFCSRUnderflowFlagMask | 145 kFCSRUnderflowFlagMask |
141 kFCSROverflowFlagMask | 146 kFCSROverflowFlagMask |
142 kFCSRDivideByZeroFlagMask | 147 kFCSRDivideByZeroFlagMask |
143 kFCSRInvalidOpFlagMask; 148 kFCSRInvalidOpFlagMask;
144 149
145 const uint32_t kFCSRExceptionFlagMask = kFCSRFlagMask ^ kFCSRInexactFlagMask; 150 const uint32_t kFCSRExceptionFlagMask = kFCSRFlagMask ^ kFCSRInexactFlagMask;
146 151
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 } 1260 }
1256 return kUnsupported; 1261 return kUnsupported;
1257 } 1262 }
1258 1263
1259 #undef OpcodeToBitNumber 1264 #undef OpcodeToBitNumber
1260 #undef FunctionFieldToBitNumber 1265 #undef FunctionFieldToBitNumber
1261 } // namespace internal 1266 } // namespace internal
1262 } // namespace v8 1267 } // namespace v8
1263 1268
1264 #endif // #ifndef V8_MIPS_CONSTANTS_H_ 1269 #endif // #ifndef V8_MIPS_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698