On Tue, Jul 29, 2014 at 10:19 AM, Jiong Wang <jiong.w...@arm.com> wrote: > the patch athttps://gcc.gnu.org/ml/gcc-patches/2014-07/msg00961.html > > actually has one glitch on if check. > > thumb target is code size sensitive, the best solution is we set > "prefer_callee_reg_p" to > true if we know that shrink-wrap will be performanced if prefer_callee_reg_p > is true. > > but unfortunately, shrink-wrap judegement is done after these code, so we > should always > prefer "r3" instead of "prefer_callee_reg_p" on thumb. > > previously, the logic is wrong, everything pass check on A, will pass check > on B. > > && (TARGET_THUMB2 > || !(TARGET_LDRD && current_tune->prefer_ldrd_strd))) <=A > { > reg = 3; > if (!(TARGET_LDRD && current_tune->prefer_ldrd_strd)) <= B > prefer_callee_reg_p = true; > } > > > the condition check > if (!(TARGET_LDRD && current_tune->prefer_ldrd_strd)) > > should be > > if (!TARGET_THUMB2) > > it's not exposed before because my local toolchain is not configured with > extra cflags that > the default dejagnu env is still for old cpu like arm7, that testcases which > requrie_thumb2 > are marked as UNSUPPORTTED. sorry for makeing trouble. > > after this fix, the code behave as expected, we only play the > "prefer_callee_reg_p" trick > on arm32 target. > > > testcase regressions fixed > === > -FAIL: gcc.target/arm/pr43920-2.c object-size text <= 54 > -FAIL: gcc.target/arm/pr45701-1.c scan-assembler push\t{r3 > -FAIL: gcc.target/arm/pr45701-1.c scan-assembler-not r8 > -FAIL: gcc.target/arm/pr45701-2.c scan-assembler push\t{r3 > -FAIL: gcc.target/arm/pr45701-2.c scan-assembler-not r8 > +PASS: gcc.target/arm/pr43920-2.c object-size text <= 54 > +PASS: gcc.target/arm/pr45701-1.c scan-assembler push\t{r3 > +PASS: gcc.target/arm/pr45701-1.c scan-assembler-not r8 > +PASS: gcc.target/arm/pr45701-2.c scan-assembler push\t{r3 > +PASS: gcc.target/arm/pr45701-2.c scan-assembler-not r8 > > and all those ira-shrink* testcases not affected, still all pass. > > test done > === > * pass bootstrap on chromebook with both arm and thumb mode > * no regression on arm-none-eabi (configured with armv8-a) full toolchain > test. > > ok to install? > > thanks, > Jiong > > gcc/ > * config/arm/arm.c (arm_get_frame_offsets): !(TARGET_LDRD && > current_tune->prefer_ldrd_strd) > should be "!TARGET_THUMB2".
Fix the changelog to something like * config/arm/arm.c (arm_get_frame_offsets): Fix condition handling Thumb2. Ok with that change. Ramana