arm: Fix how a bitfield is extracted in some SVE instructions.
authorGabe Black <gabeblack@google.com>
Mon, 10 Feb 2020 03:23:27 +0000 (19:23 -0800)
committerGabe Black <gabeblack@google.com>
Mon, 10 Feb 2020 22:31:21 +0000 (22:31 +0000)
commited4482bda7f88e94e035418903abaf937f5e4f31
tree4ec4911e149d10fb013a2a0f8c39606f3ac61561
parent4aa277a8652b3d33cc4372d4fd326ba3f55e2a24
arm: Fix how a bitfield is extracted in some SVE instructions.

These instructions were extracting a bitfield by masking it, but then
didn't shift the bit into the correct position. They were then
comparing it with 1, which clang 11 correctly complained would always
be false. That warning became an error which broke the build.

This fixes that problem by switching that line and the few surrounding
lines to use the bits() function which removes the need to manually
mask or shift values. That makes it less likely for there to be a
mistake, and also makes it more obvious which bits are being accessed.

Change-Id: I692214f898e90dc7d5de460d1da2ef6aefda4fb8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25224
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/isa/insts/sve.isa