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

Unified Diff: src/base/bits.cc

Issue 974313002: [turbofan] Support for %_DoubleHi, %_DoubleLo and %_ConstructDouble. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: arm port. Created 5 years, 10 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
Index: src/base/bits.cc
diff --git a/src/base/bits.cc b/src/base/bits.cc
index 74d747fc9059f135cc2986b9b73f6ce473391534..09e6d29e363c23bdbe3414b8ab0fc99d07a573cf 100644
--- a/src/base/bits.cc
+++ b/src/base/bits.cc
@@ -48,6 +48,23 @@ int32_t SignedMod32(int32_t lhs, int32_t rhs) {
return lhs % rhs;
}
+
+uint64_t InsertElement64(uint64_t val, uint32_t elm, uint8_t off) {
+ switch (off) {
+ case 0:
+ val &= ~V8_UINT64_C(0xFFFFFFFF);
+ val |= static_cast<uint64_t>(elm) << 0;
+ return val;
+ case 1:
+ val &= V8_UINT64_C(0xFFFFFFFF);
+ val |= static_cast<uint64_t>(elm) << 32;
+ return val;
+ default:
+ UNREACHABLE();
+ return 0;
+ }
+}
+
} // namespace bits
} // namespace base
} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698