Commit 4d2df0f4 by Zhenqiang Chen Committed by Zhenqiang Chen

arm.c (arm_option_override): Set max_insns_skipped to MAX_INSN_PER_IT_BLOCK when…

arm.c (arm_option_override): Set max_insns_skipped to MAX_INSN_PER_IT_BLOCK when optimize_size for THUMB2.

ChangeLog:
2014-08-14  Zhenqiang Chen  <zhenqiang.chen@arm.com>

	* config/arm/arm.c (arm_option_override): Set max_insns_skipped
	to MAX_INSN_PER_IT_BLOCK when optimize_size for THUMB2.

testsuite/ChangeLog:
2014-08-14  Zhenqiang Chen  <zhenqiang.chen@arm.com>

	* gcc.target/arm/max-insns-skipped.c: New test.

From-SVN: r213939
parent 0b3a20e3
2014-08-14 Zhenqiang Chen <zhenqiang.chen@arm.com>
* config/arm/arm.c (arm_option_override): Set max_insns_skipped
to MAX_INSN_PER_IT_BLOCK when optimize_size for THUMB2.
2014-08-13 Chen Gang gang.chen.5i5j@gmail.com 2014-08-13 Chen Gang gang.chen.5i5j@gmail.com
* microblaze/microblaze.md: Remove redundant '@' to avoid compiling * microblaze/microblaze.md: Remove redundant '@' to avoid compiling
......
...@@ -2989,6 +2989,10 @@ arm_option_override (void) ...@@ -2989,6 +2989,10 @@ arm_option_override (void)
/* If optimizing for size, bump the number of instructions that we /* If optimizing for size, bump the number of instructions that we
are prepared to conditionally execute (even on a StrongARM). */ are prepared to conditionally execute (even on a StrongARM). */
max_insns_skipped = 6; max_insns_skipped = 6;
/* For THUMB2, we limit the conditional sequence to one IT block. */
if (TARGET_THUMB2)
max_insns_skipped = MAX_INSN_PER_IT_BLOCK;
} }
else else
max_insns_skipped = current_tune->max_insns_skipped; max_insns_skipped = current_tune->max_insns_skipped;
......
2014-08-14 Zhenqiang Chen <zhenqiang.chen@arm.com>
* gcc.target/arm/max-insns-skipped.c: New test.
2014-08-14 Bin Cheng <bin.cheng@arm.com> 2014-08-14 Bin Cheng <bin.cheng@arm.com>
* c-c++-common/addrtmp.c: Add bind_pic_locally option. * c-c++-common/addrtmp.c: Add bind_pic_locally option.
......
/* { dg-do assemble { target arm_thumb2 } } */
/* { dg-options " -Os " } */
int t (int a, int b, int c, int d)
{
int r;
if (a > 0) {
r = a + b;
r += 0x456;
r *= 0x1234567;
}
else {
r = b - a;
r -= 0x123;
r *= 0x12387;
r += d;
}
return r;
}
/* { dg-final { object-size text <= 40 } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment