Change some cmpq to cmpp, times_8 to times_pointer_size for x32 port.

R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/334793003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
haitao.feng@intel.com 2014-06-24 03:39:54 +00:00
parent 257adcf0ed
commit d8b5940abd
4 changed files with 12 additions and 11 deletions

View File

@ -2375,10 +2375,10 @@ void CallIC_ArrayStub::Generate(MacroAssembler* masm) {
__ SmiToInteger32(rdx, rdx); __ SmiToInteger32(rdx, rdx);
__ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, rcx); __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, rcx);
__ cmpq(rdi, rcx); __ cmpp(rdi, rcx);
__ j(not_equal, &miss); __ j(not_equal, &miss);
__ movq(rax, Immediate(arg_count())); __ movp(rax, Immediate(arg_count()));
__ movp(rbx, FieldOperand(rbx, rdx, times_pointer_size, __ movp(rbx, FieldOperand(rbx, rdx, times_pointer_size,
FixedArray::kHeaderSize)); FixedArray::kHeaderSize));
@ -2417,7 +2417,7 @@ void CallICStub::Generate(MacroAssembler* masm) {
// The checks. First, does rdi match the recorded monomorphic target? // The checks. First, does rdi match the recorded monomorphic target?
__ SmiToInteger32(rdx, rdx); __ SmiToInteger32(rdx, rdx);
__ cmpq(rdi, FieldOperand(rbx, rdx, times_pointer_size, __ cmpp(rdi, FieldOperand(rbx, rdx, times_pointer_size,
FixedArray::kHeaderSize)); FixedArray::kHeaderSize));
__ j(not_equal, &extra_checks_or_miss); __ j(not_equal, &extra_checks_or_miss);

View File

@ -2939,7 +2939,8 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
// rcx: valid entries in the descriptor array. // rcx: valid entries in the descriptor array.
// Calculate the end of the descriptor array. // Calculate the end of the descriptor array.
__ imulp(rcx, rcx, Immediate(DescriptorArray::kDescriptorSize)); __ imulp(rcx, rcx, Immediate(DescriptorArray::kDescriptorSize));
__ leap(rcx, Operand(r8, rcx, times_8, DescriptorArray::kFirstOffset)); __ leap(rcx,
Operand(r8, rcx, times_pointer_size, DescriptorArray::kFirstOffset));
// Calculate location of the first key name. // Calculate location of the first key name.
__ addp(r8, Immediate(DescriptorArray::kFirstOffset)); __ addp(r8, Immediate(DescriptorArray::kFirstOffset));
// Loop through all the keys in the descriptor array. If one of these is the // Loop through all the keys in the descriptor array. If one of these is the

View File

@ -167,7 +167,7 @@ bool LCodeGen::GeneratePrologue() {
#endif #endif
__ Push(rax); __ Push(rax);
__ Set(rax, slots); __ Set(rax, slots);
__ movq(kScratchRegister, kSlotsZapValue); __ Set(kScratchRegister, kSlotsZapValue);
Label loop; Label loop;
__ bind(&loop); __ bind(&loop);
__ movp(MemOperand(rsp, rax, times_pointer_size, 0), __ movp(MemOperand(rsp, rax, times_pointer_size, 0),
@ -744,7 +744,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
ExternalReference count = ExternalReference::stress_deopt_count(isolate()); ExternalReference count = ExternalReference::stress_deopt_count(isolate());
Label no_deopt; Label no_deopt;
__ pushfq(); __ pushfq();
__ Push(rax); __ pushq(rax);
Operand count_operand = masm()->ExternalOperand(count, kScratchRegister); Operand count_operand = masm()->ExternalOperand(count, kScratchRegister);
__ movl(rax, count_operand); __ movl(rax, count_operand);
__ subl(rax, Immediate(1)); __ subl(rax, Immediate(1));
@ -752,13 +752,13 @@ void LCodeGen::DeoptimizeIf(Condition cc,
if (FLAG_trap_on_deopt) __ int3(); if (FLAG_trap_on_deopt) __ int3();
__ movl(rax, Immediate(FLAG_deopt_every_n_times)); __ movl(rax, Immediate(FLAG_deopt_every_n_times));
__ movl(count_operand, rax); __ movl(count_operand, rax);
__ Pop(rax); __ popq(rax);
__ popfq(); __ popfq();
ASSERT(frame_is_built_); ASSERT(frame_is_built_);
__ call(entry, RelocInfo::RUNTIME_ENTRY); __ call(entry, RelocInfo::RUNTIME_ENTRY);
__ bind(&no_deopt); __ bind(&no_deopt);
__ movl(count_operand, rax); __ movl(count_operand, rax);
__ Pop(rax); __ popq(rax);
__ popfq(); __ popfq();
} }
@ -2746,7 +2746,7 @@ void LCodeGen::DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr,
__ Push(ToRegister(instr->value())); __ Push(ToRegister(instr->value()));
__ Push(instr->function()); __ Push(instr->function());
static const int kAdditionalDelta = 10; static const int kAdditionalDelta = kPointerSize == kInt64Size ? 10 : 16;
int delta = int delta =
masm_->SizeOfCodeGeneratedSince(map_check) + kAdditionalDelta; masm_->SizeOfCodeGeneratedSince(map_check) + kAdditionalDelta;
ASSERT(delta >= 0); ASSERT(delta >= 0);
@ -4715,7 +4715,7 @@ void LCodeGen::DoDeferredNumberTagIU(LInstruction* instr,
if (FLAG_inline_new) { if (FLAG_inline_new) {
__ AllocateHeapNumber(reg, tmp, &slow); __ AllocateHeapNumber(reg, tmp, &slow);
__ jmp(&done, Label::kNear); __ jmp(&done, kPointerSize == kInt64Size ? Label::kNear : Label::kFar);
} }
// Slow case: Call the runtime system to do the number allocation. // Slow case: Call the runtime system to do the number allocation.

View File

@ -1100,7 +1100,7 @@ void MacroAssembler::LoadSmiConstant(Register dst, Smi* source) {
if (emit_debug_code()) { if (emit_debug_code()) {
Move(dst, Smi::FromInt(kSmiConstantRegisterValue), Move(dst, Smi::FromInt(kSmiConstantRegisterValue),
Assembler::RelocInfoNone()); Assembler::RelocInfoNone());
cmpq(dst, kSmiConstantRegister); cmpp(dst, kSmiConstantRegister);
Assert(equal, kUninitializedKSmiConstantRegister); Assert(equal, kUninitializedKSmiConstantRegister);
} }
int value = source->value(); int value = source->value();