From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19135 invoked by alias); 15 Jan 2002 16:31:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19083 invoked from network); 15 Jan 2002 16:31:06 -0000 Received: from unknown (HELO cerbere.u-strasbg.fr) (130.79.112.7) by sources.redhat.com with SMTP; 15 Jan 2002 16:31:06 -0000 Received: from laocoon (laocoon.u-strasbg.fr [130.79.112.72]) by cerbere.u-strasbg.fr (8.9.3/8.8.7) with ESMTP id RAA02187; Tue, 15 Jan 2002 17:31:00 +0100 Message-Id: <4.2.0.58.20020115171354.01fba4a8@ics.u-strasbg.fr> X-Sender: muller@ics.u-strasbg.fr X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Tue, 15 Jan 2002 08:31:00 -0000 To: Mark Kettenis , gdb-patches@sources.redhat.com From: Pierre Muller Subject: Re: [PATCH] i386 register shuffle In-Reply-To: <200112271531.fBRFVah35948@elgar.my.domain> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-SW-Source: 2002-01/txt/msg00420.txt.bz2 At 16:31 27/12/2001 , Mark Kettenis a écrit: >This is a first step towards cleaning up the register numbering scheme >used for the i386. All possible numberings are now parametrized by >FP0_REGNUM and gdbarch_tdep (current_gdbarch)->num_xmm_regs. This >patch makes i386-tdep.h the definitive source for information about >the register layout. Mark, when you remove a macro, wouldn't it be better to substitute this macro where it is by its new equivalent? I still find 5 references to LAST_FPU_CTRL_REGNUM macro in the src/gdb dir. go32-nat.c:469: else if (regno <= LAST_FPU_CTRL_REGNUM) go32-nat.c:494: else if (regno <= LAST_FPU_CTRL_REGNUM) i386-linux-nat.c:96: (FP0_REGNUM <= (regno) && (regno) <= LAST_FPU_CTRL_REGNUM) i386v4-nat.c:184: for (regi = FP0_REGNUM; regi <= LAST_FPU_CTRL_REGNUM; regi++) i386v4-nat.c:219: for (regi = FP0_REGNUM; regi <= LAST_FPU_CTRL_REGNUM; regi++) Which means that go32 native target doesn't compile anymore one again. Moreover, I don't really understand Use XMM0_REGNUM instead of LAST_FPU_CTRL_REGNUM. This is really not a good change in my opinion: if anyone one day decides to change the order of the i386 registers, to for instance put the mxcsr reg before the xmm regs, then the for (i = FP0_REGNUM; i < XMM0_REGNUM; i++) i387_supply_register (i, fsave); will become wrong... Wouldn't it be more logical to at least define a LAST_FP_REGUM? Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99