* alpha-tdep.c (alpha_next_pc): Use correct register number

for floating-point branch instructions.
This commit is contained in:
Joel Brobecker 2005-05-29 01:54:44 +00:00
parent 3be16b6f91
commit 551e4f2e42
2 changed files with 19 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-05-29 Joel Brobecker <brobecker@adacore.com>
* alpha-tdep.c (alpha_next_pc): Use correct register number
for floating-point branch instructions.
2005-05-28 Daniel Jacobowitz <dan@codesourcery.com> 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
Jonathan Larmour <jifl@eCosCentric.com> Jonathan Larmour <jifl@eCosCentric.com>

View file

@ -1372,6 +1372,7 @@ alpha_next_pc (CORE_ADDR pc)
{ {
unsigned int insn; unsigned int insn;
unsigned int op; unsigned int op;
int regno;
int offset; int offset;
LONGEST rav; LONGEST rav;
char reg[8]; char reg[8];
@ -1404,7 +1405,19 @@ alpha_next_pc (CORE_ADDR pc)
} }
/* Need to determine if branch is taken; read RA. */ /* 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); rav = extract_signed_integer (reg, 8);
switch (op) switch (op)