1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-28 20:21:45 +02:00

(rotate_gr): If the register is outside the current stacked frame, return -1.

(Logical change 1.18)
This commit is contained in:
mostang.com!davidm 2002-04-25 06:47:29 +00:00
parent 053cda26f2
commit 4d37950b2c

View file

@ -6,7 +6,7 @@
static inline int
rotate_gr (struct ia64_cursor *c, int reg)
{
unsigned int rrb_gr, sor;
unsigned int rrb_gr, sor, sof;
unw_word_t cfm;
int preg, ret;
@ -14,10 +14,13 @@ rotate_gr (struct ia64_cursor *c, int reg)
if (ret < 0)
return ret;
sof = (cfm & 0x7f);
sor = 8 * ((cfm >> 14) & 0xf);
rrb_gr = (cfm >> 18) & 0x7f;
if ((unsigned) (reg - 32) > sor)
if ((unsigned) (reg - 32) > sof)
return -1; /* not a valid stacked register number */
else if ((unsigned) (reg - 32) > sor)
preg = reg; /* register not part of the rotating partition */
else
{