diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-02-14 20:13:13 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-02-14 20:13:13 +0000 |
commit | 90e5f484e5383ca9de51282eb413a3b852a680c4 (patch) | |
tree | fc11dac522c261d09759d7a93f5330ed7c79249a | |
parent | 6190e3ddd185549f1953dcd4b127fe721452be93 (diff) | |
download | gdb-90e5f484e5383ca9de51282eb413a3b852a680c4.zip gdb-90e5f484e5383ca9de51282eb413a3b852a680c4.tar.gz gdb-90e5f484e5383ca9de51282eb413a3b852a680c4.tar.bz2 |
* ieee.c (ieee_regno_to_genreg): Convert register numbers for m68k
and i960.
(ieee_genreg_to_regno): Likewise.
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/ieee.c | 32 |
2 files changed, 38 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 09f0790..1db7b20 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 14 15:12:17 1996 Ian Lance Taylor <ian@cygnus.com> + + * ieee.c (ieee_regno_to_genreg): Convert register numbers for m68k + and i960. + (ieee_genreg_to_regno): Likewise. + Mon Feb 12 14:19:59 1996 Ian Lance Taylor <ian@cygnus.com> * ieee.c: Extensive changes to write code to put types in the diff --git a/binutils/ieee.c b/binutils/ieee.c index 642006b..1fe98bf 100644 --- a/binutils/ieee.c +++ b/binutils/ieee.c @@ -3432,6 +3432,22 @@ ieee_regno_to_genreg (abfd, r) bfd *abfd; int r; { + switch (bfd_get_arch (abfd)) + { + case bfd_arch_m68k: + /* For some reasons stabs adds 2 to the floating point register + numbers. */ + if (r >= 16) + r += 2; + break; + + case bfd_arch_i960: + /* Stabs uses 0 to 15 for r0 to r15, 16 to 31 for g0 to g15, and + 32 to 35 for fp0 to fp3. */ + --r; + break; + } + return r; } @@ -3442,6 +3458,22 @@ ieee_genreg_to_regno (abfd, r) bfd *abfd; int r; { + switch (bfd_get_arch (abfd)) + { + case bfd_arch_m68k: + /* For some reason stabs add 2 to the floating point register + numbers. */ + if (r >= 18) + r -= 2; + break; + + case bfd_arch_i960: + /* Stabs uses 0 to 15 for r0 to r15, 16 to 31 for g0 to g15, and + 32 to 35 for fp0 to fp3. */ + ++r; + break; + } + return r; } |