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

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

Issue 144963003: A64: add missing files. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 a24ab5310723c0e108adbd27f4aafb5a081aa317..d47f93bc273c1e3bf384aaa1e136f121910d2300 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,56 +25,48 @@
// (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.
+const RegList kSafepointSavedRegisters =
+ CPURegList::GetSafepointSavedRegisters().list();
+const int 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;
+ static const int kCallerFPOffset = -3 * kPointerSize;
};
class ExitFrameConstants : public AllStatic {
public:
- static const int kCodeOffset = -2 * kPointerSize;
- static const int kSPOffset = -1 * kPointerSize;
-
- static const int kCallerFPOffset = +0 * kPointerSize;
- static const int kCallerPCOffset = +1 * kPointerSize;
-
- // FP-relative displacement of the caller's SP. It points just
- // below the saved PC.
- static const int kCallerSPDisplacement = +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 kCallerSavedRegsOffset = -3 * kPointerSize;
};
@@ -82,12 +74,12 @@ class JavaScriptFrameConstants : public AllStatic {
public:
// FP-relative.
static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset;
- static const int kLastParameterOffset = +2 * kPointerSize;
- 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;
};
@@ -104,13 +96,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;
};
@@ -126,6 +118,7 @@ inline Object* JavaScriptFrame::function_slot_object() const {
return Memory::Object_at(fp() + offset);
}
+
} } // 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