public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110821] New: gcc inline asm for the riscv architecture with the BNE (and possibly other instructions)
@ 2023-07-26 18:08 devnexen at gmail dot com
  2023-07-26 18:15 ` [Bug c++/110821] " pinskia at gcc dot gnu.org
  2023-07-26 18:20 ` devnexen at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: devnexen at gmail dot com @ 2023-07-26 18:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110821

            Bug ID: 110821
           Summary: gcc inline asm for the riscv architecture with the BNE
                    (and possibly other instructions)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: devnexen at gmail dot com
  Target Milestone: ---

Hi, sorry I'm new here I assume 14.0 means master ?
Anyway it seems there is a bug with risc-v architecture (tried with 32 bits)
with the bne instruction
(https://riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf) expects "bne
<operand A>, <operand B>, <label>".
Issue with gcc is passes without the comma as you can experience here

https://godbolt.org/z/G9EY84qG3

but fails rightfully with clang.

Thanks in advance.

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

* [Bug c++/110821] gcc inline asm for the riscv architecture with the BNE (and possibly other instructions)
  2023-07-26 18:08 [Bug c++/110821] New: gcc inline asm for the riscv architecture with the BNE (and possibly other instructions) devnexen at gmail dot com
@ 2023-07-26 18:15 ` pinskia at gcc dot gnu.org
  2023-07-26 18:20 ` devnexen at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-26 18:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110821

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fails when the assembler comes along:
<source>:10: Error: illegal operands `bne t1 a6,jmp12'

Basically inline-asm just does substitution and outputs it for the assembler to
handle.  GCC does not include an assembler (unlike llmv/clang).

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

* [Bug c++/110821] gcc inline asm for the riscv architecture with the BNE (and possibly other instructions)
  2023-07-26 18:08 [Bug c++/110821] New: gcc inline asm for the riscv architecture with the BNE (and possibly other instructions) devnexen at gmail dot com
  2023-07-26 18:15 ` [Bug c++/110821] " pinskia at gcc dot gnu.org
@ 2023-07-26 18:20 ` devnexen at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: devnexen at gmail dot com @ 2023-07-26 18:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110821

--- Comment #2 from David CARLIER <devnexen at gmail dot com> ---
Ah, makes sense sorry for the disturbance. thanks

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

end of thread, other threads:[~2023-07-26 18:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26 18:08 [Bug c++/110821] New: gcc inline asm for the riscv architecture with the BNE (and possibly other instructions) devnexen at gmail dot com
2023-07-26 18:15 ` [Bug c++/110821] " pinskia at gcc dot gnu.org
2023-07-26 18:20 ` devnexen at gmail dot com

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