summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseLib/X64/ReadMm3.asm
diff options
context:
space:
mode:
authorMichael Zimmermann <sigmaepsilon92@gmail.com>2018-06-07 09:09:07 +0200
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2018-06-07 09:09:07 +0200
commitb20085454e91bb1ded87009722c9994b4684472c (patch)
tree1071773cf4f588065453c3aa5ce1543e3d011ff2 /MdePkg/Library/BaseLib/X64/ReadMm3.asm
parentec50f7535bc5747a95c6eae3c0907ccdc8ece1a5 (diff)
downloadedk2-b20085454e91bb1ded87009722c9994b4684472c.tar.gz
edk2-b20085454e91bb1ded87009722c9994b4684472c.tar.bz2
edk2-b20085454e91bb1ded87009722c9994b4684472c.zip
ArmPkg/ArmDisassemblerLib: fix check for MSR instruction
GCC8 reported it with the following warning: ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c: In function 'DisassembleArmInstruction': ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c:397:30: error: bitwise comparison always evaluates to false [-Werror=tautological-compare] if ((OpCode & 0x0db00000) == 0x03200000) { This condition tries to be true for both the immediate and the register version of the MSR instruction. They get identified inside the if-block using the variable I, which contains the value of bit 25. The problem with the comparison reported by GCC is that the bitmask excludes bit 25, while the value requires it to be set to one: 0x0db00000: 0000 11011 0 11 00 00 0000 000000000000 0x03200000: 0000 00110 0 10 00 00 0000 000000000000 ^ So the solution is to just don't require that bit to be set, because it gets checked later using 'I', which results in the following value: 0x01200000: 0000 00010 0 10 00 00 0000 000000000000 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'MdePkg/Library/BaseLib/X64/ReadMm3.asm')
0 files changed, 0 insertions, 0 deletions