本文整理汇总了C++中JmpSrc类的典型用法代码示例。如果您正苦于以下问题:C++ JmpSrc类的具体用法?C++ JmpSrc怎么用?C++ JmpSrc使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JmpSrc类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MOZ_ASSERT
void
MacroAssemblerX64::loadConstantDouble(double d, FloatRegister dest)
{
if (maybeInlineDouble(d, dest))
return;
if (!doubleMap_.initialized()) {
enoughMemory_ &= doubleMap_.init();
if (!enoughMemory_)
return;
}
size_t doubleIndex;
if (DoubleMap::AddPtr p = doubleMap_.lookupForAdd(d)) {
doubleIndex = p->value();
} else {
doubleIndex = doubles_.length();
enoughMemory_ &= doubles_.append(Double(d));
enoughMemory_ &= doubleMap_.add(p, d, doubleIndex);
if (!enoughMemory_)
return;
}
Double& dbl = doubles_[doubleIndex];
MOZ_ASSERT(!dbl.uses.bound());
// The constants will be stored in a pool appended to the text (see
// finish()), so they will always be a fixed distance from the
// instructions which reference them. This allows the instructions to use
// PC-relative addressing. Use "jump" label support code, because we need
// the same PC-relative address patching that jumps use.
JmpSrc j = masm.vmovsd_ripr(dest.encoding());
JmpSrc prev = JmpSrc(dbl.uses.use(j.offset()));
masm.setNextJump(j, prev);
}
示例2: getSimdData
void
MacroAssemblerX64::loadConstantSimd128Float(const SimdConstant&v, FloatRegister dest)
{
if (maybeInlineSimd128Float(v, dest))
return;
SimdData* val = getSimdData(v);
if (!val)
return;
JmpSrc j = masm.vmovaps_ripr(dest.encoding());
propagateOOM(val->uses.append(CodeOffset(j.offset())));
}
示例3: getFloat
void
MacroAssemblerX64::loadConstantFloat32(float f, FloatRegister dest)
{
if (maybeInlineFloat(f, dest))
return;
Float* flt = getFloat(f);
if (!flt)
return;
// See comment in loadConstantDouble
JmpSrc j = masm.vmovss_ripr(dest.encoding());
propagateOOM(flt->uses.append(CodeOffset(j.offset())));
}
示例4: MOZ_ASSERT
void
MacroAssemblerX64::loadConstantFloat32x4(const SimdConstant&v, FloatRegister dest)
{
MOZ_ASSERT(v.type() == SimdConstant::Float32x4);
if (maybeInlineFloat32x4(v, dest))
return;
SimdData* val = getSimdData(v);
if (!val)
return;
MOZ_ASSERT(val->type() == SimdConstant::Float32x4);
JmpSrc j = masm.vmovaps_ripr(dest.encoding());
propagateOOM(val->uses.append(CodeOffset(j.offset())));
}
示例5: getFloat
void
MacroAssemblerX64::loadConstantFloat32(float f, FloatRegister dest)
{
if (maybeInlineFloat(f, dest))
return;
Float* flt = getFloat(f);
if (!flt)
return;
// See comment in loadConstantDouble
JmpSrc j = masm.vmovss_ripr(dest.encoding());
JmpSrc prev = JmpSrc(flt->uses.use(j.offset()));
masm.setNextJump(j, prev);
}
示例6: MOZ_ASSERT
void
MacroAssemblerX64::loadConstantFloat32x4(const SimdConstant&v, FloatRegister dest)
{
MOZ_ASSERT(v.type() == SimdConstant::Float32x4);
if (maybeInlineFloat32x4(v, dest))
return;
SimdData* val = getSimdData(v);
if (!val)
return;
MOZ_ASSERT(val->type() == SimdConstant::Float32x4);
JmpSrc j = masm.vmovaps_ripr(dest.encoding());
JmpSrc prev = JmpSrc(val->uses.use(j.offset()));
masm.setNextJump(j, prev);
}
示例7: getDouble
void
MacroAssemblerX64::loadConstantDouble(double d, FloatRegister dest)
{
if (maybeInlineDouble(d, dest))
return;
Double* dbl = getDouble(d);
if (!dbl)
return;
// The constants will be stored in a pool appended to the text (see
// finish()), so they will always be a fixed distance from the
// instructions which reference them. This allows the instructions to use
// PC-relative addressing. Use "jump" label support code, because we need
// the same PC-relative address patching that jumps use.
JmpSrc j = masm.vmovsd_ripr(dest.encoding());
propagateOOM(dbl->uses.append(CodeOffset(j.offset())));
}
示例8: writeRelocation
size_t
Assembler::addPatchableJump(JmpSrc src, Relocation::Kind reloc)
{
// This jump is patchable at runtime so we always need to make sure the
// jump table is emitted.
writeRelocation(src, reloc);
size_t index = jumps_.length();
enoughMemory_ &= jumps_.append(RelativePatch(src.offset(), nullptr, reloc));
return index;
}
示例9:
void
Assembler::writeRelocation(JmpSrc src, Relocation::Kind reloc)
{
if (!jumpRelocations_.length()) {
// The jump relocation table starts with a fixed-width integer pointing
// to the start of the extended jump table. But, we don't know the
// actual extended jump table offset yet, so write a 0 which we'll
// patch later.
jumpRelocations_.writeFixedUint32_t(0);
}
if (reloc == Relocation::JITCODE) {
jumpRelocations_.writeUnsigned(src.offset());
jumpRelocations_.writeUnsigned(jumps_.length());
}
}