Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Remove some write_register_bytes occurences from i386-tdep.c
Date: Sun, 18 Aug 2002 10:18:00 -0000	[thread overview]
Message-ID: <200208181718.g7IHIrg6029437@elgar.kettenis.dyndns.org> (raw)

This replaces two write_register_bytes invocations with
write_register_gen.  The remaining occurences are in principle
legitimate calls to write_register_bytes, since the intent *is* a
partial update of a register.  Of course I can "open code" these calls
if that's desirable.

Checked in.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
	* i386-tdep.c (i386_do_pop_frame, i386_store_return_value): Call
	write_register_gen instead of write_register_bytes.

Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.81
diff -u -p -r1.81 i386-tdep.c
--- i386-tdep.c 17 Aug 2002 11:39:38 -0000 1.81
+++ i386-tdep.c 18 Aug 2002 17:15:10 -0000
@@ -833,8 +833,7 @@ i386_do_pop_frame (struct frame_info *fr
       if (addr)
 	{
 	  read_memory (addr, regbuf, REGISTER_RAW_SIZE (regnum));
-	  write_register_bytes (REGISTER_BYTE (regnum), regbuf,
-				REGISTER_RAW_SIZE (regnum));
+	  write_register_gen (regnum, regbuf);
 	}
     }
   write_register (FP_REGNUM, read_memory_integer (fp, 4));
@@ -1003,8 +1002,7 @@ i386_store_return_value (struct type *ty
 	 not exactly how it would happen on the target itself, but
 	 it is the best we can do.  */
       convert_typed_floating (valbuf, type, buf, builtin_type_i387_ext);
-      write_register_bytes (REGISTER_BYTE (FP0_REGNUM), buf,
-			    FPU_REG_RAW_SIZE);
+      write_register_gen (FP0_REGNUM, buf);
 
       /* Set the top of the floating-point register stack to 7.  The
          actual value doesn't really matter, but 7 is what a normal


             reply	other threads:[~2002-08-18 17:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-18 10:18 Mark Kettenis [this message]
2002-08-18 10:46 ` Andrew Cagney
2002-08-18 13:08   ` Andrew Cagney
2002-08-18 13:19     ` Mark Kettenis
2002-08-18 13:35       ` [PATCH] regcache raw read/write partial; Was: " Andrew Cagney
2002-08-18 17:38         ` Andrew Cagney

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=200208181718.g7IHIrg6029437@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=gdb-patches@sources.redhat.com \
    /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