| Index: src/x64/assembler-x64.h
|
| diff --git a/src/x64/assembler-x64.h b/src/x64/assembler-x64.h
|
| index 39a6863a0b2ab164e6fa8b5095e94a98f398ecfb..d81cb741011ba939b9ba5e08d68ada2cbb3bca25 100644
|
| --- a/src/x64/assembler-x64.h
|
| +++ b/src/x64/assembler-x64.h
|
| @@ -44,27 +44,6 @@ namespace internal {
|
|
|
| // Utility functions
|
|
|
| -// Test whether a 64-bit value is in a specific range.
|
| -inline bool is_uint32(int64_t x) {
|
| - static const uint64_t kMaxUInt32 = V8_UINT64_C(0xffffffff);
|
| - return static_cast<uint64_t>(x) <= kMaxUInt32;
|
| -}
|
| -
|
| -inline bool is_int32(int64_t x) {
|
| - static const int64_t kMinInt32 = -V8_INT64_C(0x80000000);
|
| - return is_uint32(x - kMinInt32);
|
| -}
|
| -
|
| -inline bool uint_is_int32(uint64_t x) {
|
| - static const uint64_t kMaxInt32 = V8_UINT64_C(0x7fffffff);
|
| - return x <= kMaxInt32;
|
| -}
|
| -
|
| -inline bool is_uint32(uint64_t x) {
|
| - static const uint64_t kMaxUInt32 = V8_UINT64_C(0xffffffff);
|
| - return x <= kMaxUInt32;
|
| -}
|
| -
|
| // CPU Registers.
|
| //
|
| // 1) We would prefer to use an enum, but enum values are assignment-
|
| @@ -395,7 +374,7 @@ enum ScaleFactor {
|
| times_4 = 2,
|
| times_8 = 3,
|
| times_int_size = times_4,
|
| - times_pointer_size = times_8
|
| + times_pointer_size = (kPointerSize == 8) ? times_8 : times_4
|
| };
|
|
|
|
|
| @@ -590,6 +569,15 @@ class Assembler : public AssemblerBase {
|
| set_target_address_at(instruction_payload, target);
|
| }
|
|
|
| + static inline RelocInfo::Mode RelocInfoNone() {
|
| + if (kPointerSize == kInt64Size) {
|
| + return RelocInfo::NONE64;
|
| + } else {
|
| + ASSERT(kPointerSize == kInt32Size);
|
| + return RelocInfo::NONE32;
|
| + }
|
| + }
|
| +
|
| inline Handle<Object> code_target_object_handle_at(Address pc);
|
| inline Address runtime_entry_at(Address pc);
|
| // Number of bytes taken up by the branch target in the code.
|
| @@ -1012,7 +1000,6 @@ class Assembler : public AssemblerBase {
|
| immediate_arithmetic_op_32(0x1, dst, src);
|
| }
|
|
|
| -
|
| void rcl(Register dst, Immediate imm8) {
|
| shift(dst, imm8, 0x2);
|
| }
|
| @@ -1207,6 +1194,7 @@ class Assembler : public AssemblerBase {
|
| // Bit operations.
|
| void bt(const Operand& dst, Register src);
|
| void bts(const Operand& dst, Register src);
|
| + void bsrl(Register dst, Register src);
|
|
|
| // Miscellaneous
|
| void clc();
|
| @@ -1252,9 +1240,6 @@ class Assembler : public AssemblerBase {
|
| // Call near absolute indirect, address in register
|
| void call(Register adr);
|
|
|
| - // Call near indirect
|
| - void call(const Operand& operand);
|
| -
|
| // Jumps
|
| // Jump short or near relative.
|
| // Use a 32-bit signed displacement.
|
| @@ -1266,9 +1251,6 @@ class Assembler : public AssemblerBase {
|
| // Jump near absolute indirect (r64)
|
| void jmp(Register adr);
|
|
|
| - // Jump near absolute indirect (m64)
|
| - void jmp(const Operand& src);
|
| -
|
| // Conditional jumps
|
| void j(Condition cc,
|
| Label* L,
|
| @@ -1491,6 +1473,13 @@ class Assembler : public AssemblerBase {
|
| byte byte_at(int pos) { return buffer_[pos]; }
|
| void set_byte_at(int pos, byte value) { buffer_[pos] = value; }
|
|
|
| + protected:
|
| + // Call near indirect
|
| + void call(const Operand& operand);
|
| +
|
| + // Jump near absolute indirect (m64)
|
| + void jmp(const Operand& src);
|
| +
|
| private:
|
| byte* addr_at(int pos) { return buffer_ + pos; }
|
| uint32_t long_at(int pos) {
|
|
|