From patchwork Wed Apr 5 14:52:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 79758 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp379386vqo; Wed, 5 Apr 2023 08:09:17 -0700 (PDT) X-Google-Smtp-Source: AKy350Y0IGpdbkiqjqk2MmyeSbWCKgUIiGqesqzD2j2T0KefDDsfrtrWrZTj2ogfqDMWYX2kc8mW X-Received: by 2002:aa7:cd5b:0:b0:4fc:d331:515 with SMTP id v27-20020aa7cd5b000000b004fcd3310515mr2022871edw.5.1680707357277; Wed, 05 Apr 2023 08:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680707357; cv=none; d=google.com; s=arc-20160816; b=x4WL66ofqQYUsvmWMv7RDbE+HVeVeSVelXgRs3aW59lu0InHOuTmcKG9s/qSMAhs0d W0FOfiUJ24H+tZDCGi2o27j5t1Jr0v0N7KbdqsL4hzz1Psl8+ywn6eRD9prLxqcgINpr o/Y8dSuo9xao76gkK8ZpxQxd7ODnEyy47i9m5eM2aiV1qlVNhxcQ78Ln1mGRUHAEs7Vg YDv4+9tjTM4YighHD9u4azDvT7F83ATtxv9sKs0QEXKmZMT2LGC+zMalTX+WT3PeiLAd fyqAsv+rhuE7jAh/O5lh8C4ZcTqpsg1UA0NhPXeWJnZLaPZDOM1jW8mP64MWfo5d/del 6dYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:to:from:date:dmarc-filter :delivered-to; bh=L3DCnBiGnKxCxfFgK444wutPF7PGY0MaRAvOL931/YY=; b=MoV7RWNWAUNGtZ8I2XWR0l8PNfBIFRPUiPtRH73A2kjAx08V+oLIvqC8CYy5Hhv5jQ m6rlVgUNjdrU3shaAxEltAZFqE0b0cSQl9bBsu6IcDh4bGiG1ekubQ670q3oiPJjHwud j5prGm/ceD530YTlO1ANcSbJEbOUk6Dipj0jgTrlwA2cbBro/lROS1wrRLWU5wUwZhxF rDhH3wHv8vX99/5r2yvh41gyfZoZ03Mn56UpAqLKgopAdLKkDkNyiDrOFQTumzIG3RHD E5AfvkXMmT4QxZbVa3kDHOV+0dfzNxWcWA7tlSw0Wh+UIne5DaRIpCcgDAbLPxZ6gy6n N7Cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ay22-20020a056402203600b004fe96b95bbbsi317183edb.570.2023.04.05.08.09.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 08:09:17 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 467F63874893 for ; Wed, 5 Apr 2023 14:52:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from dellerweb.de (dellerweb.de [173.249.48.176]) by sourceware.org (Postfix) with ESMTPS id 9E67C3870910 for ; Wed, 5 Apr 2023 14:52:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E67C3870910 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=parisc-linux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=parisc-linux.org Received: from mx3210.localdomain (bras-base-otwaon0925w-grc-09-174-95-58-126.dsl.bell.ca [174.95.58.126]) by dellerweb.de (Postfix) with ESMTPSA id 8BD3016000FE for ; Wed, 5 Apr 2023 16:52:23 +0200 (CEST) Received: by mx3210.localdomain (Postfix, from userid 1000) id 85DE522011C; Wed, 5 Apr 2023 14:52:21 +0000 (UTC) Date: Wed, 5 Apr 2023 14:52:21 +0000 From: John David Anglin To: GCC Patches Subject: [committed] hppa: Add assember CFI directives to millicode division and remainder routines Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762349398283618518?= X-GMAIL-MSGID: =?utf-8?q?1762349398283618518?= Committed to trunk after testing on hppa-unknown-linux-gnu. Dave --- Add assember CFI directives to millicode division and remainder routines. The millicode division and remainder routines trap division by zero. The unwinder needs these directives to unwind divide by zero traps. 2023-04-05 John David Anglin libgcc/ChangeLog: PR target/109374 * config/pa/milli64.S (RETURN_COLUMN): Define. ($$divI): Add CFI directives. ($$divU): Likewise. ($$remI): Likewise. ($$remU): Likewise. diff --git a/libgcc/config/pa/milli64.S b/libgcc/config/pa/milli64.S index 2316f797354..e1c84f48d25 100644 --- a/libgcc/config/pa/milli64.S +++ b/libgcc/config/pa/milli64.S @@ -105,8 +105,10 @@ sar: .reg %cr11 /* Shift Amount Register */ rp: .reg r2 /* return pointer */ #ifdef pa64 mrp: .reg r2 /* millicode return pointer */ +#define RETURN_COLUMN 2 #else mrp: .reg r31 /* millicode return pointer */ +#define RETURN_COLUMN 31 #endif ret0: .reg r28 /* return value */ ret1: .reg r29 /* return value (high part of double) */ @@ -313,6 +315,8 @@ RDEFINE(temp1,arg0) .import $$divI_15,millicode .export $$divI,millicode .export $$divoI,millicode + .cfi_startproc + .cfi_return_column RETURN_COLUMN .proc .callinfo millicode .entry @@ -484,6 +488,7 @@ LSYM(negative1) addo arg0,arg1,r0 /* trap iff dividend==0x80000000 && divisor==-1 */ .exit .procend + .cfi_endproc .end #endif @@ -543,6 +548,8 @@ RDEFINE(temp1,arg0) .import $$divU_12,millicode .import $$divU_14,millicode .import $$divU_15,millicode + .cfi_startproc + .cfi_return_column RETURN_COLUMN .proc .callinfo millicode .entry @@ -706,6 +713,7 @@ LSYM(big_divisor) addc r0,r0,retreg .exit .procend + .cfi_endproc .end #endif @@ -750,6 +758,8 @@ RDEFINE(retreg,ret1) SUBSPA_MILLI ATTR_MILLI + .cfi_startproc + .cfi_return_column RETURN_COLUMN .proc .callinfo millicode .entry @@ -875,6 +885,7 @@ LSYM(finish) nop .exit .procend + .cfi_endproc #ifdef milliext .origin 0x00000200 #endif @@ -922,6 +933,8 @@ RDEFINE(rmndr,ret1) /* r29 */ SUBSPA_MILLI ATTR_MILLI .export $$remU,millicode + .cfi_startproc + .cfi_return_column RETURN_COLUMN .proc .callinfo millicode .entry @@ -1013,6 +1026,7 @@ LSYM(special_case) nop .exit .procend + .cfi_endproc .end #endif