From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0AF1F386F471; Sat, 2 May 2020 04:07:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0AF1F386F471 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588392434; bh=KgNwsXE1qUVHreMRduusnbqNPXS1Zfusfi2ifNwUC4g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=thrI6Bs5l1j4xzQAzOHkMFJiOom69l+UJztMPtZ+K430m/kpyyrQiNr14ZHzghnAM TRj5b4eDaTQhM3XE2nxlkNC6U1SRNwPM3tyRvAS29+gJd/qfjhIgY2nPI3s/FM6ZOR XxIMVTNUPN8NpvFI5WH2tRVnI2YLSa541s3aqI8A= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/93492] Broken code with -fpatchable-function-entry and -fcf-protection=full Date: Sat, 02 May 2020 04:07:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: patch, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Sat, 02 May 2020 04:07:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93492 --- Comment #16 from CVS Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:6607bdd99994c834f92fce924abdaea3405f62dc commit r11-23-g6607bdd99994c834f92fce924abdaea3405f62dc Author: H.J. Lu Date: Fri May 1 21:03:10 2020 -0700 Add patch_area_size and patch_area_entry to crtl Currently patchable area is at the wrong place. It is placed immediate= ly after function label and before .cfi_startproc. A backend should be ab= le to add a pseudo patchable area instruction durectly into RTL. This pat= ch adds patch_area_size and patch_area_entry to crtl so that the patchable area info is available in RTL passes. It also limits patch_area_size and patch_area_entry to 65535, which is a reasonable maximum size for patchable area. gcc/ PR target/93492 * cfgexpand.c (pass_expand::execute): Set crtl->patch_area_size and crtl->patch_area_entry. * emit-rtl.h (rtl_data): Add patch_area_size and patch_area_ent= ry. * opts.c (common_handle_option): Limit function_entry_patch_area_size and function_entry_patch_area_st= art to USHRT_MAX. Fix a typo in error message. * varasm.c (assemble_start_function): Use crtl->patch_area_size and crtl->patch_area_entry. * doc/invoke.texi: Document the maximum value for -fpatchable-function-entry. gcc/c-family/ PR target/93492 * c-attribs.c (handle_patchable_function_entry_attribute): Limit value to USHRT_MAX (65535). gcc/testsuite/ PR target/93492 * c-c++-common/patchable_function_entry-error-1.c: New test. * c-c++-common/patchable_function_entry-error-2.c: Likewise. * c-c++-common/patchable_function_entry-error-3.c: Likewise.=