Commit 65fb2cf9 authored by lrn@chromium.org's avatar lrn@chromium.org

Made test.py not mention the defunct --crankshaft flag.

Cleanup of X64 assembler.

Review URL: http://codereview.chromium.org/6764015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 56b53dd5
...@@ -388,7 +388,6 @@ Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) ...@@ -388,7 +388,6 @@ Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size)
pc_ = buffer_; pc_ = buffer_;
reloc_info_writer.Reposition(buffer_ + buffer_size, pc_); reloc_info_writer.Reposition(buffer_ + buffer_size, pc_);
last_pc_ = NULL;
#ifdef GENERATED_CODE_COVERAGE #ifdef GENERATED_CODE_COVERAGE
InitCoverageLog(); InitCoverageLog();
...@@ -443,7 +442,6 @@ void Assembler::CodeTargetAlign() { ...@@ -443,7 +442,6 @@ void Assembler::CodeTargetAlign() {
void Assembler::bind_to(Label* L, int pos) { void Assembler::bind_to(Label* L, int pos) {
ASSERT(!L->is_bound()); // Label may only be bound once. ASSERT(!L->is_bound()); // Label may only be bound once.
last_pc_ = NULL;
ASSERT(0 <= pos && pos <= pc_offset()); // Position must be valid. ASSERT(0 <= pos && pos <= pc_offset()); // Position must be valid.
if (L->is_linked()) { if (L->is_linked()) {
int current = L->pos(); int current = L->pos();
...@@ -470,7 +468,6 @@ void Assembler::bind(Label* L) { ...@@ -470,7 +468,6 @@ void Assembler::bind(Label* L) {
void Assembler::bind(NearLabel* L) { void Assembler::bind(NearLabel* L) {
ASSERT(!L->is_bound()); ASSERT(!L->is_bound());
last_pc_ = NULL;
while (L->unresolved_branches_ > 0) { while (L->unresolved_branches_ > 0) {
int branch_pos = L->unresolved_positions_[L->unresolved_branches_ - 1]; int branch_pos = L->unresolved_positions_[L->unresolved_branches_ - 1];
int disp = pc_offset() - branch_pos; int disp = pc_offset() - branch_pos;
...@@ -530,9 +527,6 @@ void Assembler::GrowBuffer() { ...@@ -530,9 +527,6 @@ void Assembler::GrowBuffer() {
buffer_ = desc.buffer; buffer_ = desc.buffer;
buffer_size_ = desc.buffer_size; buffer_size_ = desc.buffer_size;
pc_ += pc_delta; pc_ += pc_delta;
if (last_pc_ != NULL) {
last_pc_ += pc_delta;
}
reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta, reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta,
reloc_info_writer.last_pc() + pc_delta); reloc_info_writer.last_pc() + pc_delta);
...@@ -570,7 +564,6 @@ void Assembler::emit_operand(int code, const Operand& adr) { ...@@ -570,7 +564,6 @@ void Assembler::emit_operand(int code, const Operand& adr) {
void Assembler::arithmetic_op(byte opcode, Register reg, const Operand& op) { void Assembler::arithmetic_op(byte opcode, Register reg, const Operand& op) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(reg, op); emit_rex_64(reg, op);
emit(opcode); emit(opcode);
emit_operand(reg, op); emit_operand(reg, op);
...@@ -579,7 +572,6 @@ void Assembler::arithmetic_op(byte opcode, Register reg, const Operand& op) { ...@@ -579,7 +572,6 @@ void Assembler::arithmetic_op(byte opcode, Register reg, const Operand& op) {
void Assembler::arithmetic_op(byte opcode, Register reg, Register rm_reg) { void Assembler::arithmetic_op(byte opcode, Register reg, Register rm_reg) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT((opcode & 0xC6) == 2); ASSERT((opcode & 0xC6) == 2);
if (rm_reg.low_bits() == 4) { // Forces SIB byte. if (rm_reg.low_bits() == 4) { // Forces SIB byte.
// Swap reg and rm_reg and change opcode operand order. // Swap reg and rm_reg and change opcode operand order.
...@@ -596,7 +588,6 @@ void Assembler::arithmetic_op(byte opcode, Register reg, Register rm_reg) { ...@@ -596,7 +588,6 @@ void Assembler::arithmetic_op(byte opcode, Register reg, Register rm_reg) {
void Assembler::arithmetic_op_16(byte opcode, Register reg, Register rm_reg) { void Assembler::arithmetic_op_16(byte opcode, Register reg, Register rm_reg) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT((opcode & 0xC6) == 2); ASSERT((opcode & 0xC6) == 2);
if (rm_reg.low_bits() == 4) { // Forces SIB byte. if (rm_reg.low_bits() == 4) { // Forces SIB byte.
// Swap reg and rm_reg and change opcode operand order. // Swap reg and rm_reg and change opcode operand order.
...@@ -617,7 +608,6 @@ void Assembler::arithmetic_op_16(byte opcode, ...@@ -617,7 +608,6 @@ void Assembler::arithmetic_op_16(byte opcode,
Register reg, Register reg,
const Operand& rm_reg) { const Operand& rm_reg) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_optional_rex_32(reg, rm_reg); emit_optional_rex_32(reg, rm_reg);
emit(opcode); emit(opcode);
...@@ -627,7 +617,6 @@ void Assembler::arithmetic_op_16(byte opcode, ...@@ -627,7 +617,6 @@ void Assembler::arithmetic_op_16(byte opcode,
void Assembler::arithmetic_op_32(byte opcode, Register reg, Register rm_reg) { void Assembler::arithmetic_op_32(byte opcode, Register reg, Register rm_reg) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT((opcode & 0xC6) == 2); ASSERT((opcode & 0xC6) == 2);
if (rm_reg.low_bits() == 4) { // Forces SIB byte. if (rm_reg.low_bits() == 4) { // Forces SIB byte.
// Swap reg and rm_reg and change opcode operand order. // Swap reg and rm_reg and change opcode operand order.
...@@ -646,7 +635,6 @@ void Assembler::arithmetic_op_32(byte opcode, ...@@ -646,7 +635,6 @@ void Assembler::arithmetic_op_32(byte opcode,
Register reg, Register reg,
const Operand& rm_reg) { const Operand& rm_reg) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(reg, rm_reg); emit_optional_rex_32(reg, rm_reg);
emit(opcode); emit(opcode);
emit_operand(reg, rm_reg); emit_operand(reg, rm_reg);
...@@ -657,7 +645,6 @@ void Assembler::immediate_arithmetic_op(byte subcode, ...@@ -657,7 +645,6 @@ void Assembler::immediate_arithmetic_op(byte subcode,
Register dst, Register dst,
Immediate src) { Immediate src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
if (is_int8(src.value_)) { if (is_int8(src.value_)) {
emit(0x83); emit(0x83);
...@@ -677,7 +664,6 @@ void Assembler::immediate_arithmetic_op(byte subcode, ...@@ -677,7 +664,6 @@ void Assembler::immediate_arithmetic_op(byte subcode,
const Operand& dst, const Operand& dst,
Immediate src) { Immediate src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
if (is_int8(src.value_)) { if (is_int8(src.value_)) {
emit(0x83); emit(0x83);
...@@ -695,7 +681,6 @@ void Assembler::immediate_arithmetic_op_16(byte subcode, ...@@ -695,7 +681,6 @@ void Assembler::immediate_arithmetic_op_16(byte subcode,
Register dst, Register dst,
Immediate src) { Immediate src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); // Operand size override prefix. emit(0x66); // Operand size override prefix.
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
if (is_int8(src.value_)) { if (is_int8(src.value_)) {
...@@ -717,7 +702,6 @@ void Assembler::immediate_arithmetic_op_16(byte subcode, ...@@ -717,7 +702,6 @@ void Assembler::immediate_arithmetic_op_16(byte subcode,
const Operand& dst, const Operand& dst,
Immediate src) { Immediate src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); // Operand size override prefix. emit(0x66); // Operand size override prefix.
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
if (is_int8(src.value_)) { if (is_int8(src.value_)) {
...@@ -736,7 +720,6 @@ void Assembler::immediate_arithmetic_op_32(byte subcode, ...@@ -736,7 +720,6 @@ void Assembler::immediate_arithmetic_op_32(byte subcode,
Register dst, Register dst,
Immediate src) { Immediate src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
if (is_int8(src.value_)) { if (is_int8(src.value_)) {
emit(0x83); emit(0x83);
...@@ -757,7 +740,6 @@ void Assembler::immediate_arithmetic_op_32(byte subcode, ...@@ -757,7 +740,6 @@ void Assembler::immediate_arithmetic_op_32(byte subcode,
const Operand& dst, const Operand& dst,
Immediate src) { Immediate src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
if (is_int8(src.value_)) { if (is_int8(src.value_)) {
emit(0x83); emit(0x83);
...@@ -775,7 +757,6 @@ void Assembler::immediate_arithmetic_op_8(byte subcode, ...@@ -775,7 +757,6 @@ void Assembler::immediate_arithmetic_op_8(byte subcode,
const Operand& dst, const Operand& dst,
Immediate src) { Immediate src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
ASSERT(is_int8(src.value_) || is_uint8(src.value_)); ASSERT(is_int8(src.value_) || is_uint8(src.value_));
emit(0x80); emit(0x80);
...@@ -788,7 +769,6 @@ void Assembler::immediate_arithmetic_op_8(byte subcode, ...@@ -788,7 +769,6 @@ void Assembler::immediate_arithmetic_op_8(byte subcode,
Register dst, Register dst,
Immediate src) { Immediate src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (dst.code() > 3) { if (dst.code() > 3) {
// Use 64-bit mode byte registers. // Use 64-bit mode byte registers.
emit_rex_64(dst); emit_rex_64(dst);
...@@ -802,7 +782,6 @@ void Assembler::immediate_arithmetic_op_8(byte subcode, ...@@ -802,7 +782,6 @@ void Assembler::immediate_arithmetic_op_8(byte subcode,
void Assembler::shift(Register dst, Immediate shift_amount, int subcode) { void Assembler::shift(Register dst, Immediate shift_amount, int subcode) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT(is_uint6(shift_amount.value_)); // illegal shift count ASSERT(is_uint6(shift_amount.value_)); // illegal shift count
if (shift_amount.value_ == 1) { if (shift_amount.value_ == 1) {
emit_rex_64(dst); emit_rex_64(dst);
...@@ -819,7 +798,6 @@ void Assembler::shift(Register dst, Immediate shift_amount, int subcode) { ...@@ -819,7 +798,6 @@ void Assembler::shift(Register dst, Immediate shift_amount, int subcode) {
void Assembler::shift(Register dst, int subcode) { void Assembler::shift(Register dst, int subcode) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xD3); emit(0xD3);
emit_modrm(subcode, dst); emit_modrm(subcode, dst);
...@@ -828,7 +806,6 @@ void Assembler::shift(Register dst, int subcode) { ...@@ -828,7 +806,6 @@ void Assembler::shift(Register dst, int subcode) {
void Assembler::shift_32(Register dst, int subcode) { void Assembler::shift_32(Register dst, int subcode) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0xD3); emit(0xD3);
emit_modrm(subcode, dst); emit_modrm(subcode, dst);
...@@ -837,7 +814,6 @@ void Assembler::shift_32(Register dst, int subcode) { ...@@ -837,7 +814,6 @@ void Assembler::shift_32(Register dst, int subcode) {
void Assembler::shift_32(Register dst, Immediate shift_amount, int subcode) { void Assembler::shift_32(Register dst, Immediate shift_amount, int subcode) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT(is_uint5(shift_amount.value_)); // illegal shift count ASSERT(is_uint5(shift_amount.value_)); // illegal shift count
if (shift_amount.value_ == 1) { if (shift_amount.value_ == 1) {
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
...@@ -854,7 +830,6 @@ void Assembler::shift_32(Register dst, Immediate shift_amount, int subcode) { ...@@ -854,7 +830,6 @@ void Assembler::shift_32(Register dst, Immediate shift_amount, int subcode) {
void Assembler::bt(const Operand& dst, Register src) { void Assembler::bt(const Operand& dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(src, dst); emit_rex_64(src, dst);
emit(0x0F); emit(0x0F);
emit(0xA3); emit(0xA3);
...@@ -864,7 +839,6 @@ void Assembler::bt(const Operand& dst, Register src) { ...@@ -864,7 +839,6 @@ void Assembler::bt(const Operand& dst, Register src) {
void Assembler::bts(const Operand& dst, Register src) { void Assembler::bts(const Operand& dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(src, dst); emit_rex_64(src, dst);
emit(0x0F); emit(0x0F);
emit(0xAB); emit(0xAB);
...@@ -875,7 +849,6 @@ void Assembler::bts(const Operand& dst, Register src) { ...@@ -875,7 +849,6 @@ void Assembler::bts(const Operand& dst, Register src) {
void Assembler::call(Label* L) { void Assembler::call(Label* L) {
positions_recorder()->WriteRecordedPositions(); positions_recorder()->WriteRecordedPositions();
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// 1110 1000 #32-bit disp. // 1110 1000 #32-bit disp.
emit(0xE8); emit(0xE8);
if (L->is_bound()) { if (L->is_bound()) {
...@@ -897,7 +870,6 @@ void Assembler::call(Label* L) { ...@@ -897,7 +870,6 @@ void Assembler::call(Label* L) {
void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode) { void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode) {
positions_recorder()->WriteRecordedPositions(); positions_recorder()->WriteRecordedPositions();
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// 1110 1000 #32-bit disp. // 1110 1000 #32-bit disp.
emit(0xE8); emit(0xE8);
emit_code_target(target, rmode); emit_code_target(target, rmode);
...@@ -907,7 +879,6 @@ void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode) { ...@@ -907,7 +879,6 @@ void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode) {
void Assembler::call(Register adr) { void Assembler::call(Register adr) {
positions_recorder()->WriteRecordedPositions(); positions_recorder()->WriteRecordedPositions();
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// Opcode: FF /2 r64. // Opcode: FF /2 r64.
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xFF); emit(0xFF);
...@@ -918,7 +889,6 @@ void Assembler::call(Register adr) { ...@@ -918,7 +889,6 @@ void Assembler::call(Register adr) {
void Assembler::call(const Operand& op) { void Assembler::call(const Operand& op) {
positions_recorder()->WriteRecordedPositions(); positions_recorder()->WriteRecordedPositions();
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// Opcode: FF /2 m64. // Opcode: FF /2 m64.
emit_optional_rex_32(op); emit_optional_rex_32(op);
emit(0xFF); emit(0xFF);
...@@ -933,7 +903,6 @@ void Assembler::call(const Operand& op) { ...@@ -933,7 +903,6 @@ void Assembler::call(const Operand& op) {
void Assembler::call(Address target) { void Assembler::call(Address target) {
positions_recorder()->WriteRecordedPositions(); positions_recorder()->WriteRecordedPositions();
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// 1110 1000 #32-bit disp. // 1110 1000 #32-bit disp.
emit(0xE8); emit(0xE8);
Address source = pc_ + 4; Address source = pc_ + 4;
...@@ -945,19 +914,16 @@ void Assembler::call(Address target) { ...@@ -945,19 +914,16 @@ void Assembler::call(Address target) {
void Assembler::clc() { void Assembler::clc() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF8); emit(0xF8);
} }
void Assembler::cld() { void Assembler::cld() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xFC); emit(0xFC);
} }
void Assembler::cdq() { void Assembler::cdq() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x99); emit(0x99);
} }
...@@ -972,7 +938,6 @@ void Assembler::cmovq(Condition cc, Register dst, Register src) { ...@@ -972,7 +938,6 @@ void Assembler::cmovq(Condition cc, Register dst, Register src) {
// 64-bit architecture. // 64-bit architecture.
ASSERT(cc >= 0); // Use mov for unconditional moves. ASSERT(cc >= 0); // Use mov for unconditional moves.
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// Opcode: REX.W 0f 40 + cc /r. // Opcode: REX.W 0f 40 + cc /r.
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x0f); emit(0x0f);
...@@ -989,7 +954,6 @@ void Assembler::cmovq(Condition cc, Register dst, const Operand& src) { ...@@ -989,7 +954,6 @@ void Assembler::cmovq(Condition cc, Register dst, const Operand& src) {
} }
ASSERT(cc >= 0); ASSERT(cc >= 0);
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// Opcode: REX.W 0f 40 + cc /r. // Opcode: REX.W 0f 40 + cc /r.
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x0f); emit(0x0f);
...@@ -1006,7 +970,6 @@ void Assembler::cmovl(Condition cc, Register dst, Register src) { ...@@ -1006,7 +970,6 @@ void Assembler::cmovl(Condition cc, Register dst, Register src) {
} }
ASSERT(cc >= 0); ASSERT(cc >= 0);
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// Opcode: 0f 40 + cc /r. // Opcode: 0f 40 + cc /r.
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0f); emit(0x0f);
...@@ -1023,7 +986,6 @@ void Assembler::cmovl(Condition cc, Register dst, const Operand& src) { ...@@ -1023,7 +986,6 @@ void Assembler::cmovl(Condition cc, Register dst, const Operand& src) {
} }
ASSERT(cc >= 0); ASSERT(cc >= 0);
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// Opcode: 0f 40 + cc /r. // Opcode: 0f 40 + cc /r.
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0f); emit(0x0f);
...@@ -1035,7 +997,6 @@ void Assembler::cmovl(Condition cc, Register dst, const Operand& src) { ...@@ -1035,7 +997,6 @@ void Assembler::cmovl(Condition cc, Register dst, const Operand& src) {
void Assembler::cmpb_al(Immediate imm8) { void Assembler::cmpb_al(Immediate imm8) {
ASSERT(is_int8(imm8.value_) || is_uint8(imm8.value_)); ASSERT(is_int8(imm8.value_) || is_uint8(imm8.value_));
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x3c); emit(0x3c);
emit(imm8.value_); emit(imm8.value_);
} }
...@@ -1044,7 +1005,6 @@ void Assembler::cmpb_al(Immediate imm8) { ...@@ -1044,7 +1005,6 @@ void Assembler::cmpb_al(Immediate imm8) {
void Assembler::cpuid() { void Assembler::cpuid() {
ASSERT(CpuFeatures::IsEnabled(CPUID)); ASSERT(CpuFeatures::IsEnabled(CPUID));
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x0F); emit(0x0F);
emit(0xA2); emit(0xA2);
} }
...@@ -1052,7 +1012,6 @@ void Assembler::cpuid() { ...@@ -1052,7 +1012,6 @@ void Assembler::cpuid() {
void Assembler::cqo() { void Assembler::cqo() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(); emit_rex_64();
emit(0x99); emit(0x99);
} }
...@@ -1060,7 +1019,6 @@ void Assembler::cqo() { ...@@ -1060,7 +1019,6 @@ void Assembler::cqo() {
void Assembler::decq(Register dst) { void Assembler::decq(Register dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xFF); emit(0xFF);
emit_modrm(0x1, dst); emit_modrm(0x1, dst);
...@@ -1069,7 +1027,6 @@ void Assembler::decq(Register dst) { ...@@ -1069,7 +1027,6 @@ void Assembler::decq(Register dst) {
void Assembler::decq(const Operand& dst) { void Assembler::decq(const Operand& dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xFF); emit(0xFF);
emit_operand(1, dst); emit_operand(1, dst);
...@@ -1078,7 +1035,6 @@ void Assembler::decq(const Operand& dst) { ...@@ -1078,7 +1035,6 @@ void Assembler::decq(const Operand& dst) {
void Assembler::decl(Register dst) { void Assembler::decl(Register dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0xFF); emit(0xFF);
emit_modrm(0x1, dst); emit_modrm(0x1, dst);
...@@ -1087,7 +1043,6 @@ void Assembler::decl(Register dst) { ...@@ -1087,7 +1043,6 @@ void Assembler::decl(Register dst) {
void Assembler::decl(const Operand& dst) { void Assembler::decl(const Operand& dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0xFF); emit(0xFF);
emit_operand(1, dst); emit_operand(1, dst);
...@@ -1096,7 +1051,6 @@ void Assembler::decl(const Operand& dst) { ...@@ -1096,7 +1051,6 @@ void Assembler::decl(const Operand& dst) {
void Assembler::decb(Register dst) { void Assembler::decb(Register dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (dst.code() > 3) { if (dst.code() > 3) {
// Register is not one of al, bl, cl, dl. Its encoding needs REX. // Register is not one of al, bl, cl, dl. Its encoding needs REX.
emit_rex_32(dst); emit_rex_32(dst);
...@@ -1108,7 +1062,6 @@ void Assembler::decb(Register dst) { ...@@ -1108,7 +1062,6 @@ void Assembler::decb(Register dst) {
void Assembler::decb(const Operand& dst) { void Assembler::decb(const Operand& dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0xFE); emit(0xFE);
emit_operand(1, dst); emit_operand(1, dst);
...@@ -1117,7 +1070,6 @@ void Assembler::decb(const Operand& dst) { ...@@ -1117,7 +1070,6 @@ void Assembler::decb(const Operand& dst) {
void Assembler::enter(Immediate size) { void Assembler::enter(Immediate size) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xC8); emit(0xC8);
emitw(size.value_); // 16 bit operand, always. emitw(size.value_); // 16 bit operand, always.
emit(0); emit(0);
...@@ -1126,14 +1078,12 @@ void Assembler::enter(Immediate size) { ...@@ -1126,14 +1078,12 @@ void Assembler::enter(Immediate size) {
void Assembler::hlt() { void Assembler::hlt() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF4); emit(0xF4);
} }
void Assembler::idivq(Register src) { void Assembler::idivq(Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(src); emit_rex_64(src);
emit(0xF7); emit(0xF7);
emit_modrm(0x7, src); emit_modrm(0x7, src);
...@@ -1142,7 +1092,6 @@ void Assembler::idivq(Register src) { ...@@ -1142,7 +1092,6 @@ void Assembler::idivq(Register src) {
void Assembler::idivl(Register src) { void Assembler::idivl(Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(src); emit_optional_rex_32(src);
emit(0xF7); emit(0xF7);
emit_modrm(0x7, src); emit_modrm(0x7, src);
...@@ -1151,7 +1100,6 @@ void Assembler::idivl(Register src) { ...@@ -1151,7 +1100,6 @@ void Assembler::idivl(Register src) {
void Assembler::imul(Register src) { void Assembler::imul(Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(src); emit_rex_64(src);
emit(0xF7); emit(0xF7);
emit_modrm(0x5, src); emit_modrm(0x5, src);
...@@ -1160,7 +1108,6 @@ void Assembler::imul(Register src) { ...@@ -1160,7 +1108,6 @@ void Assembler::imul(Register src) {
void Assembler::imul(Register dst, Register src) { void Assembler::imul(Register dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x0F); emit(0x0F);
emit(0xAF); emit(0xAF);
...@@ -1170,7 +1117,6 @@ void Assembler::imul(Register dst, Register src) { ...@@ -1170,7 +1117,6 @@ void Assembler::imul(Register dst, Register src) {
void Assembler::imul(Register dst, const Operand& src) { void Assembler::imul(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x0F); emit(0x0F);
emit(0xAF); emit(0xAF);
...@@ -1180,7 +1126,6 @@ void Assembler::imul(Register dst, const Operand& src) { ...@@ -1180,7 +1126,6 @@ void Assembler::imul(Register dst, const Operand& src) {
void Assembler::imul(Register dst, Register src, Immediate imm) { void Assembler::imul(Register dst, Register src, Immediate imm) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst, src); emit_rex_64(dst, src);
if (is_int8(imm.value_)) { if (is_int8(imm.value_)) {
emit(0x6B); emit(0x6B);
...@@ -1196,7 +1141,6 @@ void Assembler::imul(Register dst, Register src, Immediate imm) { ...@@ -1196,7 +1141,6 @@ void Assembler::imul(Register dst, Register src, Immediate imm) {
void Assembler::imull(Register dst, Register src) { void Assembler::imull(Register dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
emit(0xAF); emit(0xAF);
...@@ -1206,7 +1150,6 @@ void Assembler::imull(Register dst, Register src) { ...@@ -1206,7 +1150,6 @@ void Assembler::imull(Register dst, Register src) {
void Assembler::imull(Register dst, const Operand& src) { void Assembler::imull(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
emit(0xAF); emit(0xAF);
...@@ -1216,7 +1159,6 @@ void Assembler::imull(Register dst, const Operand& src) { ...@@ -1216,7 +1159,6 @@ void Assembler::imull(Register dst, const Operand& src) {
void Assembler::imull(Register dst, Register src, Immediate imm) { void Assembler::imull(Register dst, Register src, Immediate imm) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
if (is_int8(imm.value_)) { if (is_int8(imm.value_)) {
emit(0x6B); emit(0x6B);
...@@ -1232,7 +1174,6 @@ void Assembler::imull(Register dst, Register src, Immediate imm) { ...@@ -1232,7 +1174,6 @@ void Assembler::imull(Register dst, Register src, Immediate imm) {
void Assembler::incq(Register dst) { void Assembler::incq(Register dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xFF); emit(0xFF);
emit_modrm(0x0, dst); emit_modrm(0x0, dst);
...@@ -1241,7 +1182,6 @@ void Assembler::incq(Register dst) { ...@@ -1241,7 +1182,6 @@ void Assembler::incq(Register dst) {
void Assembler::incq(const Operand& dst) { void Assembler::incq(const Operand& dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xFF); emit(0xFF);
emit_operand(0, dst); emit_operand(0, dst);
...@@ -1250,7 +1190,6 @@ void Assembler::incq(const Operand& dst) { ...@@ -1250,7 +1190,6 @@ void Assembler::incq(const Operand& dst) {
void Assembler::incl(const Operand& dst) { void Assembler::incl(const Operand& dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0xFF); emit(0xFF);
emit_operand(0, dst); emit_operand(0, dst);
...@@ -1259,7 +1198,6 @@ void Assembler::incl(const Operand& dst) { ...@@ -1259,7 +1198,6 @@ void Assembler::incl(const Operand& dst) {
void Assembler::incl(Register dst) { void Assembler::incl(Register dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0xFF); emit(0xFF);
emit_modrm(0, dst); emit_modrm(0, dst);
...@@ -1268,7 +1206,6 @@ void Assembler::incl(Register dst) { ...@@ -1268,7 +1206,6 @@ void Assembler::incl(Register dst) {
void Assembler::int3() { void Assembler::int3() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xCC); emit(0xCC);
} }
...@@ -1281,7 +1218,6 @@ void Assembler::j(Condition cc, Label* L) { ...@@ -1281,7 +1218,6 @@ void Assembler::j(Condition cc, Label* L) {
return; return;
} }
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT(is_uint4(cc)); ASSERT(is_uint4(cc));
if (L->is_bound()) { if (L->is_bound()) {
const int short_size = 2; const int short_size = 2;
...@@ -1319,7 +1255,6 @@ void Assembler::j(Condition cc, ...@@ -1319,7 +1255,6 @@ void Assembler::j(Condition cc,
Handle<Code> target, Handle<Code> target,
RelocInfo::Mode rmode) { RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT(is_uint4(cc)); ASSERT(is_uint4(cc));
// 0000 1111 1000 tttn #32-bit disp. // 0000 1111 1000 tttn #32-bit disp.
emit(0x0F); emit(0x0F);
...@@ -1330,7 +1265,6 @@ void Assembler::j(Condition cc, ...@@ -1330,7 +1265,6 @@ void Assembler::j(Condition cc,
void Assembler::j(Condition cc, NearLabel* L, Hint hint) { void Assembler::j(Condition cc, NearLabel* L, Hint hint) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT(0 <= cc && cc < 16); ASSERT(0 <= cc && cc < 16);
if (FLAG_emit_branch_hints && hint != no_hint) emit(hint); if (FLAG_emit_branch_hints && hint != no_hint) emit(hint);
if (L->is_bound()) { if (L->is_bound()) {
...@@ -1351,7 +1285,6 @@ void Assembler::j(Condition cc, NearLabel* L, Hint hint) { ...@@ -1351,7 +1285,6 @@ void Assembler::j(Condition cc, NearLabel* L, Hint hint) {
void Assembler::jmp(Label* L) { void Assembler::jmp(Label* L) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
const int short_size = sizeof(int8_t); const int short_size = sizeof(int8_t);
const int long_size = sizeof(int32_t); const int long_size = sizeof(int32_t);
if (L->is_bound()) { if (L->is_bound()) {
...@@ -1384,7 +1317,6 @@ void Assembler::jmp(Label* L) { ...@@ -1384,7 +1317,6 @@ void Assembler::jmp(Label* L) {
void Assembler::jmp(Handle<Code> target, RelocInfo::Mode rmode) { void Assembler::jmp(Handle<Code> target, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// 1110 1001 #32-bit disp. // 1110 1001 #32-bit disp.
emit(0xE9); emit(0xE9);
emit_code_target(target, rmode); emit_code_target(target, rmode);
...@@ -1393,7 +1325,6 @@ void Assembler::jmp(Handle<Code> target, RelocInfo::Mode rmode) { ...@@ -1393,7 +1325,6 @@ void Assembler::jmp(Handle<Code> target, RelocInfo::Mode rmode) {
void Assembler::jmp(NearLabel* L) { void Assembler::jmp(NearLabel* L) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (L->is_bound()) { if (L->is_bound()) {
const int short_size = sizeof(int8_t); const int short_size = sizeof(int8_t);
int offs = L->pos() - pc_offset(); int offs = L->pos() - pc_offset();
...@@ -1412,7 +1343,6 @@ void Assembler::jmp(NearLabel* L) { ...@@ -1412,7 +1343,6 @@ void Assembler::jmp(NearLabel* L) {
void Assembler::jmp(Register target) { void Assembler::jmp(Register target) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// Opcode FF/4 r64. // Opcode FF/4 r64.
emit_optional_rex_32(target); emit_optional_rex_32(target);
emit(0xFF); emit(0xFF);
...@@ -1422,7 +1352,6 @@ void Assembler::jmp(Register target) { ...@@ -1422,7 +1352,6 @@ void Assembler::jmp(Register target) {
void Assembler::jmp(const Operand& src) { void Assembler::jmp(const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
// Opcode FF/4 m64. // Opcode FF/4 m64.
emit_optional_rex_32(src); emit_optional_rex_32(src);
emit(0xFF); emit(0xFF);
...@@ -1432,7 +1361,6 @@ void Assembler::jmp(const Operand& src) { ...@@ -1432,7 +1361,6 @@ void Assembler::jmp(const Operand& src) {
void Assembler::lea(Register dst, const Operand& src) { void Assembler::lea(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x8D); emit(0x8D);
emit_operand(dst, src); emit_operand(dst, src);
...@@ -1441,7 +1369,6 @@ void Assembler::lea(Register dst, const Operand& src) { ...@@ -1441,7 +1369,6 @@ void Assembler::lea(Register dst, const Operand& src) {
void Assembler::leal(Register dst, const Operand& src) { void Assembler::leal(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x8D); emit(0x8D);
emit_operand(dst, src); emit_operand(dst, src);
...@@ -1450,7 +1377,6 @@ void Assembler::leal(Register dst, const Operand& src) { ...@@ -1450,7 +1377,6 @@ void Assembler::leal(Register dst, const Operand& src) {
void Assembler::load_rax(void* value, RelocInfo::Mode mode) { void Assembler::load_rax(void* value, RelocInfo::Mode mode) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x48); // REX.W emit(0x48); // REX.W
emit(0xA1); emit(0xA1);
emitq(reinterpret_cast<uintptr_t>(value), mode); emitq(reinterpret_cast<uintptr_t>(value), mode);
...@@ -1464,14 +1390,12 @@ void Assembler::load_rax(ExternalReference ref) { ...@@ -1464,14 +1390,12 @@ void Assembler::load_rax(ExternalReference ref) {
void Assembler::leave() { void Assembler::leave() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xC9); emit(0xC9);
} }
void Assembler::movb(Register dst, const Operand& src) { void Assembler::movb(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_32(dst, src); emit_rex_32(dst, src);
emit(0x8A); emit(0x8A);
emit_operand(dst, src); emit_operand(dst, src);
...@@ -1480,7 +1404,6 @@ void Assembler::movb(Register dst, const Operand& src) { ...@@ -1480,7 +1404,6 @@ void Assembler::movb(Register dst, const Operand& src) {
void Assembler::movb(Register dst, Immediate imm) { void Assembler::movb(Register dst, Immediate imm) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_32(dst); emit_rex_32(dst);
emit(0xC6); emit(0xC6);
emit_modrm(0x0, dst); emit_modrm(0x0, dst);
...@@ -1490,7 +1413,6 @@ void Assembler::movb(Register dst, Immediate imm) { ...@@ -1490,7 +1413,6 @@ void Assembler::movb(Register dst, Immediate imm) {
void Assembler::movb(const Operand& dst, Register src) { void Assembler::movb(const Operand& dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_32(src, dst); emit_rex_32(src, dst);
emit(0x88); emit(0x88);
emit_operand(src, dst); emit_operand(src, dst);
...@@ -1499,7 +1421,6 @@ void Assembler::movb(const Operand& dst, Register src) { ...@@ -1499,7 +1421,6 @@ void Assembler::movb(const Operand& dst, Register src) {
void Assembler::movw(const Operand& dst, Register src) { void Assembler::movw(const Operand& dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_optional_rex_32(src, dst); emit_optional_rex_32(src, dst);
emit(0x89); emit(0x89);
...@@ -1509,7 +1430,6 @@ void Assembler::movw(const Operand& dst, Register src) { ...@@ -1509,7 +1430,6 @@ void Assembler::movw(const Operand& dst, Register src) {
void Assembler::movl(Register dst, const Operand& src) { void Assembler::movl(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x8B); emit(0x8B);
emit_operand(dst, src); emit_operand(dst, src);
...@@ -1518,7 +1438,6 @@ void Assembler::movl(Register dst, const Operand& src) { ...@@ -1518,7 +1438,6 @@ void Assembler::movl(Register dst, const Operand& src) {
void Assembler::movl(Register dst, Register src) { void Assembler::movl(Register dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (src.low_bits() == 4) { if (src.low_bits() == 4) {
emit_optional_rex_32(src, dst); emit_optional_rex_32(src, dst);
emit(0x89); emit(0x89);
...@@ -1533,7 +1452,6 @@ void Assembler::movl(Register dst, Register src) { ...@@ -1533,7 +1452,6 @@ void Assembler::movl(Register dst, Register src) {
void Assembler::movl(const Operand& dst, Register src) { void Assembler::movl(const Operand& dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(src, dst); emit_optional_rex_32(src, dst);
emit(0x89); emit(0x89);
emit_operand(src, dst); emit_operand(src, dst);
...@@ -1542,7 +1460,6 @@ void Assembler::movl(const Operand& dst, Register src) { ...@@ -1542,7 +1460,6 @@ void Assembler::movl(const Operand& dst, Register src) {
void Assembler::movl(const Operand& dst, Immediate value) { void Assembler::movl(const Operand& dst, Immediate value) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0xC7); emit(0xC7);
emit_operand(0x0, dst); emit_operand(0x0, dst);
...@@ -1552,7 +1469,6 @@ void Assembler::movl(const Operand& dst, Immediate value) { ...@@ -1552,7 +1469,6 @@ void Assembler::movl(const Operand& dst, Immediate value) {
void Assembler::movl(Register dst, Immediate value) { void Assembler::movl(Register dst, Immediate value) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0xC7); emit(0xC7);
emit_modrm(0x0, dst); emit_modrm(0x0, dst);
...@@ -1562,7 +1478,6 @@ void Assembler::movl(Register dst, Immediate value) { ...@@ -1562,7 +1478,6 @@ void Assembler::movl(Register dst, Immediate value) {
void Assembler::movq(Register dst, const Operand& src) { void Assembler::movq(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x8B); emit(0x8B);
emit_operand(dst, src); emit_operand(dst, src);
...@@ -1571,7 +1486,6 @@ void Assembler::movq(Register dst, const Operand& src) { ...@@ -1571,7 +1486,6 @@ void Assembler::movq(Register dst, const Operand& src) {
void Assembler::movq(Register dst, Register src) { void Assembler::movq(Register dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (src.low_bits() == 4) { if (src.low_bits() == 4) {
emit_rex_64(src, dst); emit_rex_64(src, dst);
emit(0x89); emit(0x89);
...@@ -1586,7 +1500,6 @@ void Assembler::movq(Register dst, Register src) { ...@@ -1586,7 +1500,6 @@ void Assembler::movq(Register dst, Register src) {
void Assembler::movq(Register dst, Immediate value) { void Assembler::movq(Register dst, Immediate value) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xC7); emit(0xC7);
emit_modrm(0x0, dst); emit_modrm(0x0, dst);
...@@ -1596,7 +1509,6 @@ void Assembler::movq(Register dst, Immediate value) { ...@@ -1596,7 +1509,6 @@ void Assembler::movq(Register dst, Immediate value) {
void Assembler::movq(const Operand& dst, Register src) { void Assembler::movq(const Operand& dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(src, dst); emit_rex_64(src, dst);
emit(0x89); emit(0x89);
emit_operand(src, dst); emit_operand(src, dst);
...@@ -1608,7 +1520,6 @@ void Assembler::movq(Register dst, void* value, RelocInfo::Mode rmode) { ...@@ -1608,7 +1520,6 @@ void Assembler::movq(Register dst, void* value, RelocInfo::Mode rmode) {
// address is not GC safe. Use the handle version instead. // address is not GC safe. Use the handle version instead.
ASSERT(rmode > RelocInfo::LAST_GCED_ENUM); ASSERT(rmode > RelocInfo::LAST_GCED_ENUM);
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xB8 | dst.low_bits()); emit(0xB8 | dst.low_bits());
emitq(reinterpret_cast<uintptr_t>(value), rmode); emitq(reinterpret_cast<uintptr_t>(value), rmode);
...@@ -1630,7 +1541,6 @@ void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) { ...@@ -1630,7 +1541,6 @@ void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) {
// value. // value.
} }
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xB8 | dst.low_bits()); emit(0xB8 | dst.low_bits());
emitq(value, rmode); emitq(value, rmode);
...@@ -1645,7 +1555,6 @@ void Assembler::movq(Register dst, ExternalReference ref) { ...@@ -1645,7 +1555,6 @@ void Assembler::movq(Register dst, ExternalReference ref) {
void Assembler::movq(const Operand& dst, Immediate value) { void Assembler::movq(const Operand& dst, Immediate value) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xC7); emit(0xC7);
emit_operand(0, dst); emit_operand(0, dst);
...@@ -1657,7 +1566,6 @@ void Assembler::movq(const Operand& dst, Immediate value) { ...@@ -1657,7 +1566,6 @@ void Assembler::movq(const Operand& dst, Immediate value) {
// (as a 32-bit offset sign extended to 64-bit). // (as a 32-bit offset sign extended to 64-bit).
void Assembler::movl(const Operand& dst, Label* src) { void Assembler::movl(const Operand& dst, Label* src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0xC7); emit(0xC7);
emit_operand(0, dst); emit_operand(0, dst);
...@@ -1687,7 +1595,6 @@ void Assembler::movq(Register dst, Handle<Object> value, RelocInfo::Mode mode) { ...@@ -1687,7 +1595,6 @@ void Assembler::movq(Register dst, Handle<Object> value, RelocInfo::Mode mode) {
movq(dst, reinterpret_cast<int64_t>(*value), RelocInfo::NONE); movq(dst, reinterpret_cast<int64_t>(*value), RelocInfo::NONE);
} else { } else {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT(value->IsHeapObject()); ASSERT(value->IsHeapObject());
ASSERT(!HEAP->InNewSpace(*value)); ASSERT(!HEAP->InNewSpace(*value));
emit_rex_64(dst); emit_rex_64(dst);
...@@ -1699,7 +1606,6 @@ void Assembler::movq(Register dst, Handle<Object> value, RelocInfo::Mode mode) { ...@@ -1699,7 +1606,6 @@ void Assembler::movq(Register dst, Handle<Object> value, RelocInfo::Mode mode) {
void Assembler::movsxbq(Register dst, const Operand& src) { void Assembler::movsxbq(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x0F); emit(0x0F);
emit(0xBE); emit(0xBE);
...@@ -1709,7 +1615,6 @@ void Assembler::movsxbq(Register dst, const Operand& src) { ...@@ -1709,7 +1615,6 @@ void Assembler::movsxbq(Register dst, const Operand& src) {
void Assembler::movsxwq(Register dst, const Operand& src) { void Assembler::movsxwq(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x0F); emit(0x0F);
emit(0xBF); emit(0xBF);
...@@ -1719,7 +1624,6 @@ void Assembler::movsxwq(Register dst, const Operand& src) { ...@@ -1719,7 +1624,6 @@ void Assembler::movsxwq(Register dst, const Operand& src) {
void Assembler::movsxlq(Register dst, Register src) { void Assembler::movsxlq(Register dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x63); emit(0x63);
emit_modrm(dst, src); emit_modrm(dst, src);
...@@ -1728,7 +1632,6 @@ void Assembler::movsxlq(Register dst, Register src) { ...@@ -1728,7 +1632,6 @@ void Assembler::movsxlq(Register dst, Register src) {
void Assembler::movsxlq(Register dst, const Operand& src) { void Assembler::movsxlq(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x63); emit(0x63);
emit_operand(dst, src); emit_operand(dst, src);
...@@ -1737,7 +1640,6 @@ void Assembler::movsxlq(Register dst, const Operand& src) { ...@@ -1737,7 +1640,6 @@ void Assembler::movsxlq(Register dst, const Operand& src) {
void Assembler::movzxbq(Register dst, const Operand& src) { void Assembler::movzxbq(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
emit(0xB6); emit(0xB6);
...@@ -1747,7 +1649,6 @@ void Assembler::movzxbq(Register dst, const Operand& src) { ...@@ -1747,7 +1649,6 @@ void Assembler::movzxbq(Register dst, const Operand& src) {
void Assembler::movzxbl(Register dst, const Operand& src) { void Assembler::movzxbl(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
emit(0xB6); emit(0xB6);
...@@ -1757,7 +1658,6 @@ void Assembler::movzxbl(Register dst, const Operand& src) { ...@@ -1757,7 +1658,6 @@ void Assembler::movzxbl(Register dst, const Operand& src) {
void Assembler::movzxwq(Register dst, const Operand& src) { void Assembler::movzxwq(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
emit(0xB7); emit(0xB7);
...@@ -1767,7 +1667,6 @@ void Assembler::movzxwq(Register dst, const Operand& src) { ...@@ -1767,7 +1667,6 @@ void Assembler::movzxwq(Register dst, const Operand& src) {
void Assembler::movzxwl(Register dst, const Operand& src) { void Assembler::movzxwl(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
emit(0xB7); emit(0xB7);
...@@ -1777,7 +1676,6 @@ void Assembler::movzxwl(Register dst, const Operand& src) { ...@@ -1777,7 +1676,6 @@ void Assembler::movzxwl(Register dst, const Operand& src) {
void Assembler::repmovsb() { void Assembler::repmovsb() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF3); emit(0xF3);
emit(0xA4); emit(0xA4);
} }
...@@ -1785,7 +1683,6 @@ void Assembler::repmovsb() { ...@@ -1785,7 +1683,6 @@ void Assembler::repmovsb() {
void Assembler::repmovsw() { void Assembler::repmovsw() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); // Operand size override. emit(0x66); // Operand size override.
emit(0xF3); emit(0xF3);
emit(0xA4); emit(0xA4);
...@@ -1794,7 +1691,6 @@ void Assembler::repmovsw() { ...@@ -1794,7 +1691,6 @@ void Assembler::repmovsw() {
void Assembler::repmovsl() { void Assembler::repmovsl() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF3); emit(0xF3);
emit(0xA5); emit(0xA5);
} }
...@@ -1802,7 +1698,6 @@ void Assembler::repmovsl() { ...@@ -1802,7 +1698,6 @@ void Assembler::repmovsl() {
void Assembler::repmovsq() { void Assembler::repmovsq() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF3); emit(0xF3);
emit_rex_64(); emit_rex_64();
emit(0xA5); emit(0xA5);
...@@ -1811,7 +1706,6 @@ void Assembler::repmovsq() { ...@@ -1811,7 +1706,6 @@ void Assembler::repmovsq() {
void Assembler::mul(Register src) { void Assembler::mul(Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(src); emit_rex_64(src);
emit(0xF7); emit(0xF7);
emit_modrm(0x4, src); emit_modrm(0x4, src);
...@@ -1820,7 +1714,6 @@ void Assembler::mul(Register src) { ...@@ -1820,7 +1714,6 @@ void Assembler::mul(Register src) {
void Assembler::neg(Register dst) { void Assembler::neg(Register dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xF7); emit(0xF7);
emit_modrm(0x3, dst); emit_modrm(0x3, dst);
...@@ -1829,7 +1722,6 @@ void Assembler::neg(Register dst) { ...@@ -1829,7 +1722,6 @@ void Assembler::neg(Register dst) {
void Assembler::negl(Register dst) { void Assembler::negl(Register dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0xF7); emit(0xF7);
emit_modrm(0x3, dst); emit_modrm(0x3, dst);
...@@ -1838,7 +1730,6 @@ void Assembler::negl(Register dst) { ...@@ -1838,7 +1730,6 @@ void Assembler::negl(Register dst) {
void Assembler::neg(const Operand& dst) { void Assembler::neg(const Operand& dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xF7); emit(0xF7);
emit_operand(3, dst); emit_operand(3, dst);
...@@ -1847,14 +1738,12 @@ void Assembler::neg(const Operand& dst) { ...@@ -1847,14 +1738,12 @@ void Assembler::neg(const Operand& dst) {
void Assembler::nop() { void Assembler::nop() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x90); emit(0x90);
} }
void Assembler::not_(Register dst) { void Assembler::not_(Register dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xF7); emit(0xF7);
emit_modrm(0x2, dst); emit_modrm(0x2, dst);
...@@ -1863,7 +1752,6 @@ void Assembler::not_(Register dst) { ...@@ -1863,7 +1752,6 @@ void Assembler::not_(Register dst) {
void Assembler::not_(const Operand& dst) { void Assembler::not_(const Operand& dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(dst); emit_rex_64(dst);
emit(0xF7); emit(0xF7);
emit_operand(2, dst); emit_operand(2, dst);
...@@ -1872,7 +1760,6 @@ void Assembler::not_(const Operand& dst) { ...@@ -1872,7 +1760,6 @@ void Assembler::not_(const Operand& dst) {
void Assembler::notl(Register dst) { void Assembler::notl(Register dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0xF7); emit(0xF7);
emit_modrm(0x2, dst); emit_modrm(0x2, dst);
...@@ -1897,7 +1784,6 @@ void Assembler::nop(int n) { ...@@ -1897,7 +1784,6 @@ void Assembler::nop(int n) {
ASSERT(1 <= n); ASSERT(1 <= n);
ASSERT(n <= 9); ASSERT(n <= 9);
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
switch (n) { switch (n) {
case 1: case 1:
emit(0x90); emit(0x90);
...@@ -1968,7 +1854,6 @@ void Assembler::nop(int n) { ...@@ -1968,7 +1854,6 @@ void Assembler::nop(int n) {
void Assembler::pop(Register dst) { void Assembler::pop(Register dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0x58 | dst.low_bits()); emit(0x58 | dst.low_bits());
} }
...@@ -1976,7 +1861,6 @@ void Assembler::pop(Register dst) { ...@@ -1976,7 +1861,6 @@ void Assembler::pop(Register dst) {
void Assembler::pop(const Operand& dst) { void Assembler::pop(const Operand& dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(dst); emit_optional_rex_32(dst);
emit(0x8F); emit(0x8F);
emit_operand(0, dst); emit_operand(0, dst);
...@@ -1985,14 +1869,12 @@ void Assembler::pop(const Operand& dst) { ...@@ -1985,14 +1869,12 @@ void Assembler::pop(const Operand& dst) {
void Assembler::popfq() { void Assembler::popfq() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x9D); emit(0x9D);
} }
void Assembler::push(Register src) { void Assembler::push(Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(src); emit_optional_rex_32(src);
emit(0x50 | src.low_bits()); emit(0x50 | src.low_bits());
} }
...@@ -2000,7 +1882,6 @@ void Assembler::push(Register src) { ...@@ -2000,7 +1882,6 @@ void Assembler::push(Register src) {
void Assembler::push(const Operand& src) { void Assembler::push(const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(src); emit_optional_rex_32(src);
emit(0xFF); emit(0xFF);
emit_operand(6, src); emit_operand(6, src);
...@@ -2009,7 +1890,6 @@ void Assembler::push(const Operand& src) { ...@@ -2009,7 +1890,6 @@ void Assembler::push(const Operand& src) {
void Assembler::push(Immediate value) { void Assembler::push(Immediate value) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (is_int8(value.value_)) { if (is_int8(value.value_)) {
emit(0x6A); emit(0x6A);
emit(value.value_); // Emit low byte of value. emit(value.value_); // Emit low byte of value.
...@@ -2022,7 +1902,6 @@ void Assembler::push(Immediate value) { ...@@ -2022,7 +1902,6 @@ void Assembler::push(Immediate value) {
void Assembler::push_imm32(int32_t imm32) { void Assembler::push_imm32(int32_t imm32) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x68); emit(0x68);
emitl(imm32); emitl(imm32);
} }
...@@ -2030,14 +1909,12 @@ void Assembler::push_imm32(int32_t imm32) { ...@@ -2030,14 +1909,12 @@ void Assembler::push_imm32(int32_t imm32) {
void Assembler::pushfq() { void Assembler::pushfq() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x9C); emit(0x9C);
} }
void Assembler::rdtsc() { void Assembler::rdtsc() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x0F); emit(0x0F);
emit(0x31); emit(0x31);
} }
...@@ -2045,7 +1922,6 @@ void Assembler::rdtsc() { ...@@ -2045,7 +1922,6 @@ void Assembler::rdtsc() {
void Assembler::ret(int imm16) { void Assembler::ret(int imm16) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT(is_uint16(imm16)); ASSERT(is_uint16(imm16));
if (imm16 == 0) { if (imm16 == 0) {
emit(0xC3); emit(0xC3);
...@@ -2063,7 +1939,6 @@ void Assembler::setcc(Condition cc, Register reg) { ...@@ -2063,7 +1939,6 @@ void Assembler::setcc(Condition cc, Register reg) {
return; return;
} }
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
ASSERT(is_uint4(cc)); ASSERT(is_uint4(cc));
if (reg.code() > 3) { // Use x64 byte registers, where different. if (reg.code() > 3) { // Use x64 byte registers, where different.
emit_rex_32(reg); emit_rex_32(reg);
...@@ -2076,7 +1951,6 @@ void Assembler::setcc(Condition cc, Register reg) { ...@@ -2076,7 +1951,6 @@ void Assembler::setcc(Condition cc, Register reg) {
void Assembler::shld(Register dst, Register src) { void Assembler::shld(Register dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(src, dst); emit_rex_64(src, dst);
emit(0x0F); emit(0x0F);
emit(0xA5); emit(0xA5);
...@@ -2086,7 +1960,6 @@ void Assembler::shld(Register dst, Register src) { ...@@ -2086,7 +1960,6 @@ void Assembler::shld(Register dst, Register src) {
void Assembler::shrd(Register dst, Register src) { void Assembler::shrd(Register dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(src, dst); emit_rex_64(src, dst);
emit(0x0F); emit(0x0F);
emit(0xAD); emit(0xAD);
...@@ -2096,7 +1969,6 @@ void Assembler::shrd(Register dst, Register src) { ...@@ -2096,7 +1969,6 @@ void Assembler::shrd(Register dst, Register src) {
void Assembler::xchg(Register dst, Register src) { void Assembler::xchg(Register dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (src.is(rax) || dst.is(rax)) { // Single-byte encoding if (src.is(rax) || dst.is(rax)) { // Single-byte encoding
Register other = src.is(rax) ? dst : src; Register other = src.is(rax) ? dst : src;
emit_rex_64(other); emit_rex_64(other);
...@@ -2115,7 +1987,6 @@ void Assembler::xchg(Register dst, Register src) { ...@@ -2115,7 +1987,6 @@ void Assembler::xchg(Register dst, Register src) {
void Assembler::store_rax(void* dst, RelocInfo::Mode mode) { void Assembler::store_rax(void* dst, RelocInfo::Mode mode) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x48); // REX.W emit(0x48); // REX.W
emit(0xA3); emit(0xA3);
emitq(reinterpret_cast<uintptr_t>(dst), mode); emitq(reinterpret_cast<uintptr_t>(dst), mode);
...@@ -2129,7 +2000,6 @@ void Assembler::store_rax(ExternalReference ref) { ...@@ -2129,7 +2000,6 @@ void Assembler::store_rax(ExternalReference ref) {
void Assembler::testb(Register dst, Register src) { void Assembler::testb(Register dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (src.low_bits() == 4) { if (src.low_bits() == 4) {
emit_rex_32(src, dst); emit_rex_32(src, dst);
emit(0x84); emit(0x84);
...@@ -2148,7 +2018,6 @@ void Assembler::testb(Register dst, Register src) { ...@@ -2148,7 +2018,6 @@ void Assembler::testb(Register dst, Register src) {
void Assembler::testb(Register reg, Immediate mask) { void Assembler::testb(Register reg, Immediate mask) {
ASSERT(is_int8(mask.value_) || is_uint8(mask.value_)); ASSERT(is_int8(mask.value_) || is_uint8(mask.value_));
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (reg.is(rax)) { if (reg.is(rax)) {
emit(0xA8); emit(0xA8);
emit(mask.value_); // Low byte emitted. emit(mask.value_); // Low byte emitted.
...@@ -2167,7 +2036,6 @@ void Assembler::testb(Register reg, Immediate mask) { ...@@ -2167,7 +2036,6 @@ void Assembler::testb(Register reg, Immediate mask) {
void Assembler::testb(const Operand& op, Immediate mask) { void Assembler::testb(const Operand& op, Immediate mask) {
ASSERT(is_int8(mask.value_) || is_uint8(mask.value_)); ASSERT(is_int8(mask.value_) || is_uint8(mask.value_));
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(rax, op); emit_optional_rex_32(rax, op);
emit(0xF6); emit(0xF6);
emit_operand(rax, op); // Operation code 0 emit_operand(rax, op); // Operation code 0
...@@ -2177,7 +2045,6 @@ void Assembler::testb(const Operand& op, Immediate mask) { ...@@ -2177,7 +2045,6 @@ void Assembler::testb(const Operand& op, Immediate mask) {
void Assembler::testb(const Operand& op, Register reg) { void Assembler::testb(const Operand& op, Register reg) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (reg.code() > 3) { if (reg.code() > 3) {
// Register is not one of al, bl, cl, dl. Its encoding needs REX. // Register is not one of al, bl, cl, dl. Its encoding needs REX.
emit_rex_32(reg, op); emit_rex_32(reg, op);
...@@ -2191,7 +2058,6 @@ void Assembler::testb(const Operand& op, Register reg) { ...@@ -2191,7 +2058,6 @@ void Assembler::testb(const Operand& op, Register reg) {
void Assembler::testl(Register dst, Register src) { void Assembler::testl(Register dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (src.low_bits() == 4) { if (src.low_bits() == 4) {
emit_optional_rex_32(src, dst); emit_optional_rex_32(src, dst);
emit(0x85); emit(0x85);
...@@ -2211,7 +2077,6 @@ void Assembler::testl(Register reg, Immediate mask) { ...@@ -2211,7 +2077,6 @@ void Assembler::testl(Register reg, Immediate mask) {
return; return;
} }
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (reg.is(rax)) { if (reg.is(rax)) {
emit(0xA9); emit(0xA9);
emit(mask); emit(mask);
...@@ -2231,7 +2096,6 @@ void Assembler::testl(const Operand& op, Immediate mask) { ...@@ -2231,7 +2096,6 @@ void Assembler::testl(const Operand& op, Immediate mask) {
return; return;
} }
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(rax, op); emit_optional_rex_32(rax, op);
emit(0xF7); emit(0xF7);
emit_operand(rax, op); // Operation code 0 emit_operand(rax, op); // Operation code 0
...@@ -2241,7 +2105,6 @@ void Assembler::testl(const Operand& op, Immediate mask) { ...@@ -2241,7 +2105,6 @@ void Assembler::testl(const Operand& op, Immediate mask) {
void Assembler::testq(const Operand& op, Register reg) { void Assembler::testq(const Operand& op, Register reg) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_rex_64(reg, op); emit_rex_64(reg, op);
emit(0x85); emit(0x85);
emit_operand(reg, op); emit_operand(reg, op);
...@@ -2250,7 +2113,6 @@ void Assembler::testq(const Operand& op, Register reg) { ...@@ -2250,7 +2113,6 @@ void Assembler::testq(const Operand& op, Register reg) {
void Assembler::testq(Register dst, Register src) { void Assembler::testq(Register dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (src.low_bits() == 4) { if (src.low_bits() == 4) {
emit_rex_64(src, dst); emit_rex_64(src, dst);
emit(0x85); emit(0x85);
...@@ -2265,7 +2127,6 @@ void Assembler::testq(Register dst, Register src) { ...@@ -2265,7 +2127,6 @@ void Assembler::testq(Register dst, Register src) {
void Assembler::testq(Register dst, Immediate mask) { void Assembler::testq(Register dst, Immediate mask) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
if (dst.is(rax)) { if (dst.is(rax)) {
emit_rex_64(); emit_rex_64();
emit(0xA9); emit(0xA9);
...@@ -2284,14 +2145,12 @@ void Assembler::testq(Register dst, Immediate mask) { ...@@ -2284,14 +2145,12 @@ void Assembler::testq(Register dst, Immediate mask) {
void Assembler::fld(int i) { void Assembler::fld(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xD9, 0xC0, i); emit_farith(0xD9, 0xC0, i);
} }
void Assembler::fld1() { void Assembler::fld1() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xE8); emit(0xE8);
} }
...@@ -2299,7 +2158,6 @@ void Assembler::fld1() { ...@@ -2299,7 +2158,6 @@ void Assembler::fld1() {
void Assembler::fldz() { void Assembler::fldz() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xEE); emit(0xEE);
} }
...@@ -2307,7 +2165,6 @@ void Assembler::fldz() { ...@@ -2307,7 +2165,6 @@ void Assembler::fldz() {
void Assembler::fldpi() { void Assembler::fldpi() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xEB); emit(0xEB);
} }
...@@ -2315,7 +2172,6 @@ void Assembler::fldpi() { ...@@ -2315,7 +2172,6 @@ void Assembler::fldpi() {
void Assembler::fldln2() { void Assembler::fldln2() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xED); emit(0xED);
} }
...@@ -2323,7 +2179,6 @@ void Assembler::fldln2() { ...@@ -2323,7 +2179,6 @@ void Assembler::fldln2() {
void Assembler::fld_s(const Operand& adr) { void Assembler::fld_s(const Operand& adr) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xD9); emit(0xD9);
emit_operand(0, adr); emit_operand(0, adr);
...@@ -2332,7 +2187,6 @@ void Assembler::fld_s(const Operand& adr) { ...@@ -2332,7 +2187,6 @@ void Assembler::fld_s(const Operand& adr) {
void Assembler::fld_d(const Operand& adr) { void Assembler::fld_d(const Operand& adr) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xDD); emit(0xDD);
emit_operand(0, adr); emit_operand(0, adr);
...@@ -2341,7 +2195,6 @@ void Assembler::fld_d(const Operand& adr) { ...@@ -2341,7 +2195,6 @@ void Assembler::fld_d(const Operand& adr) {
void Assembler::fstp_s(const Operand& adr) { void Assembler::fstp_s(const Operand& adr) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xD9); emit(0xD9);
emit_operand(3, adr); emit_operand(3, adr);
...@@ -2350,7 +2203,6 @@ void Assembler::fstp_s(const Operand& adr) { ...@@ -2350,7 +2203,6 @@ void Assembler::fstp_s(const Operand& adr) {
void Assembler::fstp_d(const Operand& adr) { void Assembler::fstp_d(const Operand& adr) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xDD); emit(0xDD);
emit_operand(3, adr); emit_operand(3, adr);
...@@ -2360,14 +2212,12 @@ void Assembler::fstp_d(const Operand& adr) { ...@@ -2360,14 +2212,12 @@ void Assembler::fstp_d(const Operand& adr) {
void Assembler::fstp(int index) { void Assembler::fstp(int index) {
ASSERT(is_uint3(index)); ASSERT(is_uint3(index));
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDD, 0xD8, index); emit_farith(0xDD, 0xD8, index);
} }
void Assembler::fild_s(const Operand& adr) { void Assembler::fild_s(const Operand& adr) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xDB); emit(0xDB);
emit_operand(0, adr); emit_operand(0, adr);
...@@ -2376,7 +2226,6 @@ void Assembler::fild_s(const Operand& adr) { ...@@ -2376,7 +2226,6 @@ void Assembler::fild_s(const Operand& adr) {
void Assembler::fild_d(const Operand& adr) { void Assembler::fild_d(const Operand& adr) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xDF); emit(0xDF);
emit_operand(5, adr); emit_operand(5, adr);
...@@ -2385,7 +2234,6 @@ void Assembler::fild_d(const Operand& adr) { ...@@ -2385,7 +2234,6 @@ void Assembler::fild_d(const Operand& adr) {
void Assembler::fistp_s(const Operand& adr) { void Assembler::fistp_s(const Operand& adr) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xDB); emit(0xDB);
emit_operand(3, adr); emit_operand(3, adr);
...@@ -2395,7 +2243,6 @@ void Assembler::fistp_s(const Operand& adr) { ...@@ -2395,7 +2243,6 @@ void Assembler::fistp_s(const Operand& adr) {
void Assembler::fisttp_s(const Operand& adr) { void Assembler::fisttp_s(const Operand& adr) {
ASSERT(CpuFeatures::IsEnabled(SSE3)); ASSERT(CpuFeatures::IsEnabled(SSE3));
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xDB); emit(0xDB);
emit_operand(1, adr); emit_operand(1, adr);
...@@ -2405,7 +2252,6 @@ void Assembler::fisttp_s(const Operand& adr) { ...@@ -2405,7 +2252,6 @@ void Assembler::fisttp_s(const Operand& adr) {
void Assembler::fisttp_d(const Operand& adr) { void Assembler::fisttp_d(const Operand& adr) {
ASSERT(CpuFeatures::IsEnabled(SSE3)); ASSERT(CpuFeatures::IsEnabled(SSE3));
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xDD); emit(0xDD);
emit_operand(1, adr); emit_operand(1, adr);
...@@ -2414,7 +2260,6 @@ void Assembler::fisttp_d(const Operand& adr) { ...@@ -2414,7 +2260,6 @@ void Assembler::fisttp_d(const Operand& adr) {
void Assembler::fist_s(const Operand& adr) { void Assembler::fist_s(const Operand& adr) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xDB); emit(0xDB);
emit_operand(2, adr); emit_operand(2, adr);
...@@ -2423,7 +2268,6 @@ void Assembler::fist_s(const Operand& adr) { ...@@ -2423,7 +2268,6 @@ void Assembler::fist_s(const Operand& adr) {
void Assembler::fistp_d(const Operand& adr) { void Assembler::fistp_d(const Operand& adr) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xDF); emit(0xDF);
emit_operand(7, adr); emit_operand(7, adr);
...@@ -2432,7 +2276,6 @@ void Assembler::fistp_d(const Operand& adr) { ...@@ -2432,7 +2276,6 @@ void Assembler::fistp_d(const Operand& adr) {
void Assembler::fabs() { void Assembler::fabs() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xE1); emit(0xE1);
} }
...@@ -2440,7 +2283,6 @@ void Assembler::fabs() { ...@@ -2440,7 +2283,6 @@ void Assembler::fabs() {
void Assembler::fchs() { void Assembler::fchs() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xE0); emit(0xE0);
} }
...@@ -2448,7 +2290,6 @@ void Assembler::fchs() { ...@@ -2448,7 +2290,6 @@ void Assembler::fchs() {
void Assembler::fcos() { void Assembler::fcos() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xFF); emit(0xFF);
} }
...@@ -2456,7 +2297,6 @@ void Assembler::fcos() { ...@@ -2456,7 +2297,6 @@ void Assembler::fcos() {
void Assembler::fsin() { void Assembler::fsin() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xFE); emit(0xFE);
} }
...@@ -2464,7 +2304,6 @@ void Assembler::fsin() { ...@@ -2464,7 +2304,6 @@ void Assembler::fsin() {
void Assembler::fyl2x() { void Assembler::fyl2x() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xF1); emit(0xF1);
} }
...@@ -2472,21 +2311,18 @@ void Assembler::fyl2x() { ...@@ -2472,21 +2311,18 @@ void Assembler::fyl2x() {
void Assembler::fadd(int i) { void Assembler::fadd(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDC, 0xC0, i); emit_farith(0xDC, 0xC0, i);
} }
void Assembler::fsub(int i) { void Assembler::fsub(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDC, 0xE8, i); emit_farith(0xDC, 0xE8, i);
} }
void Assembler::fisub_s(const Operand& adr) { void Assembler::fisub_s(const Operand& adr) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_optional_rex_32(adr); emit_optional_rex_32(adr);
emit(0xDA); emit(0xDA);
emit_operand(4, adr); emit_operand(4, adr);
...@@ -2495,56 +2331,48 @@ void Assembler::fisub_s(const Operand& adr) { ...@@ -2495,56 +2331,48 @@ void Assembler::fisub_s(const Operand& adr) {
void Assembler::fmul(int i) { void Assembler::fmul(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDC, 0xC8, i); emit_farith(0xDC, 0xC8, i);
} }
void Assembler::fdiv(int i) { void Assembler::fdiv(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDC, 0xF8, i); emit_farith(0xDC, 0xF8, i);
} }
void Assembler::faddp(int i) { void Assembler::faddp(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDE, 0xC0, i); emit_farith(0xDE, 0xC0, i);
} }
void Assembler::fsubp(int i) { void Assembler::fsubp(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDE, 0xE8, i); emit_farith(0xDE, 0xE8, i);
} }
void Assembler::fsubrp(int i) { void Assembler::fsubrp(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDE, 0xE0, i); emit_farith(0xDE, 0xE0, i);
} }
void Assembler::fmulp(int i) { void Assembler::fmulp(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDE, 0xC8, i); emit_farith(0xDE, 0xC8, i);
} }
void Assembler::fdivp(int i) { void Assembler::fdivp(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDE, 0xF8, i); emit_farith(0xDE, 0xF8, i);
} }
void Assembler::fprem() { void Assembler::fprem() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xF8); emit(0xF8);
} }
...@@ -2552,7 +2380,6 @@ void Assembler::fprem() { ...@@ -2552,7 +2380,6 @@ void Assembler::fprem() {
void Assembler::fprem1() { void Assembler::fprem1() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xF5); emit(0xF5);
} }
...@@ -2560,14 +2387,12 @@ void Assembler::fprem1() { ...@@ -2560,14 +2387,12 @@ void Assembler::fprem1() {
void Assembler::fxch(int i) { void Assembler::fxch(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xD9, 0xC8, i); emit_farith(0xD9, 0xC8, i);
} }
void Assembler::fincstp() { void Assembler::fincstp() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xF7); emit(0xF7);
} }
...@@ -2575,14 +2400,12 @@ void Assembler::fincstp() { ...@@ -2575,14 +2400,12 @@ void Assembler::fincstp() {
void Assembler::ffree(int i) { void Assembler::ffree(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDD, 0xC0, i); emit_farith(0xDD, 0xC0, i);
} }
void Assembler::ftst() { void Assembler::ftst() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xE4); emit(0xE4);
} }
...@@ -2590,14 +2413,12 @@ void Assembler::ftst() { ...@@ -2590,14 +2413,12 @@ void Assembler::ftst() {
void Assembler::fucomp(int i) { void Assembler::fucomp(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit_farith(0xDD, 0xE8, i); emit_farith(0xDD, 0xE8, i);
} }
void Assembler::fucompp() { void Assembler::fucompp() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xDA); emit(0xDA);
emit(0xE9); emit(0xE9);
} }
...@@ -2605,7 +2426,6 @@ void Assembler::fucompp() { ...@@ -2605,7 +2426,6 @@ void Assembler::fucompp() {
void Assembler::fucomi(int i) { void Assembler::fucomi(int i) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xDB); emit(0xDB);
emit(0xE8 + i); emit(0xE8 + i);
} }
...@@ -2613,7 +2433,6 @@ void Assembler::fucomi(int i) { ...@@ -2613,7 +2433,6 @@ void Assembler::fucomi(int i) {
void Assembler::fucomip() { void Assembler::fucomip() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xDF); emit(0xDF);
emit(0xE9); emit(0xE9);
} }
...@@ -2621,7 +2440,6 @@ void Assembler::fucomip() { ...@@ -2621,7 +2440,6 @@ void Assembler::fucomip() {
void Assembler::fcompp() { void Assembler::fcompp() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xDE); emit(0xDE);
emit(0xD9); emit(0xD9);
} }
...@@ -2629,7 +2447,6 @@ void Assembler::fcompp() { ...@@ -2629,7 +2447,6 @@ void Assembler::fcompp() {
void Assembler::fnstsw_ax() { void Assembler::fnstsw_ax() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xDF); emit(0xDF);
emit(0xE0); emit(0xE0);
} }
...@@ -2637,14 +2454,12 @@ void Assembler::fnstsw_ax() { ...@@ -2637,14 +2454,12 @@ void Assembler::fnstsw_ax() {
void Assembler::fwait() { void Assembler::fwait() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x9B); emit(0x9B);
} }
void Assembler::frndint() { void Assembler::frndint() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xD9); emit(0xD9);
emit(0xFC); emit(0xFC);
} }
...@@ -2652,7 +2467,6 @@ void Assembler::frndint() { ...@@ -2652,7 +2467,6 @@ void Assembler::frndint() {
void Assembler::fnclex() { void Assembler::fnclex() {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xDB); emit(0xDB);
emit(0xE2); emit(0xE2);
} }
...@@ -2662,7 +2476,6 @@ void Assembler::sahf() { ...@@ -2662,7 +2476,6 @@ void Assembler::sahf() {
// TODO(X64): Test for presence. Not all 64-bit intel CPU's have sahf // TODO(X64): Test for presence. Not all 64-bit intel CPU's have sahf
// in 64-bit mode. Test CpuID. // in 64-bit mode. Test CpuID.
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x9E); emit(0x9E);
} }
...@@ -2678,7 +2491,6 @@ void Assembler::emit_farith(int b1, int b2, int i) { ...@@ -2678,7 +2491,6 @@ void Assembler::emit_farith(int b1, int b2, int i) {
void Assembler::movd(XMMRegister dst, Register src) { void Assembler::movd(XMMRegister dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2689,7 +2501,6 @@ void Assembler::movd(XMMRegister dst, Register src) { ...@@ -2689,7 +2501,6 @@ void Assembler::movd(XMMRegister dst, Register src) {
void Assembler::movd(Register dst, XMMRegister src) { void Assembler::movd(Register dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_optional_rex_32(src, dst); emit_optional_rex_32(src, dst);
emit(0x0F); emit(0x0F);
...@@ -2700,7 +2511,6 @@ void Assembler::movd(Register dst, XMMRegister src) { ...@@ -2700,7 +2511,6 @@ void Assembler::movd(Register dst, XMMRegister src) {
void Assembler::movq(XMMRegister dst, Register src) { void Assembler::movq(XMMRegister dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2711,7 +2521,6 @@ void Assembler::movq(XMMRegister dst, Register src) { ...@@ -2711,7 +2521,6 @@ void Assembler::movq(XMMRegister dst, Register src) {
void Assembler::movq(Register dst, XMMRegister src) { void Assembler::movq(Register dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_rex_64(src, dst); emit_rex_64(src, dst);
emit(0x0F); emit(0x0F);
...@@ -2721,9 +2530,7 @@ void Assembler::movq(Register dst, XMMRegister src) { ...@@ -2721,9 +2530,7 @@ void Assembler::movq(Register dst, XMMRegister src) {
void Assembler::movdqa(const Operand& dst, XMMRegister src) { void Assembler::movdqa(const Operand& dst, XMMRegister src) {
ASSERT(CpuFeatures::IsEnabled(SSE2));
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_rex_64(src, dst); emit_rex_64(src, dst);
emit(0x0F); emit(0x0F);
...@@ -2733,9 +2540,7 @@ void Assembler::movdqa(const Operand& dst, XMMRegister src) { ...@@ -2733,9 +2540,7 @@ void Assembler::movdqa(const Operand& dst, XMMRegister src) {
void Assembler::movdqa(XMMRegister dst, const Operand& src) { void Assembler::movdqa(XMMRegister dst, const Operand& src) {
ASSERT(CpuFeatures::IsEnabled(SSE2));
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2747,7 +2552,6 @@ void Assembler::movdqa(XMMRegister dst, const Operand& src) { ...@@ -2747,7 +2552,6 @@ void Assembler::movdqa(XMMRegister dst, const Operand& src) {
void Assembler::extractps(Register dst, XMMRegister src, byte imm8) { void Assembler::extractps(Register dst, XMMRegister src, byte imm8) {
ASSERT(is_uint2(imm8)); ASSERT(is_uint2(imm8));
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2760,7 +2564,6 @@ void Assembler::extractps(Register dst, XMMRegister src, byte imm8) { ...@@ -2760,7 +2564,6 @@ void Assembler::extractps(Register dst, XMMRegister src, byte imm8) {
void Assembler::movsd(const Operand& dst, XMMRegister src) { void Assembler::movsd(const Operand& dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); // double emit(0xF2); // double
emit_optional_rex_32(src, dst); emit_optional_rex_32(src, dst);
emit(0x0F); emit(0x0F);
...@@ -2771,7 +2574,6 @@ void Assembler::movsd(const Operand& dst, XMMRegister src) { ...@@ -2771,7 +2574,6 @@ void Assembler::movsd(const Operand& dst, XMMRegister src) {
void Assembler::movsd(XMMRegister dst, XMMRegister src) { void Assembler::movsd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); // double emit(0xF2); // double
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2782,7 +2584,6 @@ void Assembler::movsd(XMMRegister dst, XMMRegister src) { ...@@ -2782,7 +2584,6 @@ void Assembler::movsd(XMMRegister dst, XMMRegister src) {
void Assembler::movsd(XMMRegister dst, const Operand& src) { void Assembler::movsd(XMMRegister dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); // double emit(0xF2); // double
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2793,7 +2594,6 @@ void Assembler::movsd(XMMRegister dst, const Operand& src) { ...@@ -2793,7 +2594,6 @@ void Assembler::movsd(XMMRegister dst, const Operand& src) {
void Assembler::movss(XMMRegister dst, const Operand& src) { void Assembler::movss(XMMRegister dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF3); // single emit(0xF3); // single
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2804,7 +2604,6 @@ void Assembler::movss(XMMRegister dst, const Operand& src) { ...@@ -2804,7 +2604,6 @@ void Assembler::movss(XMMRegister dst, const Operand& src) {
void Assembler::movss(const Operand& src, XMMRegister dst) { void Assembler::movss(const Operand& src, XMMRegister dst) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF3); // single emit(0xF3); // single
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2815,7 +2614,6 @@ void Assembler::movss(const Operand& src, XMMRegister dst) { ...@@ -2815,7 +2614,6 @@ void Assembler::movss(const Operand& src, XMMRegister dst) {
void Assembler::cvttss2si(Register dst, const Operand& src) { void Assembler::cvttss2si(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF3); emit(0xF3);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2826,7 +2624,6 @@ void Assembler::cvttss2si(Register dst, const Operand& src) { ...@@ -2826,7 +2624,6 @@ void Assembler::cvttss2si(Register dst, const Operand& src) {
void Assembler::cvttss2si(Register dst, XMMRegister src) { void Assembler::cvttss2si(Register dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF3); emit(0xF3);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2837,7 +2634,6 @@ void Assembler::cvttss2si(Register dst, XMMRegister src) { ...@@ -2837,7 +2634,6 @@ void Assembler::cvttss2si(Register dst, XMMRegister src) {
void Assembler::cvttsd2si(Register dst, const Operand& src) { void Assembler::cvttsd2si(Register dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2848,7 +2644,6 @@ void Assembler::cvttsd2si(Register dst, const Operand& src) { ...@@ -2848,7 +2644,6 @@ void Assembler::cvttsd2si(Register dst, const Operand& src) {
void Assembler::cvttsd2si(Register dst, XMMRegister src) { void Assembler::cvttsd2si(Register dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2859,7 +2654,6 @@ void Assembler::cvttsd2si(Register dst, XMMRegister src) { ...@@ -2859,7 +2654,6 @@ void Assembler::cvttsd2si(Register dst, XMMRegister src) {
void Assembler::cvttsd2siq(Register dst, XMMRegister src) { void Assembler::cvttsd2siq(Register dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2870,7 +2664,6 @@ void Assembler::cvttsd2siq(Register dst, XMMRegister src) { ...@@ -2870,7 +2664,6 @@ void Assembler::cvttsd2siq(Register dst, XMMRegister src) {
void Assembler::cvtlsi2sd(XMMRegister dst, const Operand& src) { void Assembler::cvtlsi2sd(XMMRegister dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2881,7 +2674,6 @@ void Assembler::cvtlsi2sd(XMMRegister dst, const Operand& src) { ...@@ -2881,7 +2674,6 @@ void Assembler::cvtlsi2sd(XMMRegister dst, const Operand& src) {
void Assembler::cvtlsi2sd(XMMRegister dst, Register src) { void Assembler::cvtlsi2sd(XMMRegister dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2892,7 +2684,6 @@ void Assembler::cvtlsi2sd(XMMRegister dst, Register src) { ...@@ -2892,7 +2684,6 @@ void Assembler::cvtlsi2sd(XMMRegister dst, Register src) {
void Assembler::cvtlsi2ss(XMMRegister dst, Register src) { void Assembler::cvtlsi2ss(XMMRegister dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF3); emit(0xF3);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2903,7 +2694,6 @@ void Assembler::cvtlsi2ss(XMMRegister dst, Register src) { ...@@ -2903,7 +2694,6 @@ void Assembler::cvtlsi2ss(XMMRegister dst, Register src) {
void Assembler::cvtqsi2sd(XMMRegister dst, Register src) { void Assembler::cvtqsi2sd(XMMRegister dst, Register src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2914,7 +2704,6 @@ void Assembler::cvtqsi2sd(XMMRegister dst, Register src) { ...@@ -2914,7 +2704,6 @@ void Assembler::cvtqsi2sd(XMMRegister dst, Register src) {
void Assembler::cvtss2sd(XMMRegister dst, XMMRegister src) { void Assembler::cvtss2sd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF3); emit(0xF3);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2925,7 +2714,6 @@ void Assembler::cvtss2sd(XMMRegister dst, XMMRegister src) { ...@@ -2925,7 +2714,6 @@ void Assembler::cvtss2sd(XMMRegister dst, XMMRegister src) {
void Assembler::cvtss2sd(XMMRegister dst, const Operand& src) { void Assembler::cvtss2sd(XMMRegister dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF3); emit(0xF3);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2936,7 +2724,6 @@ void Assembler::cvtss2sd(XMMRegister dst, const Operand& src) { ...@@ -2936,7 +2724,6 @@ void Assembler::cvtss2sd(XMMRegister dst, const Operand& src) {
void Assembler::cvtsd2ss(XMMRegister dst, XMMRegister src) { void Assembler::cvtsd2ss(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2947,7 +2734,6 @@ void Assembler::cvtsd2ss(XMMRegister dst, XMMRegister src) { ...@@ -2947,7 +2734,6 @@ void Assembler::cvtsd2ss(XMMRegister dst, XMMRegister src) {
void Assembler::cvtsd2si(Register dst, XMMRegister src) { void Assembler::cvtsd2si(Register dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2958,7 +2744,6 @@ void Assembler::cvtsd2si(Register dst, XMMRegister src) { ...@@ -2958,7 +2744,6 @@ void Assembler::cvtsd2si(Register dst, XMMRegister src) {
void Assembler::cvtsd2siq(Register dst, XMMRegister src) { void Assembler::cvtsd2siq(Register dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_rex_64(dst, src); emit_rex_64(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2969,7 +2754,6 @@ void Assembler::cvtsd2siq(Register dst, XMMRegister src) { ...@@ -2969,7 +2754,6 @@ void Assembler::cvtsd2siq(Register dst, XMMRegister src) {
void Assembler::addsd(XMMRegister dst, XMMRegister src) { void Assembler::addsd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2980,7 +2764,6 @@ void Assembler::addsd(XMMRegister dst, XMMRegister src) { ...@@ -2980,7 +2764,6 @@ void Assembler::addsd(XMMRegister dst, XMMRegister src) {
void Assembler::mulsd(XMMRegister dst, XMMRegister src) { void Assembler::mulsd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -2991,7 +2774,6 @@ void Assembler::mulsd(XMMRegister dst, XMMRegister src) { ...@@ -2991,7 +2774,6 @@ void Assembler::mulsd(XMMRegister dst, XMMRegister src) {
void Assembler::subsd(XMMRegister dst, XMMRegister src) { void Assembler::subsd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -3002,7 +2784,6 @@ void Assembler::subsd(XMMRegister dst, XMMRegister src) { ...@@ -3002,7 +2784,6 @@ void Assembler::subsd(XMMRegister dst, XMMRegister src) {
void Assembler::divsd(XMMRegister dst, XMMRegister src) { void Assembler::divsd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -3013,7 +2794,6 @@ void Assembler::divsd(XMMRegister dst, XMMRegister src) { ...@@ -3013,7 +2794,6 @@ void Assembler::divsd(XMMRegister dst, XMMRegister src) {
void Assembler::andpd(XMMRegister dst, XMMRegister src) { void Assembler::andpd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -3024,7 +2804,6 @@ void Assembler::andpd(XMMRegister dst, XMMRegister src) { ...@@ -3024,7 +2804,6 @@ void Assembler::andpd(XMMRegister dst, XMMRegister src) {
void Assembler::orpd(XMMRegister dst, XMMRegister src) { void Assembler::orpd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -3035,7 +2814,6 @@ void Assembler::orpd(XMMRegister dst, XMMRegister src) { ...@@ -3035,7 +2814,6 @@ void Assembler::orpd(XMMRegister dst, XMMRegister src) {
void Assembler::xorpd(XMMRegister dst, XMMRegister src) { void Assembler::xorpd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -3046,7 +2824,6 @@ void Assembler::xorpd(XMMRegister dst, XMMRegister src) { ...@@ -3046,7 +2824,6 @@ void Assembler::xorpd(XMMRegister dst, XMMRegister src) {
void Assembler::sqrtsd(XMMRegister dst, XMMRegister src) { void Assembler::sqrtsd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0xF2); emit(0xF2);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0F); emit(0x0F);
...@@ -3057,7 +2834,6 @@ void Assembler::sqrtsd(XMMRegister dst, XMMRegister src) { ...@@ -3057,7 +2834,6 @@ void Assembler::sqrtsd(XMMRegister dst, XMMRegister src) {
void Assembler::ucomisd(XMMRegister dst, XMMRegister src) { void Assembler::ucomisd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0f); emit(0x0f);
...@@ -3068,7 +2844,6 @@ void Assembler::ucomisd(XMMRegister dst, XMMRegister src) { ...@@ -3068,7 +2844,6 @@ void Assembler::ucomisd(XMMRegister dst, XMMRegister src) {
void Assembler::ucomisd(XMMRegister dst, const Operand& src) { void Assembler::ucomisd(XMMRegister dst, const Operand& src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0f); emit(0x0f);
...@@ -3079,7 +2854,6 @@ void Assembler::ucomisd(XMMRegister dst, const Operand& src) { ...@@ -3079,7 +2854,6 @@ void Assembler::ucomisd(XMMRegister dst, const Operand& src) {
void Assembler::movmskpd(Register dst, XMMRegister src) { void Assembler::movmskpd(Register dst, XMMRegister src) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
last_pc_ = pc_;
emit(0x66); emit(0x66);
emit_optional_rex_32(dst, src); emit_optional_rex_32(dst, src);
emit(0x0f); emit(0x0f);
......
...@@ -1589,8 +1589,6 @@ class Assembler : public AssemblerBase { ...@@ -1589,8 +1589,6 @@ class Assembler : public AssemblerBase {
RelocInfoWriter reloc_info_writer; RelocInfoWriter reloc_info_writer;
List< Handle<Code> > code_targets_; List< Handle<Code> > code_targets_;
// push-pop elimination
byte* last_pc_;
PositionsRecorder positions_recorder_; PositionsRecorder positions_recorder_;
......
...@@ -2961,8 +2961,6 @@ void NumberToStringStub::GenerateLookupNumberStringCache(MacroAssembler* masm, ...@@ -2961,8 +2961,6 @@ void NumberToStringStub::GenerateLookupNumberStringCache(MacroAssembler* masm,
times_1, times_1,
FixedArray::kHeaderSize)); FixedArray::kHeaderSize));
__ JumpIfSmi(probe, not_found); __ JumpIfSmi(probe, not_found);
ASSERT(CpuFeatures::IsSupported(SSE2));
CpuFeatures::Scope fscope(SSE2);
__ movsd(xmm0, FieldOperand(object, HeapNumber::kValueOffset)); __ movsd(xmm0, FieldOperand(object, HeapNumber::kValueOffset));
__ movsd(xmm1, FieldOperand(probe, HeapNumber::kValueOffset)); __ movsd(xmm1, FieldOperand(probe, HeapNumber::kValueOffset));
__ ucomisd(xmm0, xmm1); __ ucomisd(xmm0, xmm1);
......
...@@ -600,7 +600,6 @@ void Deoptimizer::DoComputeFrame(TranslationIterator* iterator, ...@@ -600,7 +600,6 @@ void Deoptimizer::DoComputeFrame(TranslationIterator* iterator,
void Deoptimizer::EntryGenerator::Generate() { void Deoptimizer::EntryGenerator::Generate() {
GeneratePrologue(); GeneratePrologue();
CpuFeatures::Scope scope(SSE2);
// Save all general purpose registers before messing with them. // Save all general purpose registers before messing with them.
const int kNumberOfRegisters = Register::kNumRegisters; const int kNumberOfRegisters = Register::kNumRegisters;
......
...@@ -2744,7 +2744,6 @@ void LCodeGen::DoPower(LPower* instr) { ...@@ -2744,7 +2744,6 @@ void LCodeGen::DoPower(LPower* instr) {
ExternalReference::power_double_int_function(isolate()), 2); ExternalReference::power_double_int_function(isolate()), 2);
} else { } else {
ASSERT(exponent_type.IsTagged()); ASSERT(exponent_type.IsTagged());
CpuFeatures::Scope scope(SSE2);
Register right_reg = ToRegister(right); Register right_reg = ToRegister(right);
Label non_smi, call; Label non_smi, call;
......
...@@ -1613,10 +1613,8 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { ...@@ -1613,10 +1613,8 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
LOperand* value = UseRegister(instr->value()); LOperand* value = UseRegister(instr->value());
bool needs_check = !instr->value()->type().IsSmi(); bool needs_check = !instr->value()->type().IsSmi();
if (needs_check) { if (needs_check) {
LOperand* xmm_temp = LOperand* xmm_temp = instr->CanTruncateToInt32() ? NULL
(instr->CanTruncateToInt32() && CpuFeatures::IsSupported(SSE3)) : FixedTemp(xmm1);
? NULL
: FixedTemp(xmm1);
LTaggedToI* res = new LTaggedToI(value, xmm_temp); LTaggedToI* res = new LTaggedToI(value, xmm_temp);
return AssignEnvironment(DefineSameAsFirst(res)); return AssignEnvironment(DefineSameAsFirst(res));
} else { } else {
......
...@@ -2199,7 +2199,6 @@ void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space, ...@@ -2199,7 +2199,6 @@ void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space,
#endif #endif
// Optionally save all XMM registers. // Optionally save all XMM registers.
if (save_doubles) { if (save_doubles) {
CpuFeatures::Scope scope(SSE2);
int space = XMMRegister::kNumRegisters * kDoubleSize + int space = XMMRegister::kNumRegisters * kDoubleSize +
arg_stack_space * kPointerSize; arg_stack_space * kPointerSize;
subq(rsp, Immediate(space)); subq(rsp, Immediate(space));
......
...@@ -1202,9 +1202,6 @@ def BuildOptions(): ...@@ -1202,9 +1202,6 @@ def BuildOptions():
result.add_option("--nostress", result.add_option("--nostress",
help="Don't run crankshaft --always-opt --stress-op test", help="Don't run crankshaft --always-opt --stress-op test",
default=False, action="store_true") default=False, action="store_true")
result.add_option("--crankshaft",
help="Run with the --crankshaft flag",
default=False, action="store_true")
result.add_option("--shard-count", result.add_option("--shard-count",
help="Split testsuites into this number of shards", help="Split testsuites into this number of shards",
default=1, type="int") default=1, type="int")
...@@ -1245,13 +1242,6 @@ def ProcessOptions(options): ...@@ -1245,13 +1242,6 @@ def ProcessOptions(options):
global VARIANT_FLAGS global VARIANT_FLAGS
if options.stress_only: if options.stress_only:
VARIANT_FLAGS = [['--stress-opt', '--always-opt']] VARIANT_FLAGS = [['--stress-opt', '--always-opt']]
if options.nostress:
VARIANT_FLAGS = [[],['--nocrankshaft']]
if options.crankshaft:
if options.special_command:
options.special_command += " --crankshaft"
else:
options.special_command = "@--crankshaft"
if options.noprof: if options.noprof:
options.scons_flags.append("prof=off") options.scons_flags.append("prof=off")
options.scons_flags.append("profilingsupport=off") options.scons_flags.append("profilingsupport=off")
...@@ -1416,8 +1406,7 @@ def Main(): ...@@ -1416,8 +1406,7 @@ def Main():
'mode': mode, 'mode': mode,
'system': utils.GuessOS(), 'system': utils.GuessOS(),
'arch': options.arch, 'arch': options.arch,
'simulator': options.simulator, 'simulator': options.simulator
'crankshaft': options.crankshaft
} }
test_list = root.ListTests([], path, context, mode, []) test_list = root.ListTests([], path, context, mode, [])
unclassified_tests += test_list unclassified_tests += test_list
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment