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 }