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


C++ JmpSrc类代码示例

本文整理汇总了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);
}
开发者ID:hoosteeno,项目名称:gecko-dev,代码行数:33,代码来源:MacroAssembler-x64.cpp

示例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())));
}
开发者ID:alphan102,项目名称:gecko-dev,代码行数:11,代码来源:MacroAssembler-x64.cpp

示例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())));
}
开发者ID:MekliCZ,项目名称:positron,代码行数:12,代码来源:MacroAssembler-x64.cpp

示例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())));
}
开发者ID:MekliCZ,项目名称:positron,代码行数:13,代码来源:MacroAssembler-x64.cpp

示例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);
}
开发者ID:carriercomm,项目名称:system-addons,代码行数:13,代码来源:MacroAssembler-x64.cpp

示例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);
}
开发者ID:carriercomm,项目名称:system-addons,代码行数:14,代码来源:MacroAssembler-x64.cpp

示例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())));
}
开发者ID:MekliCZ,项目名称:positron,代码行数:16,代码来源:MacroAssembler-x64.cpp

示例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;
}
开发者ID:AlexOreshkevich,项目名称:mongo,代码行数:11,代码来源:Assembler-x64.cpp

示例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());
    }
}
开发者ID:AlexOreshkevich,项目名称:mongo,代码行数:15,代码来源:Assembler-x64.cpp


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