[Patch ARM] PR target/42093 - Fix Thumb2 table branches.

Ramana Radhakrishnan ramana.radhakrishnan@arm.com
Tue Dec 22 20:24:00 GMT 2009


Hi,

While investigating a problem with bootstrapping GCC in Thumb2 mode, I
came across this problem with compressed table branches with Thumb2. The
offsets allowed in the tbb and tbh instructions are unsigned but we were
gratuitously allowing negative signed offsets through. 

This also fixes the use of TARGET_THUMB in CASE_VECTOR_PC_RELATIVE to be
TARGET_THUMB1 rather than what it was earlier. 

Ok to commit if tested on arm-none-eabi cross with qemu for Thumb2 ? 

Currently continuing to test bootstrapping trunk with Thumb2 on
arm-linux-gnueabi.

Cheers
Ramana



2009-12-22  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/42093
	* config/arm/arm.h (CASE_VECTOR_PC_RELATIVE): Fix macro usage
	to TARGET_THUMB1.
	(CASE_VECTOR_SHORTEN_MODE): Allow signed offsets 
	only for TARGET_THUMB1.

2009-12-22  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/42093
	* gcc.target/arm/pr42093.c: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr42093.patch
Type: text/x-patch
Size: 1785 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091222/bc8a8bac/attachment.bin>


More information about the Gcc-patches mailing list