From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8DEAF3857813; Thu, 6 Jan 2022 02:03:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DEAF3857813 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/103925] New: Missing int3 in ix86_output_indirect_function_return Date: Thu, 06 Jan 2022 02:03:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2022 02:03:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103925 Bug ID: 103925 Summary: Missing int3 in ix86_output_indirect_function_return Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com CC: andrew.cooper3 at citrix dot com, ubizjak at gmail dot = com Target Milestone: --- [hjl@gnu-tgl-2 tmp]$ cat foo.c struct _Unwind_Context _Unwind_Resume_or_Rethrow_this_context; void offset (int); struct _Unwind_Context { void *reg[7]; } _Unwind_Resume_or_Rethrow() { struct _Unwind_Context cur_contextcur_context =3D _Unwind_Resume_or_Rethrow_this_context; offset(0); __builtin_eh_return ((long) offset, 0); } [hjl@gnu-tgl-2 tmp]$ /usr/gcc-12.0.0-x32/bin/gcc -S -O2 -fcf-protection -mharden-sls=3Dall foo.c=20 [hjl@gnu-tgl-2 tmp]$ cat foo.s .file "foo.c" .text .p2align 4 .globl _Unwind_Resume_or_Rethrow .type _Unwind_Resume_or_Rethrow, @function _Unwind_Resume_or_Rethrow: .LFB0: .cfi_startproc endbr64 pushq %rdx .cfi_def_cfa_offset 16 .cfi_offset 1, -16 xorl %edi, %edi pushq %rax .cfi_def_cfa_offset 24 .cfi_offset 0, -24 subq $8, %rsp .cfi_def_cfa_offset 32 call offset movl $offset, %ecx movq $0, 24(%rsp,%rcx) movq 8(%rsp), %rax movq 16(%rsp), %rdx leaq 24(%rsp,%rcx), %rsp .cfi_def_cfa_offset 8 popq %rcx .cfi_register 16, 2 .cfi_def_cfa_offset 0 jmp *%rcx <<<< Missing int3 .cfi_endproc .LFE0: .size _Unwind_Resume_or_Rethrow, .-_Unwind_Resume_or_Rethrow .globl _Unwind_Resume_or_Rethrow_this_context .bss .align 32 .type _Unwind_Resume_or_Rethrow_this_context, @object .size _Unwind_Resume_or_Rethrow_this_context, 56 _Unwind_Resume_or_Rethrow_this_context: .zero 56 .ident "GCC: (GNU) 12.0.0 20211225 (experimental)" .section .note.GNU-stack,"",@progbits .section .note.gnu.property,"a" .align 8 .long 1f - 0f .long 4f - 1f .long 5 0: .string "GNU" 1: .align 8 .long 0xc0000002 .long 3f - 2f 2: .long 0x3 3: .align 8 4: [hjl@gnu-tgl-2 tmp]$=