[OPCODE][AARCH64]Check mapping symbol while backward searching for IT block
Renlin Li
renlin.li@arm.com
Thu Sep 10 17:19:00 GMT 2015
Hi all,
For the following simple assembly code.
.text
.thumb
.syntax unified
.thumb_func
f:
nop.w
.long 0xbf080000
nop.w
When objdumped, the following code assembly will be generated.
0: f3af 8000 nop.w
4: bf080000 .word 0xbf080000
8: f3af 8000 nopeq.w
The instruction at pc=0x8 is treated as conditional executed instruction
within an IT block. This is because objdump misinterprets data (at
pc=0x4) as an IT instruction.
During the backward search for a proper IT instruction, mapping state
for the current instruction is not checked.
In this patch, I create a new function mapping_symbol_for_insn to search
the mapping state given an addr.
It's used in find_ifthen_state to further guard the check for an IT
instruction.
A new testcase is also added. Binutils checked without any new issues.
Is Okay to commit on trunk?
Kind regards,
Renlin Li
opcodes/ChangeLog:
2015-09-10 Renlin Li <renlin.li@arm.com>
* arm-dis.c (mapping_symbol_for_insn): New function.
(find_ifthen_state): Call mapping_symbol_for_insn().
gas/testsuite/ChangeLog:
2015-09-10 Renlin Li <renlin.li@arm.com>
* gas/arm/thumb2_it_search.d: New.
* gas/arm/thumb2_it_search.s: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new-new.diff
Type: text/x-patch
Size: 4122 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150910/867366c6/attachment.bin>
More information about the Binutils
mailing list