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

Side by Side 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, 5 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 | Annotate | Revision Log
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 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 9120 matching lines...) Expand 10 before | Expand all | Expand 10 after
9131 Object* y; 9131 Object* y;
9132 }; 9132 };
9133 9133
9134 9134
9135 static inline ObjectPair MakePair(Object* x, Object* y) { 9135 static inline ObjectPair MakePair(Object* x, Object* y) {
9136 ObjectPair result = {x, y}; 9136 ObjectPair result = {x, y};
9137 // Pointers x and y returned in rax and rdx, in AMD-x64-abi. 9137 // Pointers x and y returned in rax and rdx, in AMD-x64-abi.
9138 // In Win64 they are assigned to a hidden first argument. 9138 // In Win64 they are assigned to a hidden first argument.
9139 return result; 9139 return result;
9140 } 9140 }
9141 #elif V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT
9142 // For x32 a 128-bit struct return is done as rax and rdx from the ObjectPair
9143 // are used in the full codegen and Crankshaft compiler. An alternative is
9144 // using uint64_t and modifying full codegen and Crankshaft compiler.
9145 struct ObjectPair {
9146 Object* x;
9147 uint32_t x_upper;
9148 Object* y;
9149 uint32_t y_upper;
9150 };
9151
9152
9153 static inline ObjectPair MakePair(Object* x, Object* y) {
9154 ObjectPair result = {x, 0, y, 0};
9155 // Pointers x and y returned in rax and rdx, in x32-abi.
9156 return result;
9157 }
9141 #else 9158 #else
9142 typedef uint64_t ObjectPair; 9159 typedef uint64_t ObjectPair;
9143 static inline ObjectPair MakePair(Object* x, Object* y) { 9160 static inline ObjectPair MakePair(Object* x, Object* y) {
9144 #if defined(V8_TARGET_LITTLE_ENDIAN) 9161 #if defined(V8_TARGET_LITTLE_ENDIAN)
9145 return reinterpret_cast<uint32_t>(x) | 9162 return reinterpret_cast<uint32_t>(x) |
9146 (reinterpret_cast<ObjectPair>(y) << 32); 9163 (reinterpret_cast<ObjectPair>(y) << 32);
9147 #elif defined(V8_TARGET_BIG_ENDIAN) 9164 #elif defined(V8_TARGET_BIG_ENDIAN)
9148 return reinterpret_cast<uint32_t>(y) | 9165 return reinterpret_cast<uint32_t>(y) |
9149 (reinterpret_cast<ObjectPair>(x) << 32); 9166 (reinterpret_cast<ObjectPair>(x) << 32);
9150 #else 9167 #else
(...skipping 5958 matching lines...) Expand 10 before | Expand all | Expand 10 after
15109 } 15126 }
15110 return NULL; 15127 return NULL;
15111 } 15128 }
15112 15129
15113 15130
15114 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15131 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15115 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15132 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15116 } 15133 }
15117 15134
15118 } } // namespace v8::internal 15135 } } // namespace v8::internal
OLDNEW
« 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