~yolanda.robla/ubuntu/trusty/nodejs/add_distribution

« back to all changes in this revision

Viewing changes to deps/v8/src/arm/frames-arm.h

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2013-08-14 00:16:46 UTC
  • mfrom: (7.1.40 sid)
  • Revision ID: package-import@ubuntu.com-20130814001646-bzlysfh8sd6mukbo
Tags: 0.10.15~dfsg1-4
* Update 2005 patch, adding a handful of tests that can fail on
  slow platforms.
* Add 1004 patch to fix test failures when writing NaN to buffer
  on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Copyright 2011 the V8 project authors. All rights reserved.
 
1
// Copyright 2012 the V8 project authors. All rights reserved.
2
2
// Redistribution and use in source and binary forms, with or without
3
3
// modification, are permitted provided that the following conditions are
4
4
// met:
35
35
// The ARM ABI does not specify the usage of register r9, which may be reserved
36
36
// as the static base or thread register on some platforms, in which case we
37
37
// leave it alone. Adjust the value of kR9Available accordingly:
38
 
static const int kR9Available = 1;  // 1 if available to us, 0 if reserved
 
38
const int kR9Available = 1;  // 1 if available to us, 0 if reserved
39
39
 
40
40
 
41
41
// Register list in load/store instructions
42
42
// Note that the bit values must match those used in actual instruction encoding
43
 
static const int kNumRegs = 16;
 
43
const int kNumRegs = 16;
44
44
 
45
45
 
46
46
// Caller-saved/arguments registers
47
 
static const RegList kJSCallerSaved =
 
47
const RegList kJSCallerSaved =
48
48
  1 << 0 |  // r0 a1
49
49
  1 << 1 |  // r1 a2
50
50
  1 << 2 |  // r2 a3
51
51
  1 << 3;   // r3 a4
52
52
 
53
 
static const int kNumJSCallerSaved = 4;
 
53
const int kNumJSCallerSaved = 4;
54
54
 
55
55
typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved];
56
56
 
60
60
 
61
61
 
62
62
// Callee-saved registers preserved when switching from C to JavaScript
63
 
static const RegList kCalleeSaved =
 
63
const RegList kCalleeSaved =
64
64
  1 <<  4 |  //  r4 v1
65
65
  1 <<  5 |  //  r5 v2
66
66
  1 <<  6 |  //  r6 v3
70
70
  1 << 10 |  // r10 v7
71
71
  1 << 11;   // r11 v8 (fp in JavaScript code)
72
72
 
73
 
static const int kNumCalleeSaved = 7 + kR9Available;
 
73
// When calling into C++ (only for C++ calls that can't cause a GC).
 
74
// The call code will take care of lr, fp, etc.
 
75
const RegList kCallerSaved =
 
76
  1 <<  0 |  // r0
 
77
  1 <<  1 |  // r1
 
78
  1 <<  2 |  // r2
 
79
  1 <<  3 |  // r3
 
80
  1 <<  9;   // r9
 
81
 
 
82
 
 
83
const int kNumCalleeSaved = 7 + kR9Available;
74
84
 
75
85
// Double registers d8 to d15 are callee-saved.
76
 
static const int kNumDoubleCalleeSaved = 8;
 
86
const int kNumDoubleCalleeSaved = 8;
77
87
 
78
88
 
79
89
// Number of registers for which space is reserved in safepoints. Must be a
80
90
// multiple of 8.
81
91
// TODO(regis): Only 8 registers may actually be sufficient. Revisit.
82
 
static const int kNumSafepointRegisters = 16;
 
92
const int kNumSafepointRegisters = 16;
83
93
 
84
94
// Define the list of registers actually saved at safepoints.
85
95
// Note that the number of saved registers may be smaller than the reserved
86
96
// space, i.e. kNumSafepointSavedRegisters <= kNumSafepointRegisters.
87
 
static const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved;
88
 
static const int kNumSafepointSavedRegisters =
89
 
    kNumJSCallerSaved + kNumCalleeSaved;
 
97
const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved;
 
98
const int kNumSafepointSavedRegisters = kNumJSCallerSaved + kNumCalleeSaved;
90
99
 
91
100
// ----------------------------------------------------
92
101
 
93
102
 
94
103
class StackHandlerConstants : public AllStatic {
95
104
 public:
96
 
  static const int kNextOffset    = 0 * kPointerSize;
97
 
  static const int kStateOffset   = 1 * kPointerSize;
98
 
  static const int kContextOffset = 2 * kPointerSize;
99
 
  static const int kFPOffset      = 3 * kPointerSize;
100
 
  static const int kPCOffset      = 4 * kPointerSize;
 
105
  static const int kNextOffset     = 0 * kPointerSize;
 
106
  static const int kCodeOffset     = 1 * kPointerSize;
 
107
  static const int kStateOffset    = 2 * kPointerSize;
 
108
  static const int kContextOffset  = 3 * kPointerSize;
 
109
  static const int kFPOffset       = 4 * kPointerSize;
101
110
 
102
 
  static const int kSize = kPCOffset + kPointerSize;
 
111
  static const int kSize = kFPOffset + kPointerSize;
103
112
};
104
113
 
105
114
 
127
136
 
128
137
class StandardFrameConstants : public AllStatic {
129
138
 public:
 
139
  // Fixed part of the frame consists of return address, caller fp,
 
140
  // context and function.
 
141
  static const int kFixedFrameSize    =  4 * kPointerSize;
130
142
  static const int kExpressionsOffset = -3 * kPointerSize;
131
143
  static const int kMarkerOffset      = -2 * kPointerSize;
132
144
  static const int kContextOffset     = -1 * kPointerSize;
152
164
class ArgumentsAdaptorFrameConstants : public AllStatic {
153
165
 public:
154
166
  static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
 
167
  static const int kFrameSize =
 
168
      StandardFrameConstants::kFixedFrameSize + kPointerSize;
155
169
};
156
170
 
157
171