提交 8203d5b6 编写于 作者: N Nikolay Borisov 提交者: Russell King

ARM: 8052/1: unwind: Fix handling of "Pop r4-r[4+nnn],r14" opcode

The arm EABI states that unwind opcode 10100nnn means pop register r4-4[4+nnn],aditionally there is a similar unwind opcode: 10101nnn which means the same thing plus popping r14. Those two cases are handled by the unwind_exec_pop_r4_to_rN function which checks whether the 4th bit is set and does r14 popping.

However, up until now it has been checking whether the 8th bit was set (mask & 0x80) instead of the 4th (mask & 0x8), a simple to make typo but this meant that we were always popping r14 even if we had the former opcode.

This patch changes the mask so that the 2 unwind opcodes are being handled correctly.
Signed-off-by: NNikolay Borisov <Nikolay.Borisov@arm.com>
Reviewed-by: NAnurag Aggarwal <anurag19aggarwal@gmail.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 537094b6
...@@ -285,7 +285,7 @@ static int unwind_exec_pop_r4_to_rN(struct unwind_ctrl_block *ctrl, ...@@ -285,7 +285,7 @@ static int unwind_exec_pop_r4_to_rN(struct unwind_ctrl_block *ctrl,
if (unwind_pop_register(ctrl, &vsp, reg)) if (unwind_pop_register(ctrl, &vsp, reg))
return -URC_FAILURE; return -URC_FAILURE;
if (insn & 0x80) if (insn & 0x8)
if (unwind_pop_register(ctrl, &vsp, 14)) if (unwind_pop_register(ctrl, &vsp, 14))
return -URC_FAILURE; return -URC_FAILURE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册