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()); val->uses.append(CodeOffsetLabel(j.offset())); }
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); }
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); }
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()); } }
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()))); }