Fix a problem building the ARM assembler using LLVM.

PR target/19311
	* config/tc-arm.c (encode_arm_immediate): Recode to improve
	efficiency and avoid an LLVM loop optimization bug.
This commit is contained in:
Loria 2016-02-01 14:32:25 +00:00 committed by Nick Clifton
parent 655ed9ea17
commit 4f1d62057f
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2016-02-01 Loria <Loria@phantasia.org>
PR target/19311
* config/tc-arm.c (encode_arm_immediate): Recode to improve
efficiency and avoid an LLVM loop optimization bug.
2016-02-01 Nick Clifton <nickc@redhat.com>
* config/tc-microblaze.c (parse_imm): Fix compile time warning

View File

@ -7268,7 +7268,10 @@ encode_arm_immediate (unsigned int val)
{
unsigned int a, i;
for (i = 0; i < 32; i += 2)
if (val <= 0xff)
return val;
for (i = 2; i < 32; i += 2)
if ((a = rotate_left (val, i)) <= 0xff)
return a | (i << 7); /* 12-bit pack: [shift-cnt,const]. */