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

Unified Diff: src/runtime.cc

Issue 18014003: Add X32 port into V8 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Rebased with bleeding_edge Created 6 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 side-by-side diff with in-line comments
Download patch
« src/base/build_config.h ('K') | « src/log.cc ('k') | src/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 3cb6fe20a20b752b42e042f33585459df27ef8aa..ca533df2c88578dd8708b649949145a4e7d76fb8 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -9138,6 +9138,23 @@ static inline ObjectPair MakePair(Object* x, Object* y) {
// In Win64 they are assigned to a hidden first argument.
return result;
}
+#elif V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT
+// For x32 a 128-bit struct return is done as rax and rdx from the ObjectPair
+// are used in the full codegen and Crankshaft compiler. An alternative is
+// using uint64_t and modifying full codegen and Crankshaft compiler.
+struct ObjectPair {
+ Object* x;
+ uint32_t x_upper;
+ Object* y;
+ uint32_t y_upper;
+};
+
+
+static inline ObjectPair MakePair(Object* x, Object* y) {
+ ObjectPair result = {x, 0, y, 0};
+ // Pointers x and y returned in rax and rdx, in x32-abi.
+ return result;
+}
#else
typedef uint64_t ObjectPair;
static inline ObjectPair MakePair(Object* x, Object* y) {
« src/base/build_config.h ('K') | « src/log.cc ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698