From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21703 invoked by alias); 13 Dec 2018 13:59:20 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 20333 invoked by uid 89); 13 Dec 2018 13:59:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-Spam-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Dec 2018 13:59:17 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62F3A300238F for ; Thu, 13 Dec 2018 13:59:16 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-116-82.ams2.redhat.com [10.36.116.82]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B3C6118032 for ; Thu, 13 Dec 2018 13:59:15 +0000 (UTC) Received: by oldenburg2.str.redhat.com (Postfix, from userid 1000) id 622AC86952B6; Thu, 13 Dec 2018 14:59:13 +0100 (CET) Date: Mon, 01 Jan 2018 00:00:00 -0000 To: libc-stable@sourceware.org Subject: [2.28 COMMITTED] powerpc: Add missing CFI register information (bug #23614) User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20181213135913.622AC86952B6@oldenburg2.str.redhat.com> From: Florian Weimer X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 13 Dec 2018 13:59:16 +0000 (UTC) X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00016.txt.bz2 From: Tulio Magno Quites Machado Filho Add CFI information about the offset of registers stored in the stack frame. [BZ #23614] * sysdeps/powerpc/powerpc64/addmul_1.S (FUNC): Add CFI offset for registers saved in the stack frame. * sysdeps/powerpc/powerpc64/lshift.S (__mpn_lshift): Likewise. * sysdeps/powerpc/powerpc64/mul_1.S (__mpn_mul_1): Likewise. Signed-off-by: Tulio Magno Quites Machado Filho Reviewed-by: Gabriel F. T. Gomes (cherry picked from commit 1d880d4a9bf7608c2cd33bbe954ce6995f79121a) 2018-12-12 Tulio Magno Quites Machado Filho [BZ #23614] * sysdeps/powerpc/powerpc64/addmul_1.S (FUNC): Add CFI offset for registers saved in the stack frame. * sysdeps/powerpc/powerpc64/lshift.S (__mpn_lshift): Likewise. * sysdeps/powerpc/powerpc64/mul_1.S (__mpn_mul_1): Likewise. diff --git a/NEWS b/NEWS index 4d4a5a1911..05f7342fcb 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ The following bugs are resolved with this release: [23578] regex: Fix memory overread in re_compile_pattern [23579] libc: Errors misreported in preadv2 [23606] Missing ENDBR32 in sysdeps/i386/start.S + [23614] powerpc: missing CFI register information in __mpn_* functions [23679] gethostid: Missing NULL check for gethostbyname_r result [23709] Fix CPU string flags for Haswell-type CPUs [23717] Fix stack overflow in stdlib/tst-setcontext9 diff --git a/sysdeps/powerpc/powerpc64/addmul_1.S b/sysdeps/powerpc/powerpc64/addmul_1.S index 48e3b1b290..e450d6a52c 100644 --- a/sysdeps/powerpc/powerpc64/addmul_1.S +++ b/sysdeps/powerpc/powerpc64/addmul_1.S @@ -34,16 +34,27 @@ #define N r5 #define VL r6 +#define R27SAVE (-40) +#define R28SAVE (-32) +#define R29SAVE (-24) +#define R30SAVE (-16) +#define R31SAVE (-8) + ENTRY_TOCLESS (FUNC, 5) - std r31, -8(r1) + std r31, R31SAVE(r1) rldicl. r0, N, 0, 62 - std r30, -16(r1) + std r30, R30SAVE(r1) cmpdi VL, r0, 2 - std r29, -24(r1) + std r29, R29SAVE(r1) addi N, N, 3 - std r28, -32(r1) + std r28, R28SAVE(r1) srdi N, N, 2 - std r27, -40(r1) + std r27, R27SAVE(r1) + cfi_offset(r31, R31SAVE) + cfi_offset(r30, R30SAVE) + cfi_offset(r29, R29SAVE) + cfi_offset(r28, R28SAVE) + cfi_offset(r27, R27SAVE) mtctr N beq cr0, L(b00) blt cr6, L(b01) @@ -199,10 +210,10 @@ L(end): mulld r0, r9, VL addic r11, r11, 1 #endif addze RP, r8 - ld r31, -8(r1) - ld r30, -16(r1) - ld r29, -24(r1) - ld r28, -32(r1) - ld r27, -40(r1) + ld r31, R31SAVE(r1) + ld r30, R30SAVE(r1) + ld r29, R29SAVE(r1) + ld r28, R28SAVE(r1) + ld r27, R27SAVE(r1) blr END(FUNC) diff --git a/sysdeps/powerpc/powerpc64/lshift.S b/sysdeps/powerpc/powerpc64/lshift.S index 8b6396ee6c..855d6f2993 100644 --- a/sysdeps/powerpc/powerpc64/lshift.S +++ b/sysdeps/powerpc/powerpc64/lshift.S @@ -26,11 +26,15 @@ #define TNC r0 #define U0 r30 #define U1 r31 +#define U0SAVE (-16) +#define U1SAVE (-8) #define RETVAL r5 ENTRY_TOCLESS (__mpn_lshift, 5) - std U1, -8(r1) - std U0, -16(r1) + std U1, U1SAVE(r1) + std U0, U0SAVE(r1) + cfi_offset(U1, U1SAVE) + cfi_offset(U0, U0SAVE) subfic TNC, CNT, 64 sldi r7, N, RP add UP, UP, r7 @@ -170,8 +174,8 @@ L(cj3): or r10, r12, r7 L(cj2): std r10, -32(RP) std r8, -40(RP) -L(ret): ld U1, -8(r1) - ld U0, -16(r1) +L(ret): ld U1, U1SAVE(r1) + ld U0, U0SAVE(r1) mr RP, RETVAL blr END(__mpn_lshift) diff --git a/sysdeps/powerpc/powerpc64/mul_1.S b/sysdeps/powerpc/powerpc64/mul_1.S index 953ded8028..cade365258 100644 --- a/sysdeps/powerpc/powerpc64/mul_1.S +++ b/sysdeps/powerpc/powerpc64/mul_1.S @@ -24,9 +24,14 @@ #define N r5 #define VL r6 +#define R26SAVE (-48) +#define R27SAVE (-40) + ENTRY_TOCLESS (__mpn_mul_1, 5) - std r27, -40(r1) - std r26, -48(r1) + std r27, R27SAVE(r1) + std r26, R26SAVE(r1) + cfi_offset(r27, R27SAVE) + cfi_offset(r26, R26SAVE) li r12, 0 ld r26, 0(UP) @@ -129,7 +134,7 @@ L(end): mulld r0, r26, VL std r0, 0(RP) std r7, 8(RP) L(ret): addze RP, r8 - ld r27, -40(r1) - ld r26, -48(r1) + ld r27, R27SAVE(r1) + ld r26, R26SAVE(r1) blr END(__mpn_mul_1)