public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Victor Do Nascimento <victor.donascimento@arm.com>
Cc: Binutils <binutils@sourceware.org>
Subject: New error building aarcxh64-opc.c
Date: Thu, 9 Nov 2023 09:57:25 +0000	[thread overview]
Message-ID: <25485ce0-c3e6-489c-ab37-67eb2e3ee440@redhat.com> (raw)

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


             reply	other threads:[~2023-11-09  9:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09  9:57 Nick Clifton [this message]
2023-11-09 10:05 ` Victor Do Nascimento

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25485ce0-c3e6-489c-ab37-67eb2e3ee440@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=victor.donascimento@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).