ARM unwinder for thumb: Fix broken MOV opcode
The origin of the register value was never moved in the desired register state due to a typo ('rhs' vs. 'rhd'). While looking at the code, I noticed the action taken for the register value is another copy'n'paste error from the ADD opcode above -> it added to the register value instead of MOVing the current value. Patch submitted upstream. cppcheck reported: [lib/unwarminder/unwarm_thumb.c:473]: (warning) Redundant assignment of 'state.regData[rhd].o' to itself. Change-Id: I78cdbf37a191007a3bddbaa350b906dbce2fe671
This commit is contained in:
parent
799024198f
commit
789df17dd9
1 changed files with 2 additions and 2 deletions
|
@ -469,8 +469,8 @@ UnwResult UnwStartThumb(UnwState * const state)
|
|||
case 2: /* MOV */
|
||||
UnwPrintd5("MOV r%d, r%d\t; r%d %s",
|
||||
rhd, rhs, rhd, M_Origin2Str(state->regData[rhs].o));
|
||||
state->regData[rhd].v += state->regData[rhs].v;
|
||||
state->regData[rhd].o = state->regData[rhd].o;
|
||||
state->regData[rhd].v = state->regData[rhs].v;
|
||||
state->regData[rhd].o = state->regData[rhs].o;
|
||||
break;
|
||||
|
||||
case 3: /* BX */
|
||||
|
|
Loading…
Reference in a new issue