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

Side by Side Diff: src/utils.h

Issue 2031873002: [deoptimizer] Support float registers and slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. Created 4 years, 6 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/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_UTILS_H_ 5 #ifndef V8_UTILS_H_
6 #define V8_UTILS_H_ 6 #define V8_UTILS_H_
7 7
8 #include <limits.h> 8 #include <limits.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 1517
1518 template <typename V> 1518 template <typename V>
1519 static inline void WriteUnalignedValue(void* p, V value) { 1519 static inline void WriteUnalignedValue(void* p, V value) {
1520 #if !(V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64) 1520 #if !(V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64)
1521 *(reinterpret_cast<V*>(p)) = value; 1521 *(reinterpret_cast<V*>(p)) = value;
1522 #else // V8_TARGET_ARCH_MIPS 1522 #else // V8_TARGET_ARCH_MIPS
1523 memmove(p, &value, sizeof(V)); 1523 memmove(p, &value, sizeof(V));
1524 #endif // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 1524 #endif // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
1525 } 1525 }
1526 1526
1527 static inline double ReadFloatValue(const void* p) {
1528 return ReadUnalignedValue<float>(p);
1529 }
1530
1527 static inline double ReadDoubleValue(const void* p) { 1531 static inline double ReadDoubleValue(const void* p) {
1528 return ReadUnalignedValue<double>(p); 1532 return ReadUnalignedValue<double>(p);
1529 } 1533 }
1530 1534
1531 static inline void WriteDoubleValue(void* p, double value) { 1535 static inline void WriteDoubleValue(void* p, double value) {
1532 WriteUnalignedValue(p, value); 1536 WriteUnalignedValue(p, value);
1533 } 1537 }
1534 1538
1535 static inline uint16_t ReadUnalignedUInt16(const void* p) { 1539 static inline uint16_t ReadUnalignedUInt16(const void* p) {
1536 return ReadUnalignedValue<uint16_t>(p); 1540 return ReadUnalignedValue<uint16_t>(p);
1537 } 1541 }
1538 1542
1539 static inline void WriteUnalignedUInt16(void* p, uint16_t value) { 1543 static inline void WriteUnalignedUInt16(void* p, uint16_t value) {
1540 WriteUnalignedValue(p, value); 1544 WriteUnalignedValue(p, value);
1541 } 1545 }
1542 1546
1543 static inline uint32_t ReadUnalignedUInt32(const void* p) { 1547 static inline uint32_t ReadUnalignedUInt32(const void* p) {
1544 return ReadUnalignedValue<uint32_t>(p); 1548 return ReadUnalignedValue<uint32_t>(p);
1545 } 1549 }
1546 1550
1547 static inline void WriteUnalignedUInt32(void* p, uint32_t value) { 1551 static inline void WriteUnalignedUInt32(void* p, uint32_t value) {
1548 WriteUnalignedValue(p, value); 1552 WriteUnalignedValue(p, value);
1549 } 1553 }
1550 1554
1551 } // namespace internal 1555 } // namespace internal
1552 } // namespace v8 1556 } // namespace v8
1553 1557
1554 #endif // V8_UTILS_H_ 1558 #endif // V8_UTILS_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698