mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-12-23 20:03:43 +01:00
(rotate_gr): If the register is outside the current stacked frame, return -1.
(Logical change 1.18)
This commit is contained in:
parent
053cda26f2
commit
4d37950b2c
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue