public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* -Wtautological-bitwise-compare error in arm-tdep.c
@ 2020-05-15 20:32 Simon Marchi
  2020-05-15 20:41 ` Luis Machado
  2020-05-25 13:08 ` Luis Machado
  0 siblings, 2 replies; 11+ messages in thread
From: Simon Marchi @ 2020-05-15 20:32 UTC (permalink / raw)
  To: gdb-patches

We get this error in arm-tdep.c when building with clang 11:

  CXX    arm-tdep.o
/home/smarchi/src/binutils-gdb/gdb/arm-tdep.c:934:29: error: bitwise comparison always evaluates to false [-Werror,-Wtautological-bitwise-compare]
          else if ((insn & 0xffb0) == 0xe950    /* ldrd Rt, Rt2,
                   ~~~~~~~~~~~~~~~~^~~~~~~~~

Indeed, this can never evaluate to true.  I tried to look at what the condition
should be, but it's a bit too deep into ARM instruction encoding for me.  I am
pretty sure that the corresponding section in the ARM Architecture Reference
Manual [1] is F3.1.15, if somebody wants to take a stab at it.

Simon

[1] https://static.docs.arm.com/ddi0487/fb/DDI0487F_b_armv8_arm.pdf

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-05-27 14:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 20:32 -Wtautological-bitwise-compare error in arm-tdep.c Simon Marchi
2020-05-15 20:41 ` Luis Machado
2020-05-15 20:57   ` Simon Marchi
2020-05-25 13:08 ` Luis Machado
2020-05-25 13:49   ` Simon Marchi
2020-05-25 13:51     ` Luis Machado
2020-05-26  9:45       ` Alan Hayward
2020-05-26 12:17         ` Luis Machado
2020-05-26 16:10           ` Alan Hayward
2020-05-27 12:43             ` Luis Machado
2020-05-27 14:00               ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).