From f74e65509f3355b9bb0992d2c784e56962b06001 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 2 Dec 2015 16:34:58 +0000 Subject: [PATCH] mips.c (mips_emit_probe_stack_range): Adjust. * config/mips/mips.c (mips_emit_probe_stack_range): Adjust. (mips_output_probe_stack_range): Rotate the loop and simplify. From-SVN: r231188 --- gcc/ChangeLog | 5 +++++ gcc/config/mips/mips.c | 26 ++++++++++---------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db75d76..c33163b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-12-02 Eric Botcazou + + * config/mips/mips.c (mips_emit_probe_stack_range): Adjust. + (mips_output_probe_stack_range): Rotate the loop and simplify. + 2015-12-02 David Sherwood * config/aarch64/aarch64.md: New pattern. diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index eeb80eb..6145944 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -11364,11 +11364,12 @@ mips_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. */ @@ -11394,38 +11395,31 @@ const char * mips_output_probe_stack_range (rtx reg1, rtx reg2) { static int labelno = 0; - char loop_lab[32], end_lab[32], tmp[64]; + char loop_lab[32], tmp[64]; rtx xops[2]; - ASM_GENERATE_INTERNAL_LABEL (loop_lab, "LPSRL", labelno); - ASM_GENERATE_INTERNAL_LABEL (end_lab, "LPSRE", labelno++); + ASM_GENERATE_INTERNAL_LABEL (loop_lab, "LPSRL", labelno++); + /* Loop. */ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, loop_lab); - /* Jump to END_LAB if TEST_ADDR == LAST_ADDR. */ - xops[0] = reg1; - xops[1] = reg2; - strcpy (tmp, "%(%