| OLD | NEW |
| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 #define REGISTER_CODE_LIST(R) \ | 35 #define REGISTER_CODE_LIST(R) \ |
| 36 R(0) R(1) R(2) R(3) R(4) R(5) R(6) R(7) \ | 36 R(0) R(1) R(2) R(3) R(4) R(5) R(6) R(7) \ |
| 37 R(8) R(9) R(10) R(11) R(12) R(13) R(14) R(15) \ | 37 R(8) R(9) R(10) R(11) R(12) R(13) R(14) R(15) \ |
| 38 R(16) R(17) R(18) R(19) R(20) R(21) R(22) R(23) \ | 38 R(16) R(17) R(18) R(19) R(20) R(21) R(22) R(23) \ |
| 39 R(24) R(25) R(26) R(27) R(28) R(29) R(30) R(31) | 39 R(24) R(25) R(26) R(27) R(28) R(29) R(30) R(31) |
| 40 | 40 |
| 41 namespace v8 { | 41 namespace v8 { |
| 42 namespace internal { | 42 namespace internal { |
| 43 | 43 |
| 44 // These are global assumptions in v8. |
| 45 STATIC_ASSERT((static_cast<int32_t>(-1) >> 1) == -1); |
| 46 STATIC_ASSERT((static_cast<uint32_t>(-1) >> 1) == 0x7FFFFFFF); |
| 47 |
| 44 // Floating point representation. | 48 // Floating point representation. |
| 45 static inline uint32_t float_to_rawbits(float value) { | 49 static inline uint32_t float_to_rawbits(float value) { |
| 46 uint32_t bits = 0; | 50 uint32_t bits = 0; |
| 47 memcpy(&bits, &value, 4); | 51 memcpy(&bits, &value, 4); |
| 48 return bits; | 52 return bits; |
| 49 } | 53 } |
| 50 | 54 |
| 51 | 55 |
| 52 static inline uint64_t double_to_rawbits(double value) { | 56 static inline uint64_t double_to_rawbits(double value) { |
| 53 uint64_t bits = 0; | 57 uint64_t bits = 0; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 104 |
| 101 | 105 |
| 102 template <typename T> | 106 template <typename T> |
| 103 inline bool IsQuietNaN(T num) { | 107 inline bool IsQuietNaN(T num) { |
| 104 return std::isnan(num) && !IsSignallingNaN(num); | 108 return std::isnan(num) && !IsSignallingNaN(num); |
| 105 } | 109 } |
| 106 | 110 |
| 107 } } // namespace v8::internal | 111 } } // namespace v8::internal |
| 108 | 112 |
| 109 #endif // V8_A64_UTILS_A64_H_ | 113 #endif // V8_A64_UTILS_A64_H_ |
| OLD | NEW |