Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/ia32/assembler-ia32.h')
-rw-r--r--deps/v8/src/ia32/assembler-ia32.h61
1 files changed, 19 insertions, 42 deletions
diff --git a/deps/v8/src/ia32/assembler-ia32.h b/deps/v8/src/ia32/assembler-ia32.h
index 40a981f53f9..69d243a7495 100644
--- a/deps/v8/src/ia32/assembler-ia32.h
+++ b/deps/v8/src/ia32/assembler-ia32.h
@@ -141,6 +141,7 @@ typedef XMMRegister Simd128Register;
DOUBLE_REGISTERS(DEFINE_REGISTER)
#undef DEFINE_REGISTER
constexpr DoubleRegister no_double_reg = DoubleRegister::no_reg();
+constexpr DoubleRegister no_dreg = DoubleRegister::no_reg();
// Note that the bit values must match those used in actual instruction encoding
constexpr int kNumRegs = 8;
@@ -197,31 +198,6 @@ inline Condition NegateCondition(Condition cc) {
}
-// Commute a condition such that {a cond b == b cond' a}.
-inline Condition CommuteCondition(Condition cc) {
- switch (cc) {
- case below:
- return above;
- case above:
- return below;
- case above_equal:
- return below_equal;
- case below_equal:
- return above_equal;
- case less:
- return greater;
- case greater:
- return less;
- case greater_equal:
- return less_equal;
- case less_equal:
- return greater_equal;
- default:
- return cc;
- }
-}
-
-
enum RoundingMode {
kRoundToNearest = 0x0,
kRoundDown = 0x1,
@@ -270,6 +246,15 @@ class Immediate BASE_EMBEDDED {
return value_.immediate;
}
+ bool is_external_reference() const {
+ return rmode() == RelocInfo::EXTERNAL_REFERENCE;
+ }
+
+ ExternalReference external_reference() const {
+ DCHECK(is_external_reference());
+ return bit_cast<ExternalReference>(immediate());
+ }
+
bool is_zero() const { return RelocInfo::IsNone(rmode_) && immediate() == 0; }
bool is_int8() const {
return RelocInfo::IsNone(rmode_) && i::is_int8(immediate());
@@ -321,7 +306,7 @@ enum ScaleFactor {
times_twice_pointer_size = times_8
};
-class Operand {
+class V8_EXPORT_PRIVATE Operand {
public:
// reg
V8_INLINE explicit Operand(Register reg) { set_modrm(3, reg); }
@@ -361,16 +346,6 @@ class Operand {
RelocInfo::INTERNAL_REFERENCE);
}
- static Operand StaticVariable(const ExternalReference& ext) {
- return Operand(ext.address(), RelocInfo::EXTERNAL_REFERENCE);
- }
-
- static Operand StaticArray(Register index,
- ScaleFactor scale,
- const ExternalReference& arr) {
- return Operand(index, scale, arr.address(), RelocInfo::EXTERNAL_REFERENCE);
- }
-
static Operand ForRegisterPlusImmediate(Register base, Immediate imm) {
return Operand(base, imm.value_.immediate, imm.rmode_);
}
@@ -412,9 +387,9 @@ class Operand {
byte buf_[6];
// The number of bytes in buf_.
- uint8_t len_;
+ uint8_t len_ = 0;
// Only valid if len_ > 4.
- RelocInfo::Mode rmode_;
+ RelocInfo::Mode rmode_ = RelocInfo::NONE;
// TODO(clemensh): Get rid of this friendship, or make Operand immutable.
friend class Assembler;
@@ -472,8 +447,7 @@ class Displacement BASE_EMBEDDED {
void init(Label* L, Type type);
};
-
-class Assembler : public AssemblerBase {
+class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
private:
// We check before assembling an instruction that there is sufficient
// space to write an instruction and its relocation information.
@@ -640,6 +614,7 @@ class Assembler : public AssemblerBase {
void movzx_w(Register dst, Register src) { movzx_w(dst, Operand(src)); }
void movzx_w(Register dst, Operand src);
+ void movq(XMMRegister dst, Operand src);
// Conditional moves
void cmov(Condition cc, Register dst, Register src) {
cmov(cc, dst, Operand(src));
@@ -667,6 +642,7 @@ class Assembler : public AssemblerBase {
void cmpxchg(Operand dst, Register src);
void cmpxchg_b(Operand dst, Register src);
void cmpxchg_w(Operand dst, Register src);
+ void cmpxchg8b(Operand dst);
// Memory Fence
void lfence();
@@ -815,6 +791,7 @@ class Assembler : public AssemblerBase {
void xor_(Operand dst, const Immediate& x);
// Bit operations.
+ void bswap(Register dst);
void bt(Operand dst, Register src);
void bts(Register dst, Register src) { bts(Operand(dst), src); }
void bts(Operand dst, Register src);
@@ -850,10 +827,8 @@ class Assembler : public AssemblerBase {
// Calls
void call(Label* L);
void call(Address entry, RelocInfo::Mode rmode);
- int CallSize(Operand adr);
void call(Register reg) { call(Operand(reg)); }
void call(Operand adr);
- int CallSize(Handle<Code> code, RelocInfo::Mode mode);
void call(Handle<Code> code, RelocInfo::Mode rmode);
void call(CodeStub* stub);
void wasm_call(Address address, RelocInfo::Mode rmode);
@@ -1822,7 +1797,9 @@ class Assembler : public AssemblerBase {
// sel specifies the /n in the modrm byte (see the Intel PRM).
void emit_arith(int sel, Operand dst, const Immediate& x);
+ void emit_operand(int code, Operand adr);
void emit_operand(Register reg, Operand adr);
+ void emit_operand(XMMRegister reg, Operand adr);
void emit_label(Label* label);