[GAS][ARM]Generate unpredictable warning for pc used in data processing instructions with register-shifted register operand
Renlin Li
renlin.li@foss.arm.com
Mon Oct 10 09:49:00 GMT 2016
Hi all,
According to ARMARM, the behavior of instructions with register-shifted register
is unpredictable when PC is used in any field.
For example, the behavior of following instructions are all unpredictable:
cmn pc, r1, lsr r2
cmn r0, pc, lsr r2
cmn r0, r1, lsr pc
This patch produces warnings for this case.
arm-none-eabi binutils regression checked Okay.
Okay for trunk?
Regards,
Renlin
gas/ChangeLog:
2016-10-10 Renlin Li <renlin.li@arm.com>
* config/tc-arm.c (encode_arm_shift): Generate unpredictable warning
for register-shifted register instructions.
gas/testsuite/ChangeLog:
2016-10-10 Renlin Li <renlin.li@arm.com>
* gas/arm/shift-bad-pc.d: New.
* gas/arm/shift-bad-pc.l: New.
* gas/arm/shift-bad-pc.s: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmp.diff
Type: text/x-patch
Size: 6163 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20161010/1cdd5187/attachment.bin>
More information about the Binutils
mailing list