[RFA] Fix erroneous UNPREDICTABLE message with STMIA

Matthew Gretton-Dann matthew.gretton-dann@arm.com
Thu May 13 16:36:00 GMT 2010


Please can someone review and approve the attached patch?

gas was incorrectly diagnosing 32-bit Thumb STMIA instructions where the
base register was in the register list as UNPREDICTABLE if writeback was
not being used.  Examples are:
	STMIA r0, {r0-r4}
	STMIA r8, {r0-r11}

This patch fixes this issue.

It also changes the message when we are using writeback (and so the
instruction is UNPREDICTABLE) into an error.  This is to maintain
consistency with other messages of a similar nature in the same

However, there does seem to be a general inconsistency in the
gas/config/tc-arm.c about whether an UNPREDICTABLE/UNKNOWN instruction
causes an error or a warning.  Is there a consensus on whether an
UNPREDICTABLE instruction is an error or a warning?

Proposed ChangeLog:

2010-05-13  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>

	* config/tc-arm.c (encode_thumb2_ldmstm): Make warning about 
	writeback when base register is in register list an error, and 
	correct check.
	(do_t_ldmstm): Change warnings.

2010-05-13  Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
	* gas/arm/thumb2_ldmstm.d: Add new testcases.
	* gas/arm/thumb2_ldmstm.s: Likeiwse.
	* gas/arm/thumb2_ldmstm_bad.d: Add testcases to check for
	* gas/arm/thumb2_ldmstm_bad.l: Likewise.
	* gas/arm/thumb2_ldmstm_bad.s: Likewise.



Matthew Gretton-Dann
Principal Engineer - PD Software, Tools
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1005-ldmstm-fixunpredictable.patch
Type: text/x-patch
Size: 9936 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100513/2832cfb3/attachment.bin>

More information about the Binutils mailing list