Esempio n. 1
0
uint8_t* Assembler::emitCall(void* ptr, Register scratch) {
    // emit a 64bit movabs because some caller expect a fixed number of bytes.
    // until they are fixed use the largest encoding.
    mov(Immediate(ptr), scratch, true /* force_64bit_load */);
    callq(scratch);
    return addr;
}
 INLINE ImmediateIndex processImm(ImmOpCode op, ImmediateIndex src0,
                                  ImmediateIndex src1, Type type) {
   const Immediate &imm0 = fn->getImmediate(src0);
   const Immediate &imm1 = fn->getImmediate(src1);
   const Immediate &dstImm = Immediate(op, imm0, imm1, type);
   return fn->newImmediate(dstImm);
 }
Esempio n. 3
0
void EntryNode::Compile(MacroAssembler* masm) {
  ASSERT(!is_marked());
  is_marked_ = true;
  Label deferred_enter, deferred_exit;
  {
    Comment cmnt(masm, "[ EntryNode");
    __ push(ebp);
    __ mov(ebp, esp);
    __ push(esi);
    __ push(edi);
    int count = CfgGlobals::current()->fun()->scope()->num_stack_slots();
    if (count > 0) {
      __ Set(eax, Immediate(Factory::undefined_value()));
      for (int i = 0; i < count; i++) {
        __ push(eax);
      }
    }
    if (FLAG_trace) {
      __ CallRuntime(Runtime::kTraceEnter, 0);
    }
    if (FLAG_check_stack) {
      ExternalReference stack_limit =
          ExternalReference::address_of_stack_guard_limit();
      __ cmp(esp, Operand::StaticVariable(stack_limit));
      __ j(below, &deferred_enter);
      __ bind(&deferred_exit);
    }
  }
  successor_->Compile(masm);
  if (FLAG_check_stack) {
    Comment cmnt(masm, "[ Deferred Stack Check");
    __ bind(&deferred_enter);
    StackCheckStub stub;
    __ CallStub(&stub);
    __ jmp(&deferred_exit);
  }
}
Esempio n. 4
0
void Constant::MoveToSlot(MacroAssembler* masm, SlotLocation* loc) {
  __ mov(ToOperand(loc), Immediate(handle_));
}
Esempio n. 5
0
void Constant::Push(MacroAssembler* masm) {
  __ push(Immediate(handle_));
}
Esempio n. 6
0
void Constant::Get(MacroAssembler* masm, Register reg) {
  __ mov(reg, Immediate(handle_));
}
Esempio n. 7
0
void Assembler::emitAnnotation(int num) {
    nop();
    cmp(RAX, Immediate(num));
    nop();
}
Esempio n. 8
0
uint8_t* Assembler::emitCall(void* ptr, Register scratch) {
    mov(Immediate(ptr), scratch);
    callq(scratch);
    return addr;
}
 INLINE ImmediateIndex processImm(ImmOpCode op, ImmediateIndex src, Type type) {
   const Immediate &imm = fn->getImmediate(src);
   const Immediate &dstImm = Immediate(op, imm, type);
   return fn->newImmediate(dstImm);
 }