summaryrefslogtreecommitdiff
path: root/deps/v8/src/x64/assembler-x64.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/x64/assembler-x64.h')
-rw-r--r--deps/v8/src/x64/assembler-x64.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/deps/v8/src/x64/assembler-x64.h b/deps/v8/src/x64/assembler-x64.h
index c3720784a0..e5711101bd 100644
--- a/deps/v8/src/x64/assembler-x64.h
+++ b/deps/v8/src/x64/assembler-x64.h
@@ -84,19 +84,6 @@ namespace internal {
// The length of pushq(rbp), movp(rbp, rsp), Push(rsi) and Push(rdi).
constexpr int kNoCodeAgeSequenceLength = kPointerSize == kInt64Size ? 6 : 17;
-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;
-
-// Number of registers for which space is reserved in safepoints.
-const int kNumSafepointRegisters = 16;
-
enum RegisterCode {
#define REGISTER_CODE(R) kRegCode_##R,
GENERAL_REGISTERS(REGISTER_CODE)
@@ -129,6 +116,19 @@ GENERAL_REGISTERS(DECLARE_REGISTER)
#undef DECLARE_REGISTER
constexpr Register no_reg = Register::no_reg();
+constexpr int kNumRegs = 16;
+
+constexpr RegList kJSCallerSaved =
+ Register::ListOf<rax, rcx, rdx,
+ rbx, // used as a caller-saved register in JavaScript code
+ rdi // callee function
+ >();
+
+constexpr int kNumJSCallerSaved = 5;
+
+// Number of registers for which space is reserved in safepoints.
+constexpr int kNumSafepointRegisters = 16;
+
#ifdef _WIN64
// Windows calling convention
constexpr Register arg_reg_1 = rcx;
@@ -446,14 +446,15 @@ class Assembler : public AssemblerBase {
// relocation information starting from the end of the buffer. See CodeDesc
// for a detailed comment on the layout (globals.h).
//
- // If the provided buffer is NULL, the assembler allocates and grows its own
- // buffer, and buffer_size determines the initial buffer size. The buffer is
- // owned by the assembler and deallocated upon destruction of the assembler.
+ // If the provided buffer is nullptr, the assembler allocates and grows its
+ // own buffer, and buffer_size determines the initial buffer size. The buffer
+ // is owned by the assembler and deallocated upon destruction of the
+ // assembler.
//
- // If the provided buffer is not NULL, the assembler uses the provided buffer
- // for code generation and assumes its size to be buffer_size. If the buffer
- // is too small, a fatal error occurs. No deallocation of the buffer is done
- // upon destruction of the assembler.
+ // If the provided buffer is not nullptr, the assembler uses the provided
+ // buffer for code generation and assumes its size to be buffer_size. If the
+ // buffer is too small, a fatal error occurs. No deallocation of the buffer is
+ // done upon destruction of the assembler.
Assembler(Isolate* isolate, void* buffer, int buffer_size)
: Assembler(IsolateData(isolate), buffer, buffer_size) {}
Assembler(IsolateData isolate_data, void* buffer, int buffer_size);
@@ -500,7 +501,7 @@ class Assembler : public AssemblerBase {
if (kPointerSize == kInt64Size) {
return RelocInfo::NONE64;
} else {
- DCHECK(kPointerSize == kInt32Size);
+ DCHECK_EQ(kPointerSize, kInt32Size);
return RelocInfo::NONE32;
}
}
@@ -884,6 +885,8 @@ class Assembler : public AssemblerBase {
// Call near relative 32-bit displacement, relative to next instruction.
void call(Label* L);
void call(Address entry, RelocInfo::Mode rmode);
+ void near_call(Address entry, RelocInfo::Mode rmode);
+ void near_jmp(Address entry, RelocInfo::Mode rmode);
void call(CodeStub* stub);
void call(Handle<Code> target,
RelocInfo::Mode rmode = RelocInfo::CODE_TARGET);
@@ -1923,8 +1926,6 @@ class Assembler : public AssemblerBase {
UNREACHABLE();
}
- void RecordProtectedInstructionLanding(int pc_offset);
-
// Writes a single word of data in the code stream.
// Used for inline tables, e.g., jump-tables.
void db(uint8_t data);
@@ -2068,7 +2069,7 @@ class Assembler : public AssemblerBase {
if (size == kInt64Size) {
emit_rex_64();
} else {
- DCHECK(size == kInt32Size);
+ DCHECK_EQ(size, kInt32Size);
}
}
@@ -2077,7 +2078,7 @@ class Assembler : public AssemblerBase {
if (size == kInt64Size) {
emit_rex_64(p1);
} else {
- DCHECK(size == kInt32Size);
+ DCHECK_EQ(size, kInt32Size);
emit_optional_rex_32(p1);
}
}
@@ -2087,7 +2088,7 @@ class Assembler : public AssemblerBase {
if (size == kInt64Size) {
emit_rex_64(p1, p2);
} else {
- DCHECK(size == kInt32Size);
+ DCHECK_EQ(size, kInt32Size);
emit_optional_rex_32(p1, p2);
}
}
@@ -2411,7 +2412,6 @@ class Assembler : public AssemblerBase {
bool is_optimizable_farjmp(int idx);
- friend class CodePatcher;
friend class EnsureSpace;
friend class RegExpMacroAssemblerX64;