From f411e027165e7d95a6119d8dabbc15e4f3a206e8 Mon Sep 17 00:00:00 2001 From: Jiaxun Yang Date: Tue, 12 May 2020 12:40:13 +0800 Subject: Bug 1330942 - move MemoryAccessDesc::isUnaligned to the ARM/MIPS platform layer Tag: #1542 --- js/src/jit/arm/Assembler-arm.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'js/src/jit/arm/Assembler-arm.cpp') diff --git a/js/src/jit/arm/Assembler-arm.cpp b/js/src/jit/arm/Assembler-arm.cpp index 1e20da1c8..b231128c5 100644 --- a/js/src/jit/arm/Assembler-arm.cpp +++ b/js/src/jit/arm/Assembler-arm.cpp @@ -171,6 +171,18 @@ ABIArgGenerator::next(MIRType type) return softNext(type); } +bool +js::jit::IsUnaligned(const wasm::MemoryAccessDesc& access) +{ + if (!access.align()) + return false; + + if (access.type() == Scalar::Float64 && access.align() >= 4) + return false; + + return access.align() < access.byteSize(); +} + // Encode a standard register when it is being used as src1, the dest, and an // extra register. These should never be called with an InvalidReg. uint32_t -- cgit v1.2.3