From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 757E6385CC87; Mon, 16 Oct 2023 18:24:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 757E6385CC87 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697480641; bh=eVA5RnNdiaVCJPH2j7KVY2XjHU79fahW1RbJDY/wFkg=; h=From:To:Subject:Date:From; b=y02+BZ/+5SaNuhgXQD82+fJeVaXSjQib0FiG7oml+BPdvrU3Ozsbi3H2a1UIV8evi p8Ei4LUd9asB31LN9zoqzpvbITCg1j/24RNOWSJbiJXuhLakGxkb5g4MOasnRAvg8x Q2cxV/K2FE9yCBMwmVS4ilaOJXY7T+eqAncK1EFM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work139)] Update ChangeLog.meissner X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work139 X-Git-Oldrev: 36156709beefd312b27cabaa7602b87e1fae1c66 X-Git-Newrev: 388cde8912b2fa3b206758988b59d7c301bc2ed2 Message-Id: <20231016182401.757E6385CC87@sourceware.org> Date: Mon, 16 Oct 2023 18:24:01 +0000 (GMT) List-Id: https://gcc.gnu.org/g:388cde8912b2fa3b206758988b59d7c301bc2ed2 commit 388cde8912b2fa3b206758988b59d7c301bc2ed2 Author: Michael Meissner Date: Thu Oct 12 00:51:50 2023 -0400 Update ChangeLog.meissner Diff: --- gcc/ChangeLog.meissner | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner index 5021e3ab1f2f..0075b9b4ee02 100644 --- a/gcc/ChangeLog.meissner +++ b/gcc/ChangeLog.meissner @@ -1,4 +1,4 @@ -==================== Branch work139, patch #1 ==================== +==================== Branch work139, patch #2 ==================== PowerPC: Do not depend on an undefined shift @@ -11,15 +11,15 @@ fine. I traced this down to a change made around October 10th: -commit 8f1a70a4fbcc6441c70da60d4ef6db1e5635e18a (HEAD) -Author: Jiufu Guo -Date: Tue Jan 10 20:52:33 2023 +0800 - - rs6000: build constant via li/lis;rldicl/rldicr - - If a constant is possible left/right cleaned on a rotated value from - a negative value of "li/lis". Then, using "li/lis ; rldicl/rldicr" - to build the constant. +| commit 8f1a70a4fbcc6441c70da60d4ef6db1e5635e18a (HEAD) +| Author: Jiufu Guo +| Date: Tue Jan 10 20:52:33 2023 +0800 +| +| rs6000: build constant via li/lis;rldicl/rldicr +| +| If a constant is possible left/right cleaned on a rotated value from +| a negative value of "li/lis". Then, using "li/lis ; rldicl/rldicr" +| to build the constant. The code was doing a -1 << 64 which is undefined behavior because different machines produce different results. On the x86_64 system, (-1 << 64) produces @@ -34,8 +34,12 @@ crosss compiler and on a native PowerPC system. gcc/ PR target/111778 - * config/rs6000/rs6000.cc (can_be_built_by_li_lis_and_rldicl): Do not - use a shift left by the number of bits in a host wide int. + * config/rs6000/rs6000.cc (can_be_built_by_li_lis_and_rldicl): Protect + code from shifts that are undefined. + (can_be_built_by_li_lis_and_rldicr): Likewise. + (can_be_built_by_li_and_rldic): Likewise. + +==================== Branch work139, patch #1 was reverted ==================== ==================== Branch work139, baseline ====================