| 183 | } |
| 184 | |
| 185 | static unsigned long unwind_get_byte(struct unwind_ctrl_block *ctrl) |
| 186 | { |
| 187 | unsigned long ret; |
| 188 | |
| 189 | if (ctrl->entries <= 0) |
| 190 | { |
| 191 | LOG_W("unwind: Corrupt unwind table"); |
| 192 | return 0; |
| 193 | } |
| 194 | |
| 195 | ret = (*ctrl->insn >> (ctrl->byte * 8)) & 0xff; |
| 196 | |
| 197 | if (ctrl->byte == 0) |
| 198 | { |
| 199 | ctrl->insn++; |
| 200 | ctrl->entries--; |
| 201 | ctrl->byte = 3; |
| 202 | } |
| 203 | else |
| 204 | ctrl->byte--; |
| 205 | |
| 206 | return ret; |
| 207 | } |
| 208 | |
| 209 | /* Before poping a register check whether it is feasible or not */ |
| 210 | static int unwind_pop_register(struct unwind_ctrl_block *ctrl, |