public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114094] New: Assembler messages: Error: junk `nop' after expression with -fprofile -fPIE -mno-direct-extern-access -masm=intel
@ 2024-02-25  9:00 zsojka at seznam dot cz
  2024-02-25 12:13 ` [Bug target/114094] " jakub at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2024-02-25  9:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114094
           Summary: Assembler messages: Error: junk `nop' after expression
                    with -fprofile -fPIE -mno-direct-extern-access
                    -masm=intel
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: assemble-failure
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Compiler output:
$ echo 'void foo(void) {}' > testcase.c
$ x86_64-pc-linux-gnu-gcc -fprofile -fPIE -mno-direct-extern-access -masm=intel
testcase.c
/tmp/ccu6XIRH.s: Assembler messages:
/tmp/ccu6XIRH.s:14: Error: junk `nop' after expression

The offending line is:
...
1:      call    [QWORD PTR mcount@GOTPCREL[rip]]        nop
...

There is probably missing a newline somewhere.


$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-9161-20240224001742-g4d9da4199d1-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-9161-20240224001742-g4d9da4199d1-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240224 (experimental) (GCC)

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

* [Bug target/114094] Assembler messages: Error: junk `nop' after expression with -fprofile -fPIE -mno-direct-extern-access -masm=intel
  2024-02-25  9:00 [Bug target/114094] New: Assembler messages: Error: junk `nop' after expression with -fprofile -fPIE -mno-direct-extern-access -masm=intel zsojka at seznam dot cz
@ 2024-02-25 12:13 ` jakub at gcc dot gnu.org
  2024-02-26  6:32 ` cvs-commit at gcc dot gnu.org
  2024-02-26  6:33 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-02-25 12:13 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2024-02-25

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Oops, my fault.
--- gcc/config/i386/i386.cc.jj  2024-02-22 10:10:18.675032283 +0100
+++ gcc/config/i386/i386.cc     2024-02-25 13:12:12.403323842 +0100
@@ -22909,7 +22909,7 @@ x86_function_profiler (FILE *file, int l
              if (!ix86_direct_extern_access)
                {
                  if (ASSEMBLER_DIALECT == ASM_INTEL)
-                   fprintf (file, "1:\tcall\t[QWORD PTR %s@GOTPCREL[rip]]",
+                   fprintf (file, "1:\tcall\t[QWORD PTR %s@GOTPCREL[rip]]\n",
                             mcount_name);
                  else
                    fprintf (file, "1:\tcall\t*%s@GOTPCREL(%%rip)\n",

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

* [Bug target/114094] Assembler messages: Error: junk `nop' after expression with -fprofile -fPIE -mno-direct-extern-access -masm=intel
  2024-02-25  9:00 [Bug target/114094] New: Assembler messages: Error: junk `nop' after expression with -fprofile -fPIE -mno-direct-extern-access -masm=intel zsojka at seznam dot cz
  2024-02-25 12:13 ` [Bug target/114094] " jakub at gcc dot gnu.org
@ 2024-02-26  6:32 ` cvs-commit at gcc dot gnu.org
  2024-02-26  6:33 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-26  6:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:6987f16742bd4fc6bb8118b9efde52fb9169b327

commit r14-9172-g6987f16742bd4fc6bb8118b9efde52fb9169b327
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Feb 26 07:30:05 2024 +0100

    i386: Fix up x86_function_profiler -masm=intel support [PR114094]

    In my r14-8214 changes I apparently forgot one \n at the end of an
instruction.
    The corresponding AT&T line looks like:
    "1:\tcall\t*%s@GOTPCREL(%%rip)\n"
    but the Intel variant was
    "1:\tcall\t[QWORD PTR %s@GOTPCREL[rip]]"

    Fixed thusly.

    2024-02-26  Jakub Jelinek  <jakub@redhat.com>

            PR target/114094
            * config/i386/i386.cc (x86_function_profiler): Add missing new-line
            to printed instruction.

            * gcc.target/i386/pr114094.c: New test.

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

* [Bug target/114094] Assembler messages: Error: junk `nop' after expression with -fprofile -fPIE -mno-direct-extern-access -masm=intel
  2024-02-25  9:00 [Bug target/114094] New: Assembler messages: Error: junk `nop' after expression with -fprofile -fPIE -mno-direct-extern-access -masm=intel zsojka at seznam dot cz
  2024-02-25 12:13 ` [Bug target/114094] " jakub at gcc dot gnu.org
  2024-02-26  6:32 ` cvs-commit at gcc dot gnu.org
@ 2024-02-26  6:33 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-02-26  6:33 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2024-02-26  6:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-25  9:00 [Bug target/114094] New: Assembler messages: Error: junk `nop' after expression with -fprofile -fPIE -mno-direct-extern-access -masm=intel zsojka at seznam dot cz
2024-02-25 12:13 ` [Bug target/114094] " jakub at gcc dot gnu.org
2024-02-26  6:32 ` cvs-commit at gcc dot gnu.org
2024-02-26  6:33 ` jakub at gcc dot gnu.org

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