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

Unified Diff: src/a64/frames-a64.h

Issue 148293020: Merge experimental/a64 to bleeding_edge. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove ARM from OWNERS Created 6 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
« no previous file with comments | « src/a64/disasm-a64.cc ('k') | src/a64/frames-a64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/frames-a64.h
diff --git a/src/x64/frames-x64.h b/src/a64/frames-a64.h
similarity index 63%
copy from src/x64/frames-x64.h
copy to src/a64/frames-a64.h
index 6eb02a9179c64f3fca37202878b2765c3041071e..5ef768164579091ec1f36e974d4169a58c514932 100644
--- a/src/x64/frames-x64.h
+++ b/src/a64/frames-a64.h
@@ -1,4 +1,4 @@
-// Copyright 2012 the V8 project authors. All rights reserved.
+// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,58 +25,50 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_X64_FRAMES_X64_H_
-#define V8_X64_FRAMES_X64_H_
+#include "a64/constants-a64.h"
+#include "a64/assembler-a64.h"
+
+#ifndef V8_A64_FRAMES_A64_H_
+#define V8_A64_FRAMES_A64_H_
namespace v8 {
namespace internal {
-const int kNumRegs = 16;
-const RegList kJSCallerSaved =
- 1 << 0 | // rax
- 1 << 1 | // rcx
- 1 << 2 | // rdx
- 1 << 3 | // rbx - used as a caller-saved register in JavaScript code
- 1 << 7; // rdi - callee function
-
-const int kNumJSCallerSaved = 5;
-
+const int kNumRegs = kNumberOfRegisters;
+// Registers x0-x17 are caller-saved.
+const int kNumJSCallerSaved = 18;
+const RegList kJSCallerSaved = 0x3ffff;
typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved];
-// Number of registers for which space is reserved in safepoints.
-const int kNumSafepointRegisters = 16;
+// Number of registers for which space is reserved in safepoints. Must be a
+// multiple of eight.
+// TODO(all): Refine this number.
+const int kNumSafepointRegisters = 32;
-// ----------------------------------------------------
+// Define the list of registers actually saved at safepoints.
+// Note that the number of saved registers may be smaller than the reserved
+// space, i.e. kNumSafepointSavedRegisters <= kNumSafepointRegisters.
+#define kSafepointSavedRegisters CPURegList::GetSafepointSavedRegisters().list()
+#define kNumSafepointSavedRegisters \
+ CPURegList::GetSafepointSavedRegisters().Count();
class EntryFrameConstants : public AllStatic {
public:
-#ifdef _WIN64
- static const int kCalleeSaveXMMRegisters = 10;
- static const int kXMMRegisterSize = 16;
- static const int kXMMRegistersBlockSize =
- kXMMRegisterSize * kCalleeSaveXMMRegisters;
static const int kCallerFPOffset =
- -10 * kPointerSize - kXMMRegistersBlockSize;
-#else
- static const int kCallerFPOffset = -8 * kPointerSize;
-#endif
- static const int kArgvOffset = 6 * kPointerSize;
+ -(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize);
};
class ExitFrameConstants : public AllStatic {
public:
- static const int kFrameSize = 2 * kPointerSize;
-
- static const int kCodeOffset = -2 * kPointerSize;
- static const int kSPOffset = -1 * kPointerSize;
-
- static const int kCallerFPOffset = +0 * kPointerSize;
- static const int kCallerPCOffset = kFPOnStackSize;
-
- // FP-relative displacement of the caller's SP. It points just
- // below the saved PC.
- static const int kCallerSPDisplacement = kCallerPCOffset + kPCOnStackSize;
+ static const int kFrameSize = 2 * kPointerSize;
+
+ static const int kCallerSPDisplacement = 2 * kPointerSize;
+ static const int kCallerPCOffset = 1 * kPointerSize;
+ static const int kCallerFPOffset = 0 * kPointerSize; // <- fp
+ static const int kSPOffset = -1 * kPointerSize;
+ static const int kCodeOffset = -2 * kPointerSize;
+ static const int kLastExitFrameField = kCodeOffset;
};
@@ -84,12 +76,12 @@ class JavaScriptFrameConstants : public AllStatic {
public:
// FP-relative.
static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset;
- static const int kLastParameterOffset = kFPOnStackSize + kPCOnStackSize;
- static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset;
- // Caller SP-relative.
- static const int kParam0Offset = -2 * kPointerSize;
- static const int kReceiverOffset = -1 * kPointerSize;
+ // There are two words on the stack (saved fp and saved lr) between fp and
+ // the arguments.
+ static const int kLastParameterOffset = 2 * kPointerSize;
+
+ static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset;
};
@@ -106,13 +98,13 @@ class ArgumentsAdaptorFrameConstants : public AllStatic {
class ConstructFrameConstants : public AllStatic {
public:
// FP-relative.
- static const int kImplicitReceiverOffset = -5 * kPointerSize;
- static const int kConstructorOffset = kMinInt;
- static const int kLengthOffset = -4 * kPointerSize;
static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
+ static const int kLengthOffset = -4 * kPointerSize;
+ static const int kConstructorOffset = -5 * kPointerSize;
+ static const int kImplicitReceiverOffset = -6 * kPointerSize;
static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
+ StandardFrameConstants::kFixedFrameSize + 4 * kPointerSize;
};
@@ -136,4 +128,4 @@ inline void StackHandler::SetFp(Address slot, Address fp) {
} } // namespace v8::internal
-#endif // V8_X64_FRAMES_X64_H_
+#endif // V8_A64_FRAMES_A64_H_
« no previous file with comments | « src/a64/disasm-a64.cc ('k') | src/a64/frames-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698