From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95131 invoked by alias); 6 May 2019 21:56:02 -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 95118 invoked by uid 89); 6 May 2019 21:56:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=installing X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 May 2019 21:56:00 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id DCDB41240941; Mon, 6 May 2019 21:55:58 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com, Segher Boessenkool Subject: [PATCH 1/3] rs6000: rs6000_dbx_register_number for fp/ap/mq Date: Mon, 06 May 2019 21:56:00 -0000 Message-Id: <87d86acc61792d5a094148360a5b46f4a4a3ba01.1557171132.git.segher@kernel.crashing.org> X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00248.txt.bz2 The frame pointer and the argument pointer aren't real registers. MQ was a register on old POWER. All three are still used as arguments to rs6000_dbx_register_number during initialisation. If we handle them explicitly we can do a gcc_unreachable to catch other unexpected registers. Tested on powerpc64-linux {-m32,-m64} and on powerpc64le-linux; installing on trunk. Segher 2019-05-06 Segher Boessenkool * config/rs6000/rs6000.c (rs6000_dbx_register_number): Handle FRAME_POINTER_REGNUM, ARG_POINTER_REGNUM, and 64 (which was MQ). -- gcc/config/rs6000/rs6000.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index c75fd86..6f46fdd 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -36305,7 +36305,15 @@ rs6000_dbx_register_number (unsigned int regno, unsigned int format) if (regno == TEXASR_REGNO) return 230; - return regno; + /* These do not make much sense. */ + if (regno == FRAME_POINTER_REGNUM) + return 111; + if (regno == ARG_POINTER_REGNUM) + return 67; + if (regno == 64) + return 100; + + gcc_unreachable (); #endif } @@ -36337,7 +36345,14 @@ rs6000_dbx_register_number (unsigned int regno, unsigned int format) if (regno == TEXASR_REGNO) return 116; - return regno; + if (regno == FRAME_POINTER_REGNUM) + return 111; + if (regno == ARG_POINTER_REGNUM) + return 67; + if (regno == 64) + return 64; + + gcc_unreachable (); } /* target hook eh_return_filter_mode */ -- 1.8.3.1