mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-22 07:37:38 +01:00
(compile_reg): Use IA64_INSN_MOVE_SCRATCH instead of
IA64_INSN_MOVE_SIGCONTEXT. (run_script): Drop IA64_INSN_MOVE_SIGCONTEXT. Implement IA64_INSN_MOVE_SCRATCH by calling ia64_scratch_loc(). (Logical change 1.5)
This commit is contained in:
parent
73c10de341
commit
dffc24cb9f
1 changed files with 11 additions and 11 deletions
|
@ -21,6 +21,7 @@ This exception does not however invalidate any other reasons why the
|
||||||
executable file might be covered by the GNU General Public
|
executable file might be covered by the GNU General Public
|
||||||
License. */
|
License. */
|
||||||
|
|
||||||
|
#include "offsets.h"
|
||||||
#include "rse.h"
|
#include "rse.h"
|
||||||
#include "unwind_i.h"
|
#include "unwind_i.h"
|
||||||
|
|
||||||
|
@ -241,8 +242,8 @@ compile_reg (struct ia64_state_record *sr, int i, struct ia64_script *script)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* register got spilled to a scratch register */
|
/* register got spilled to a scratch register */
|
||||||
opc = IA64_INSN_MOVE_SIGCONTEXT;
|
opc = IA64_INSN_MOVE_SCRATCH;
|
||||||
val = struct_offset (struct sigcontext, sc_gr[rval]);
|
val = UNW_IA64_GR + rval;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -253,8 +254,8 @@ compile_reg (struct ia64_state_record *sr, int i, struct ia64_script *script)
|
||||||
val = unw.preg_index[IA64_REG_F16 + (rval - 16)];
|
val = unw.preg_index[IA64_REG_F16 + (rval - 16)];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
opc = IA64_INSN_MOVE_SIGCONTEXT;
|
opc = IA64_INSN_MOVE_SCRATCH;
|
||||||
val = struct_offset (struct sigcontext, sc_fr[rval]);
|
val = UNW_IA64_FR + rval;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -263,8 +264,8 @@ compile_reg (struct ia64_state_record *sr, int i, struct ia64_script *script)
|
||||||
val = unw.preg_index[IA64_REG_B1 + (rval - 1)];
|
val = unw.preg_index[IA64_REG_B1 + (rval - 1)];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
opc = IA64_INSN_MOVE_SIGCONTEXT;
|
opc = IA64_INSN_MOVE_SCRATCH;
|
||||||
val = struct_offset (struct sigcontext, sc_br[rval]);
|
val = UNW_IA64_BR + rval;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -417,13 +418,12 @@ run_script (struct ia64_script *script, struct ia64_cursor *c)
|
||||||
s[dst] = s[val];
|
s[dst] = s[val];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IA64_INSN_MOVE_SIGCONTEXT:
|
case IA64_INSN_MOVE_SCRATCH:
|
||||||
s[dst] = ia64_get_sigcontext_addr (c);
|
s[dst] = ia64_scratch_loc (c, val);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IA64_INSN_MOVE_STACKED:
|
case IA64_INSN_MOVE_STACKED:
|
||||||
s[dst] = (unsigned long) ia64_rse_skip_regs ((unsigned long *)
|
s[dst] = ia64_rse_skip_regs (c->bsp, val);
|
||||||
c->bsp, val);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IA64_INSN_SETNAT_MEMSTK:
|
case IA64_INSN_SETNAT_MEMSTK:
|
||||||
|
@ -457,7 +457,7 @@ ia64_find_save_locs (struct ia64_cursor *c)
|
||||||
{
|
{
|
||||||
if (ret != UNW_ESTOPUNWIND)
|
if (ret != UNW_ESTOPUNWIND)
|
||||||
dprintf ("%s: failed to locate/build unwind script for ip %lx\n",
|
dprintf ("%s: failed to locate/build unwind script for ip %lx\n",
|
||||||
__FUNCTION__, c->ip);
|
__FUNCTION__, (long) c->ip);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue