本文整理汇总了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;
}
示例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;
}
示例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]});
}
示例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;
}
示例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);
}