logo       

m68k_register_virtual_type: msg#00542

Subject: m68k_register_virtual_type
[ Seems like this mail didn't come through although I'm sure it left my
notebook. ]

The m68k sr, fpcontrol and fpstatus registers don't contain addresses, so
they should be treated like any other integer register.  Committed.

Andreas.

2002-11-22  Andreas Schwab  <schwab@xxxxxxx>

        * m68k-tdep.c (m68k_register_virtual_type): Return int for SR, FPC
        and FPS registers.

Index: gdb/m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -p -a -u -p -a -r1.27 -r1.28
--- gdb/m68k-tdep.c     18 Nov 2002 22:19:28 -0000      1.27
+++ gdb/m68k-tdep.c     22 Nov 2002 00:02:03 -0000      1.28
@@ -148,20 +148,25 @@ m68k_register_virtual_size (int regnum)
   return (((unsigned) (regnum) - FP0_REGNUM) < 8 ? 12 : 4);
 }
 
-/* Return the GDB type object for the "standard" data type of data 
-   in register N.  This should be int for D0-D7, long double for FP0-FP7,
-   and void pointer for all others (A0-A7, PC, SR, FPCONTROL etc).
-   Note, for registers which contain addresses return pointer to void, 
-   not pointer to char, because we don't want to attempt to print 
-   the string after printing the address.  */
+/* Return the GDB type object for the "standard" data type of data in
+   register N.  This should be int for D0-D7, SR, FPCONTROL and
+   FPSTATUS, long double for FP0-FP7, and void pointer for all others
+   (A0-A7, PC, FPIADDR).  Note, for registers which contain
+   addresses return pointer to void, not pointer to char, because we
+   don't want to attempt to print the string after printing the
+   address.  */
 
 static struct type *
 m68k_register_virtual_type (int regnum)
 {
-  if ((unsigned) regnum >= E_FPC_REGNUM)
+  if (regnum == E_FPI_REGNUM)
     return lookup_pointer_type (builtin_type_void);
+  else if ((unsigned) regnum >= E_FPC_REGNUM)
+    return builtin_type_int;
   else if ((unsigned) regnum >= FP0_REGNUM)
     return builtin_type_long_double;
+  else if (regnum == PS_REGNUM)
+    return builtin_type_int;
   else if ((unsigned) regnum >= A0_REGNUM)
     return lookup_pointer_type (builtin_type_void);
   else

-- 
Andreas Schwab, SuSE Labs, schwab@xxxxxxx
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe