Beispiel #1
0
void emitCall(Asm& a, TCA dest) {
  if (a.jmpDeltaFits(dest) && !Stats::enabled()) {
    a.    call(dest);
  } else {
    a.    call(tx64->getNativeTrampoline(dest));
  }
}
Beispiel #2
0
void emitCall(Asm& a, TCA dest) {
  if (a.jmpDeltaFits(dest) && !Stats::enabled()) {
    a.    call(dest);
  } else {
    a.    call(TranslatorX64::Get()->getNativeTrampoline(dest));
  }
}
Beispiel #3
0
void emitCall(Asm& a, TCA dest, RegSet args) {
  // NB: Keep this in sync with Vgen::emit(call) in vasm-x64.cpp.
  if (a.jmpDeltaFits(dest)) {
    a.call(dest);
  } else {
    // can't do a near call; store address in data section.
    // call by loading the address using rip-relative addressing.  This
    // assumes the data section is near the current code section.  Since
    // this sequence is directly in-line, rip-relative like this is
    // more compact than loading a 64-bit immediate.
    auto addr = mcg->allocLiteral((uint64_t)dest);
    a.call(rip[(intptr_t)addr]);
  }
}