[PATCH] New option for automatically generating IT blocks

Richard Earnshaw rearnsha@arm.com
Tue May 19 10:59:00 GMT 2009
On Fri, 2009-05-08 at 16:29 -0300, Daniel Gutson wrote:
> Hi,
>   apologies again, this is the current version of the patch.
> 
> As I mentioned in the original post, with this patch the assembler allows use of conditional Thumb-2 instructions without requiring explicit IT instructions.
> 
> The patch adds the -mauto-it command-line option to enable this automatic generation of IT instructions. When not specified, the original behavior takes place.
> 
> I tested this by running the gas testsuite, plus the test cases I added. 
> 
> Please commit it for me if accepted, since I don't have write access.
> 

Looks generally ok, but I've a couple of questions about dark corners
that I can't spot immediate answers to when reading the code.

What happens if the user writes

	.text
	cmp	r0, #0
	addeq	r1, #2
	.data
	.word	33
	.text
	addne	r1, #3

Do we get one or two IT instructions?  If the user puts an explicit ITE
instruction in the sequence does this get verified against both parts.

What happens if we replace the .data section with a different code
section?  What if that also includes an IT block?

R.





More information about the Binutils mailing list