[ARM] minor opt in thumb_stack_frame_destroyed_p
authorYao Qi <yao.qi@linaro.org>
Fri, 15 Apr 2016 14:30:01 +0000 (15:30 +0100)
committerYao Qi <yao.qi@linaro.org>
Fri, 15 Apr 2016 14:30:01 +0000 (15:30 +0100)
commit415fa612334afb70600c2a7dbd2c2ff56ebbc4f3
tree53ac2411174d11112a855f0ab2dbe2c98bfbba10
parent05f7541ea79d4922f71641e287b610c67ba32b52
[ARM] minor opt in thumb_stack_frame_destroyed_p

thumb_stack_frame_destroyed_p scans the instructions from PC to the
end of the function, but if PC is far from the end of pc, we don't
have to scan, because PC should be in epilogue if it is still
far from the end of the function.  The criterion I use here is 16
bytes, which is more than 4 instructions.

Regression tested on aarch64-linux with mutli-arch debug.

gdb:

2016-04-15  Yao Qi  <yao.qi@linaro.org>

* arm-tdep.c (thumb_stack_frame_destroyed_p): Return zero if
PC is far from the end of function.
gdb/ChangeLog
gdb/arm-tdep.c