本文整理汇总了C++中SnapshotIterator::floatAllocationPointer方法的典型用法代码示例。如果您正苦于以下问题:C++ SnapshotIterator::floatAllocationPointer方法的具体用法?C++ SnapshotIterator::floatAllocationPointer怎么用?C++ SnapshotIterator::floatAllocationPointer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SnapshotIterator
的用法示例。
在下文中一共展示了SnapshotIterator::floatAllocationPointer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: result
bool
RSimdBox::recover(JSContext* cx, SnapshotIterator& iter) const
{
JSObject* resultObject = nullptr;
RValueAllocation a = iter.readAllocation();
MOZ_ASSERT(iter.allocationReadable(a));
const FloatRegisters::RegisterContent* raw = iter.floatAllocationPointer(a);
switch (SimdTypeDescr::Type(type_)) {
case SimdTypeDescr::Bool32x4:
MOZ_ASSERT_IF(a.mode() == RValueAllocation::ANY_FLOAT_REG,
a.fpuReg().isSimd128());
resultObject = js::CreateSimd<Bool32x4>(cx, (const Bool32x4::Elem*) raw);
break;
case SimdTypeDescr::Int32x4:
MOZ_ASSERT_IF(a.mode() == RValueAllocation::ANY_FLOAT_REG,
a.fpuReg().isSimd128());
resultObject = js::CreateSimd<Int32x4>(cx, (const Int32x4::Elem*) raw);
break;
case SimdTypeDescr::Float32x4:
MOZ_ASSERT_IF(a.mode() == RValueAllocation::ANY_FLOAT_REG,
a.fpuReg().isSimd128());
resultObject = js::CreateSimd<Float32x4>(cx, (const Float32x4::Elem*) raw);
break;
case SimdTypeDescr::Float64x2:
MOZ_CRASH("NYI, RSimdBox of Float64x2");
break;
case SimdTypeDescr::Int8x16:
MOZ_CRASH("NYI, RSimdBox of Int8x16");
break;
case SimdTypeDescr::Int16x8:
MOZ_CRASH("NYI, RSimdBox of Int16x8");
break;
case SimdTypeDescr::Uint8x16:
MOZ_CRASH("NYI, RSimdBox of UInt8x16");
break;
case SimdTypeDescr::Uint16x8:
MOZ_CRASH("NYI, RSimdBox of UInt16x8");
break;
case SimdTypeDescr::Uint32x4:
MOZ_CRASH("NYI, RSimdBox of UInt32x4");
break;
case SimdTypeDescr::Bool8x16:
MOZ_CRASH("NYI, RSimdBox of Bool8x16");
break;
case SimdTypeDescr::Bool16x8:
MOZ_CRASH("NYI, RSimdBox of Bool16x8");
break;
case SimdTypeDescr::Bool64x2:
MOZ_CRASH("NYI, RSimdBox of Bool64x2");
break;
}
if (!resultObject)
return false;
RootedValue result(cx);
result.setObject(*resultObject);
iter.storeInstructionResult(result);
return true;
}