diff options
Diffstat (limited to 'deps/v8/src/x87/assembler-x87.h')
-rw-r--r-- | deps/v8/src/x87/assembler-x87.h | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/deps/v8/src/x87/assembler-x87.h b/deps/v8/src/x87/assembler-x87.h index 15fc29c29f..96eced9624 100644 --- a/deps/v8/src/x87/assembler-x87.h +++ b/deps/v8/src/x87/assembler-x87.h @@ -272,6 +272,7 @@ class Immediate BASE_EMBEDDED { inline explicit Immediate(Handle<Object> handle); inline explicit Immediate(Smi* value); inline explicit Immediate(Address addr); + inline explicit Immediate(Address x, RelocInfo::Mode rmode); static Immediate CodeRelativeOffset(Label* label) { return Immediate(label); @@ -281,9 +282,15 @@ class Immediate BASE_EMBEDDED { bool is_int8() const { return -128 <= x_ && x_ < 128 && RelocInfo::IsNone(rmode_); } + bool is_uint8() const { + return v8::internal::is_uint8(x_) && RelocInfo::IsNone(rmode_); + } bool is_int16() const { return -32768 <= x_ && x_ < 32768 && RelocInfo::IsNone(rmode_); } + bool is_uint16() const { + return v8::internal::is_uint16(x_) && RelocInfo::IsNone(rmode_); + } private: inline explicit Immediate(Label* value); @@ -659,13 +666,18 @@ class Assembler : public AssemblerBase { void and_(const Operand& dst, Register src); void and_(const Operand& dst, const Immediate& x); - void cmpb(Register reg, int8_t imm8) { cmpb(Operand(reg), imm8); } - void cmpb(const Operand& op, int8_t imm8); + void cmpb(Register reg, Immediate imm8) { cmpb(Operand(reg), imm8); } + void cmpb(const Operand& op, Immediate imm8); void cmpb(Register reg, const Operand& op); void cmpb(const Operand& op, Register reg); + void cmpb(Register dst, Register src) { cmpb(Operand(dst), src); } void cmpb_al(const Operand& op); void cmpw_ax(const Operand& op); - void cmpw(const Operand& op, Immediate imm16); + void cmpw(const Operand& dst, Immediate src); + void cmpw(Register dst, Immediate src) { cmpw(Operand(dst), src); } + void cmpw(Register dst, const Operand& src); + void cmpw(Register dst, Register src) { cmpw(Operand(dst), src); } + void cmpw(const Operand& dst, Register src); void cmp(Register reg, int32_t imm32); void cmp(Register reg, Handle<Object> handle); void cmp(Register reg0, Register reg1) { cmp(reg0, Operand(reg1)); } @@ -731,21 +743,20 @@ class Assembler : public AssemblerBase { void sbb(Register dst, const Operand& src); - void shld(Register dst, Register src) { shld(dst, Operand(src)); } - void shld(Register dst, const Operand& src); - void shl(Register dst, uint8_t imm8) { shl(Operand(dst), imm8); } void shl(const Operand& dst, uint8_t imm8); void shl_cl(Register dst) { shl_cl(Operand(dst)); } void shl_cl(const Operand& dst); - - void shrd(Register dst, Register src) { shrd(dst, Operand(src)); } - void shrd(Register dst, const Operand& src); + void shld(Register dst, Register src, uint8_t shift); + void shld_cl(Register dst, Register src); void shr(Register dst, uint8_t imm8) { shr(Operand(dst), imm8); } void shr(const Operand& dst, uint8_t imm8); void shr_cl(Register dst) { shr_cl(Operand(dst)); } void shr_cl(const Operand& dst); + void shrd(Register dst, Register src, uint8_t shift); + void shrd_cl(Register dst, Register src) { shrd_cl(Operand(dst), src); } + void shrd_cl(const Operand& dst, Register src); void sub(Register dst, const Immediate& imm) { sub(Operand(dst), imm); } void sub(const Operand& dst, const Immediate& x); @@ -756,10 +767,18 @@ class Assembler : public AssemblerBase { void test(Register reg, const Immediate& imm); void test(Register reg0, Register reg1) { test(reg0, Operand(reg1)); } void test(Register reg, const Operand& op); - void test_b(Register reg, const Operand& op); void test(const Operand& op, const Immediate& imm); - void test_b(Register reg, uint8_t imm8); - void test_b(const Operand& op, uint8_t imm8); + void test(const Operand& op, Register reg) { test(reg, op); } + void test_b(Register reg, const Operand& op); + void test_b(Register reg, Immediate imm8); + void test_b(const Operand& op, Immediate imm8); + void test_b(const Operand& op, Register reg) { test_b(reg, op); } + void test_b(Register dst, Register src) { test_b(dst, Operand(src)); } + void test_w(Register reg, const Operand& op); + void test_w(Register reg, Immediate imm16); + void test_w(const Operand& op, Immediate imm16); + void test_w(const Operand& op, Register reg) { test_w(reg, op); } + void test_w(Register dst, Register src) { test_w(dst, Operand(src)); } void xor_(Register dst, int32_t imm32); void xor_(Register dst, Register src) { xor_(dst, Operand(src)); } @@ -961,7 +980,9 @@ class Assembler : public AssemblerBase { static bool IsNop(Address addr); - PositionsRecorder* positions_recorder() { return &positions_recorder_; } + AssemblerPositionsRecorder* positions_recorder() { + return &positions_recorder_; + } int relocation_writer_size() { return (buffer_ + buffer_size_) - reloc_info_writer.pos(); @@ -1003,6 +1024,7 @@ class Assembler : public AssemblerBase { RelocInfo::Mode rmode, TypeFeedbackId id = TypeFeedbackId::None()); inline void emit(const Immediate& x); + inline void emit_b(Immediate x); inline void emit_w(const Immediate& x); inline void emit_q(uint64_t x); @@ -1048,8 +1070,8 @@ class Assembler : public AssemblerBase { // code generation RelocInfoWriter reloc_info_writer; - PositionsRecorder positions_recorder_; - friend class PositionsRecorder; + AssemblerPositionsRecorder positions_recorder_; + friend class AssemblerPositionsRecorder; }; |