From fabc9e2248253f837eeb6efdee3f82497b24ee96 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 6 Oct 2015 16:39:00 +0000 Subject: [PATCH] arm.c (arm_emit_probe_stack_range): Adjust comment. * config/arm/arm.c (arm_emit_probe_stack_range): Adjust comment. (output_probe_stack_range): Rotate the loop and simplify. (thumb1_expand_prologue): Tweak sorry message. * config/arm/arm.md (probe_stack): Use bare string. From-SVN: r228534 --- gcc/ChangeLog | 7 +++++++ gcc/config/arm/arm.c | 25 +++++++++++++------------ gcc/config/arm/arm.md | 4 +--- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2de844f6eeb..6204617f071 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-10-06 Eric Botcazou + + * config/arm/arm.c (arm_emit_probe_stack_range): Adjust comment. + (output_probe_stack_range): Rotate the loop and simplify. + (thumb1_expand_prologue): Tweak sorry message. + * config/arm/arm.md (probe_stack): Use bare string. + 2015-10-06 Nick Clifton * config.gcc (lm32-elf): Add newlib-stdint.h to tm_file. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 87e55e9e350..0bf1164845c 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -21262,11 +21262,12 @@ arm_emit_probe_stack_range (HOST_WIDE_INT first, HOST_WIDE_INT size, /* Step 3: the loop - while (TEST_ADDR != LAST_ADDR) + do { TEST_ADDR = TEST_ADDR + PROBE_INTERVAL probe at TEST_ADDR } + while (TEST_ADDR != LAST_ADDR) probes at FIRST + N * PROBE_INTERVAL for values of N from 1 until it is equal to ROUNDED_SIZE. */ @@ -21311,22 +21312,22 @@ output_probe_stack_range (rtx reg1, rtx reg2) ASM_GENERATE_INTERNAL_LABEL (loop_lab, "LPSRL", labelno++); + /* Loop. */ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, loop_lab); - /* Test if TEST_ADDR == LAST_ADDR. */ + /* TEST_ADDR = TEST_ADDR + PROBE_INTERVAL. */ xops[0] = reg1; - xops[1] = reg2; - output_asm_insn ("cmp\t%0, %1", xops); + xops[1] = GEN_INT (PROBE_INTERVAL); + output_asm_insn ("sub\t%0, %0, %1", xops); - if (TARGET_THUMB2) - fputs ("\tittt\tne\n", asm_out_file); + /* Probe at TEST_ADDR. */ + output_asm_insn ("str\tr0, [%0, #0]", xops); - /* TEST_ADDR = TEST_ADDR + PROBE_INTERVAL. */ - xops[1] = GEN_INT (PROBE_INTERVAL); - output_asm_insn ("subne\t%0, %0, %1", xops); + /* Test if TEST_ADDR == LAST_ADDR. */ + xops[1] = reg2; + output_asm_insn ("cmp\t%0, %1", xops); - /* Probe at TEST_ADDR and branch. */ - output_asm_insn ("strne\tr0, [%0, #0]", xops); + /* Branch. */ fputs ("\tbne\t", asm_out_file); assemble_name_raw (asm_out_file, loop_lab); fputc ('\n', asm_out_file); @@ -24869,7 +24870,7 @@ thumb1_expand_prologue (void) /* If we have a frame, then do stack checking. FIXME: not implemented. */ if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK && size) - sorry ("-fstack-check=specific for THUMB1"); + sorry ("-fstack-check=specific for Thumb-1"); amount = offsets->outgoing_args - offsets->saved_regs; amount -= 4 * thumb1_extra_regs_pushed (offsets, true); diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index b4c555be592..c5985bbb506 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -8262,9 +8262,7 @@ [(set (match_operand 0 "memory_operand" "=m") (unspec [(const_int 0)] UNSPEC_PROBE_STACK))] "TARGET_32BIT" -{ - return "str%?\\tr0, %0"; -} + "str%?\\tr0, %0" [(set_attr "type" "store1") (set_attr "predicable" "yes")] ) -- 2.30.2