public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* New error building aarcxh64-opc.c
@ 2023-11-09  9:57 Nick Clifton
  2023-11-09 10:05 ` Victor Do Nascimento
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Clifton @ 2023-11-09  9:57 UTC (permalink / raw)
  To: Victor Do Nascimento; +Cc: Binutils

Hi Victor,

   I have run across a build error compiling aarch64-opc.c:

make[3]: Entering directory 'opcodes'
   CC       aarch64-opc.lo
opcodes/aarch64-opc.c:5040:8: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand]
        || CPENC (3,0,13,0,6))
        ^  ~~~~~~~~~~~~~~~~~~
opcodes/aarch64-opc.c:5040:8: note: use '|' for a bitwise operation
        || CPENC (3,0,13,0,6))
        ^~
        |

   This only happens if you compile with Clang rather than gcc,
   which is why I expect that the problem was not noticed before.

   I took a quick look at the code concerned and it appears that
   there might be a typo:

    if ((reg_value == CPENC (3,0,13,0,3)
        || CPENC (3,0,13,0,6))
       && AARCH64_CPU_HAS_FEATURE (features, THE))
     return true;

   Presumably the second check should be comparing "reg_value == CPENC (3,0,13,0,6)" ?

   Anyway, please can you take a look and fix as necessary ?

Cheers
   Nick


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

end of thread, other threads:[~2023-11-09 10:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-09  9:57 New error building aarcxh64-opc.c Nick Clifton
2023-11-09 10:05 ` Victor Do Nascimento

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).