public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tedheadster at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/98667] New: gcc generates endbr32 invalid opcode on -march=i486
Date: Thu, 14 Jan 2021 01:24:13 +0000	[thread overview]
Message-ID: <bug-98667-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 98667
           Summary: gcc generates endbr32 invalid opcode on -march=i486
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tedheadster at gmail dot com
  Target Milestone: ---

Compiling the 'eix' program with gcc 9.3.0 and the '-march=i486' generated an
'endbr32' opcode. This is an undefined opcode on an i486.


# /usr/bin/gdb /usr/bin/eix
GNU gdb (Gentoo 10.1 vanilla) 10.1
...
Reading symbols from /usr/bin/eix...
Reading symbols from /usr/lib/debug//usr/bin/eix.debug...
(gdb) run
Starting program: /usr/bin/eix

Program received signal SIGILL, Illegal instruction.
_GLOBAL__sub_I_spaces () at eixTk/stringutils.cc:686
686     }

(gdb) disassemble _GLOBAL__sub_I_spaces
Dump of assembler code for function _GLOBAL__sub_I_spaces():
=> 0x004208e0 <+0>:     endbr32
   0x004208e4 <+4>:     push   %esi
   0x004208e5 <+5>:     push   %ebx
   0x004208e6 <+6>:     sub    $0xc,%esp
   0x004208e9 <+9>:     call   0x420d30 <__x86.get_pc_thunk.bx>
   0x004208ee <+14>:    add    $0x17e712,%ebx
   0x0042091e <+62>:    add    $0x14,%esp
   0x00420921 <+65>:    pop    %ebx
   0x00420922 <+66>:    pop    %esi
   0x00420923 <+67>:    ret    

(gdb) list
681                     if(likely(isutf8firstgyte(t[i]))) {
682                             ++len;
683                     }
684             }
685             return len;
686     }

             reply	other threads:[~2021-01-14  1:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14  1:24 tedheadster at gmail dot com [this message]
2021-01-14  1:28 ` [Bug c++/98667] " tedheadster at gmail dot com
2021-01-14  7:28 ` [Bug target/98667] " pinskia at gcc dot gnu.org
2021-01-14 11:53 ` tedheadster at gmail dot com
2021-01-14 13:22 ` tedheadster at gmail dot com
2021-01-14 13:29 ` jakub at gcc dot gnu.org
2021-01-14 14:04 ` rguenth at gcc dot gnu.org
2021-01-14 14:07 ` hjl.tools at gmail dot com
2021-01-14 14:08 ` hjl.tools at gmail dot com
2021-01-14 15:43 ` cvs-commit at gcc dot gnu.org
2021-01-14 15:45 ` hjl.tools at gmail dot com
2021-01-15 13:26 ` tedheadster at gmail dot com
2021-04-27 13:12 ` hjl.tools at gmail dot com
2021-07-15 17:40 ` hjl.tools at gmail dot com
2021-10-21 15:22 ` marxin at gcc dot gnu.org
2021-10-21 15:55 ` hjl.tools at gmail dot com
2021-10-21 16:14 ` marxin at gcc dot gnu.org
2021-10-21 19:09 ` cvs-commit at gcc dot gnu.org
2021-10-21 19:10 ` cvs-commit at gcc dot gnu.org
2021-10-21 19:11 ` cvs-commit at gcc dot gnu.org
2021-10-21 19:14 ` cvs-commit 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-98667-4@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: 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).