mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 15:15:38 +00:00
target/arm/cpu: Use div-round-up to determine predicate register array size
Unless we're guaranteed to always increase ARM_MAX_VQ by a multiple of four, then we should use DIV_ROUND_UP to ensure we get an appropriate array size. Backports commit 46417784d21c89446763f2047228977bdc267895 from qemu
This commit is contained in:
parent
bb8b3bc42b
commit
ad63ee7509
|
@ -185,7 +185,7 @@ typedef struct ARMVectorReg {
|
|||
#ifdef TARGET_AARCH64
|
||||
/* In AArch32 mode, predicate registers do not exist at all. */
|
||||
typedef struct ARMPredicateReg {
|
||||
uint64_t QEMU_ALIGNED(16, p[2 * ARM_MAX_VQ / 8]);
|
||||
uint64_t QEMU_ALIGNED(16, p[DIV_ROUND_UP(2 * ARM_MAX_VQ, 8)]);
|
||||
} ARMPredicateReg;
|
||||
|
||||
/* In AArch32 mode, PAC keys do not exist at all. */
|
||||
|
|
Loading…
Reference in a new issue