Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pierre Muller <muller@cerbere.u-strasbg.fr>
To: Mark Kettenis <kettenis@science.uva.nl>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] i386 register shuffle
Date: Tue, 15 Jan 2002 08:31:00 -0000	[thread overview]
Message-ID: <4.2.0.58.20020115171354.01fba4a8@ics.u-strasbg.fr> (raw)
In-Reply-To: <200112271531.fBRFVah35948@elgar.my.domain>

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


      reply	other threads:[~2002-01-15 16:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-27  7:32 Mark Kettenis
2002-01-15  8:31 ` Pierre Muller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.2.0.58.20020115171354.01fba4a8@ics.u-strasbg.fr \
    --to=muller@cerbere.u-strasbg.fr \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@science.uva.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox