mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
[PR #699] [MERGED] platform: fix unaligned 64-bit accesses on AArch32 #1341
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/google/brotli/pull/699
Author: @stephenkyle-ARM
Created: 7/17/2018
Status: ✅ Merged
Merged: 7/24/2018
Merged by: @eustas
Base:
master← Head:fix-armv7-builds📝 Commits (1)
fe4316cplatform: fix unaligned 64-bit accesses on AArch32📊 Changes
1 file changed (+35 additions, -10 deletions)
View changed files
📝
c/common/platform.h(+35 -10)📄 Description
Ensures that Aarch32 Arm builds with an Armv8 compiler do not set
BROTLI_64_BITS.
This scenario is possible with ChromeOS builds, as they may use a
toolchain with the target armv7-cros-gnueabi, but with -march=armv8.
This will set __ARM_ARCH to 8 (defining BROTLI_TARGET_ARMV8), but will
also set __ARM_32BIT_STATE and not __ARM_64BIT_STATE. Without this,
illegal 64-bit non-word-aligned reads (LDRD) may be emitted.
Also fix unaligned 64-bit reads on AArch32 - STRD was still possible to
emit.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.