public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jbeulich at suse dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108941] Error: operand type mismatch for `shr' with binutils master Date: Mon, 27 Feb 2023 10:17:40 +0000 [thread overview] Message-ID: <bug-108941-4-heUwYsmPKl@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108941-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108941 --- Comment #4 from jbeulich at suse dot com --- (In reply to Jakub Jelinek from comment #1) > GCC inline asm has always worked like that, the operand is 8-bit and in GCC > constants are always sign-extended. But then ... > If you try just > static inline unsigned int > foo (unsigned int a, signed char s) > { > asm volatile ("# %1" : "+r" (a) : "ic" ((unsigned char) -s)); this should be sign-extension of the supplied value, i.e. the (potentially negative) value cast to "unsigned char". And gas will be happy to accept that. > In the assembly, if you have a spot which accepts 8-bit quantity, one > shouldn't care if it is signed or unsigned. I firmly disagree: I assume you did look at the description of the gas change. A negative value for SHL may (by some) be viewed as reasonable (and as said in the submission, I could have been convinced to further relax things, provided fair arguments), but a negative value for RCL firmly is rubbish and hence should have been rejected years ago.
next prev parent reply other threads:[~2023-02-27 10:17 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-27 9:39 [Bug c/108941] New: " marxin at gcc dot gnu.org 2023-02-27 9:51 ` [Bug c/108941] " jakub at gcc dot gnu.org 2023-02-27 10:00 ` marxin at gcc dot gnu.org 2023-02-27 10:07 ` jakub at gcc dot gnu.org 2023-02-27 10:17 ` jbeulich at suse dot com [this message] 2023-02-27 10:33 ` jakub at gcc dot gnu.org 2023-02-27 10:57 ` jbeulich at suse dot com 2023-02-27 11:00 ` jbeulich at suse dot com 2023-02-27 11:02 ` jakub at gcc dot gnu.org 2023-02-27 11:11 ` jbeulich at suse dot com 2023-02-27 11:14 ` jakub at gcc dot gnu.org 2023-02-27 11:17 ` jakub at gcc dot gnu.org 2023-02-27 11:17 ` marxin at gcc dot gnu.org 2023-02-27 11:23 ` jakub at gcc dot gnu.org 2023-02-28 7:33 ` jbeulich at suse dot com 2023-02-28 7:47 ` jakub at gcc dot gnu.org 2023-02-28 7:59 ` jbeulich at suse dot com 2023-02-28 8:10 ` jakub at gcc dot gnu.org
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=bug-108941-4-heUwYsmPKl@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).