当前位置: 首页>>代码示例>>C++>>正文


C++ MacroAssembler::frontier方法代码示例

本文整理汇总了C++中vixl::MacroAssembler::frontier方法的典型用法代码示例。如果您正苦于以下问题:C++ MacroAssembler::frontier方法的具体用法?C++ MacroAssembler::frontier怎么用?C++ MacroAssembler::frontier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vixl::MacroAssembler的用法示例。


在下文中一共展示了MacroAssembler::frontier方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: emitCall

TCA emitCall(vixl::MacroAssembler& a, CppCall call) {
  switch (call.kind()) {
  case CppCall::Kind::Direct:
    a. Mov  (rHostCallReg, reinterpret_cast<intptr_t>(call.address()));
    break;
  case CppCall::Kind::Virtual:
    a. Ldr  (rHostCallReg, argReg(0)[0]);
    a. Ldr  (rHostCallReg, rHostCallReg[call.vtableOffset()]);
    break;
  case CppCall::Kind::IndirectReg:
  case CppCall::Kind::IndirectVreg:
    // call indirect currently not implemented. It'll be something like
    // a.Br(x2a(call.getReg()))
    not_implemented();
    always_assert(0);
    break;
  case CppCall::Kind::ArrayVirt:
  case CppCall::Kind::Destructor:
    not_implemented();
    always_assert(0);
    break;
  }

  using namespace vixl;
  auto fixupAddr = a.frontier();
  a.   HostCall(6);

  // Note that the fixup address for a HostCall is directly *before* the
  // HostCall, not after as in the native case. This is because, in simulation
  // mode we look at the simulator's PC at the time the fixup is invoked, and it
  // will still be pointing to the HostCall; it's not advanced past it until the
  // host call returns. In the native case, by contrast, we'll be looking at
  // return addresses, which point after the call.
  return fixupAddr;
}
开发者ID:EdTsft,项目名称:hhvm,代码行数:35,代码来源:code-gen-helpers-arm.cpp

示例2: emitCallWithinTC

TCA emitCallWithinTC(vixl::MacroAssembler& a, TCA call) {
  a.   Mov     (rHostCallReg, reinterpret_cast<intptr_t>(call));

  a.   Blr     (rHostCallReg);
  auto fixupAddr = a.frontier();

  return fixupAddr;
}
开发者ID:EdTsft,项目名称:hhvm,代码行数:8,代码来源:code-gen-helpers-arm.cpp

示例3: emit

void Vgen::emit(jcc i) {
    assertx(i.cc != CC_None);
    if (i.targets[1] != i.targets[0]) {
        if (next == i.targets[1]) {
            // the taken branch is the fall-through block, invert the branch.
            i = jcc{ccNegate(i.cc), i.sf, {i.targets[1], i.targets[0]}};
        }
        jccs.push_back({a->frontier(), i.targets[1]});
        // B.cond range is +/- 1MB but this uses BR
        emitSmashableJcc(*codeBlock, env.meta, kEndOfTargetChain, i.cc);
    }
    emit(jmp{i.targets[0]});
}
开发者ID:gamer7569,项目名称:hhvm,代码行数:13,代码来源:vasm-arm.cpp

示例4: emitCall

TCA emitCall(vixl::MacroAssembler& a, CppCall call) {
  if (call.isDirect()) {
    a. Mov  (rHostCallReg, reinterpret_cast<intptr_t>(call.getAddress()));
  } else if (call.isVirtual()) {
    a. Ldr  (rHostCallReg, argReg(0)[0]);
    a. Ldr  (rHostCallReg, rHostCallReg[call.getOffset()]);
  } else {
    // call indirect currently not implemented. It'll be somthing like
    // a.Br(x2a(call.getReg()))
    not_implemented();
  }

  using namespace vixl;
  auto fixupAddr = a.frontier();
  a.   HostCall(6);

  // Note that the fixup address for a HostCall is directly *before* the
  // HostCall, not after as in the native case. This is because, in simulation
  // mode we look at the simulator's PC at the time the fixup is invoked, and it
  // will still be pointing to the HostCall; it's not advanced past it until the
  // host call returns. In the native case, by contrast, we'll be looking at
  // return addresses, which point after the call.
  return fixupAddr;
}
开发者ID:DirektSPEED,项目名称:hhvm,代码行数:24,代码来源:code-gen-helpers-arm.cpp

示例5: emit

void Vgen::emit(jmp i) {
  if (next == i.target) return;
  jmps.push_back({a->frontier(), i.target});
  // B range is +/- 128MB but this uses BR
  backend.emitSmashableJump(*codeBlock, kEndOfTargetChain, CC_None);
}
开发者ID:NextGenIntelligence,项目名称:hhvm,代码行数:6,代码来源:vasm-arm.cpp


注:本文中的vixl::MacroAssembler::frontier方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。