mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-17 13:47:37 +01:00
(put_script_cache): Replace "caching" with "as->caching" and delete
the former to avoid compiler-warnings. (run_script): Before doing the big switch, check for most common case (IA64_INSN_MOVE_STACKED). (Logical change 1.130)
This commit is contained in:
parent
dee53d7800
commit
c7d965a9dc
1 changed files with 47 additions and 47 deletions
|
@ -112,15 +112,13 @@ static inline void
|
||||||
put_script_cache (unw_addr_space_t as, struct ia64_script_cache *cache,
|
put_script_cache (unw_addr_space_t as, struct ia64_script_cache *cache,
|
||||||
sigset_t *saved_sigmaskp)
|
sigset_t *saved_sigmaskp)
|
||||||
{
|
{
|
||||||
unw_caching_policy_t caching = as->caching_policy;
|
assert (as->caching_policy != UNW_CACHE_NONE);
|
||||||
|
|
||||||
assert (caching != UNW_CACHE_NONE);
|
|
||||||
|
|
||||||
debug (200, "%s: unmasking signals/releasing lock\n", __FUNCTION__);
|
debug (200, "%s: unmasking signals/releasing lock\n", __FUNCTION__);
|
||||||
#ifdef HAVE_ATOMIC_OPS_H
|
#ifdef HAVE_ATOMIC_OPS_H
|
||||||
AO_CLEAR (&cache->busy);
|
AO_CLEAR (&cache->busy);
|
||||||
#else
|
#else
|
||||||
if (likely (caching == UNW_CACHE_GLOBAL))
|
if (likely (as->caching_policy == UNW_CACHE_GLOBAL))
|
||||||
mutex_unlock (&cache->lock);
|
mutex_unlock (&cache->lock);
|
||||||
sigprocmask (SIG_SETMASK, saved_sigmaskp, NULL);
|
sigprocmask (SIG_SETMASK, saved_sigmaskp, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
@ -467,7 +465,15 @@ run_script (struct ia64_script *script, struct cursor *c)
|
||||||
val = next_insn.val;
|
val = next_insn.val;
|
||||||
next_insn = *ip;
|
next_insn = *ip;
|
||||||
|
|
||||||
switch (opc)
|
/* This is by far the most common operation: */
|
||||||
|
if (likely (opc == IA64_INSN_MOVE_STACKED))
|
||||||
|
{
|
||||||
|
val = rotate_gr (c, val);
|
||||||
|
if ((ret = ia64_get_stacked (c, val, &loc, NULL)) < 0)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
switch (__builtin_expect(opc, IA64_INSN_MOVE_STACKED))
|
||||||
{
|
{
|
||||||
case IA64_INSN_SET:
|
case IA64_INSN_SET:
|
||||||
loc = IA64_LOC_ADDR (val, 0);
|
loc = IA64_LOC_ADDR (val, 0);
|
||||||
|
@ -493,12 +499,6 @@ run_script (struct ia64_script *script, struct cursor *c)
|
||||||
loc = ia64_scratch_loc (c, val);
|
loc = ia64_scratch_loc (c, val);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IA64_INSN_MOVE_STACKED:
|
|
||||||
val = rotate_gr (c, val);
|
|
||||||
if ((ret = ia64_get_stacked (c, val, &loc, NULL)) < 0)
|
|
||||||
return ret;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IA64_INSN_SETNAT_MEMSTK:
|
case IA64_INSN_SETNAT_MEMSTK:
|
||||||
if ((ret = ia64_get (c, c->loc[IA64_REG_PRI_UNAT_MEM],
|
if ((ret = ia64_get (c, c->loc[IA64_REG_PRI_UNAT_MEM],
|
||||||
&unat_addr)) < 0)
|
&unat_addr)) < 0)
|
||||||
|
|
Loading…
Reference in a new issue