aboutsummaryrefslogtreecommitdiff
path: root/gdb/alpha-tdep.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2005-05-29 01:54:44 +0000
committerJoel Brobecker <brobecker@gnat.com>2005-05-29 01:54:44 +0000
commit551e4f2e429ad77b1f862e2d4aad97e194c2493d (patch)
tree933bfbaa76c9cac2bdee0e287b5415ab5ee87c1e /gdb/alpha-tdep.c
parent3be16b6f91da358612fb3a283e15a90e4a2e1229 (diff)
downloadgdb-551e4f2e429ad77b1f862e2d4aad97e194c2493d.zip
gdb-551e4f2e429ad77b1f862e2d4aad97e194c2493d.tar.gz
gdb-551e4f2e429ad77b1f862e2d4aad97e194c2493d.tar.bz2
* alpha-tdep.c (alpha_next_pc): Use correct register number
for floating-point branch instructions.
Diffstat (limited to 'gdb/alpha-tdep.c')
-rw-r--r--gdb/alpha-tdep.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 7e3f684..e7d965b 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1372,6 +1372,7 @@ alpha_next_pc (CORE_ADDR pc)
{
unsigned int insn;
unsigned int op;
+ int regno;
int offset;
LONGEST rav;
char reg[8];
@@ -1404,7 +1405,19 @@ alpha_next_pc (CORE_ADDR pc)
}
/* Need to determine if branch is taken; read RA. */
- regcache_cooked_read (current_regcache, (insn >> 21) & 0x1f, reg);
+ regno = (insn >> 21) & 0x1f;
+ switch (op)
+ {
+ case 0x31: /* FBEQ */
+ case 0x36: /* FBGE */
+ case 0x37: /* FBGT */
+ case 0x33: /* FBLE */
+ case 0x32: /* FBLT */
+ case 0x35: /* FBNE */
+ regno += FP0_REGNUM;
+ }
+
+ regcache_cooked_read (current_regcache, regno, reg);
rav = extract_signed_integer (reg, 8);
switch (op)