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

Unified Diff: src/utils.h

Issue 213943002: Change arm64 simulator register backing store. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« src/arm64/simulator-arm64.cc ('K') | « src/arm64/simulator-arm64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils.h
diff --git a/src/utils.h b/src/utils.h
index eeb098752198d4f1ef6333bf64464e90113f61d7..d5b7274e95eed58e4b17c39006e6dc0ccb99eade 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -233,6 +233,25 @@ inline int32_t WhichPowerOf2Abs(int32_t x) {
}
+// Obtains the unsigned type corresponding to T
+// available in C++11 as std::make_unsigned
+template<typename T>
+struct make_unsigned {
+ typedef T type;
+};
+
+
+// Template specializations necessary to have make_unsigned work
+template<> struct make_unsigned<int32_t> {
+ typedef uint32_t type;
+};
+
+
+template<> struct make_unsigned<int64_t> {
+ typedef uint64_t type;
+};
+
+
// ----------------------------------------------------------------------------
// BitField is a help template for encoding and decode bitfield with
// unsigned content.
« src/arm64/simulator-arm64.cc ('K') | « src/arm64/simulator-arm64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698