From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34902 invoked by alias); 13 Oct 2015 15:10:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 34845 invoked by uid 89); 13 Oct 2015 15:10:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: BLU004-OMC4S22.hotmail.com Received: from blu004-omc4s22.hotmail.com (HELO BLU004-OMC4S22.hotmail.com) (65.55.111.161) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Tue, 13 Oct 2015 15:10:24 +0000 Received: from BLU436-SMTP237 ([65.55.111.137]) by BLU004-OMC4S22.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 13 Oct 2015 08:10:22 -0700 X-TMN: [0aWz7aYBEZOTF+IgQXyeIKjx464ZSIFx] Message-ID: Date: Tue, 13 Oct 2015 15:10:00 -0000 From: Chen Gang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Bernd Schmidt , Mike Stump CC: Jeff Law , Richard Henderson , "Joseph S. Myers" , gcc-patches List Subject: Re: [PATCH] gcc/ira.c: Check !HAVE_FP_INSTEAD_INSNS when frame pointer is needed and as global register References: <561A7D5C.40409@hotmail.com> <561B902A.3090609@redhat.com> <561D1B80.8050706@redhat.com> In-Reply-To: <561D1B80.8050706@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-10/txt/msg01263.txt.bz2 On 10/13/15 22:56, Bernd Schmidt wrote: > On 10/13/2015 04:50 PM, Chen Gang wrote: >> OK, under the bugzilla, the maintainer treated it as expected behavior >> (not a bug). For me, we need more explanation for it (why we treat it >> as expected behavior). >=20 > A global register is under control of the user. If the compiler uses it a= s a frame pointer, it will get clobbered outside the user's control, which = is unexpected behaviour. Therefore, the code Mike quoted detects that case = and issues an error, indicating that you must use -fomit-frame-pointer if y= ou expect to use the frame pointer register for other purposes. >=20 OK, thanks. > If you want an address on the stack there's __builtin_frame_address which= may or may not do what was intended. The code quoted in the bugzilla is ju= st invalid. >=20 OK, thank you very much, I shall send related kernel fix patch to kernel mailing list. Thanks. --=20 Chen Gang (=E9=99=88=E5=88=9A) Open, share, and attitude like air, water, and life which God blessed