[PATCH,GCC/Thumb1] Correctly reset the variable after_arm_reorg for Thumb1 target
Richard Earnshaw
rearnsha@arm.com
Mon Mar 17 11:53:00 GMT 2014
On 17/03/14 02:51, Terry Guo wrote:
> Hi,
>
> I am working on another patch and found this per-function variable isn't
> correctly reset for Thumb1 target. Currently no ICE will be triggered
> because we don't call function arm_split_constants for Thumb1 target. This
> patch intends to define this variable in machine_function struct in arm.h.
> In this way, the variable will be correctly reset and ready for being used
> for Thumb1 target in future.
>
> Tested with gcc regression test for Thumb1 target cortex-m0. No new
> regressions.
>
> Is it ok to trunk?
>
> BR,
> Terry
>
> 2014-03-17 Terry Guo <terry.guo@arm.com>
>
> * config/arm/arm.h (machine_function): Define variable
> after_arm_reorg here.
> * config/arm/arm.c (after_arm_reorg): Remove the definition.
> (arm_split_constant): Update the way to access variable
> after_arm_reorg.
> (arm_reorg): Ditto.
> (arm_output_function_epilogue): Remove the reset of after_arm_reorg.
>
>
> reset-after_arm_reorg-thumb1-v3.txt
>
>
> diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
> index 7ca47a7..982ed48 100644
> --- a/gcc/config/arm/arm.h
> +++ b/gcc/config/arm/arm.h
> @@ -1543,6 +1543,9 @@ typedef struct GTY(()) machine_function
> rtx thumb1_cc_op1;
> /* Also record the CC mode that is supported. */
> enum machine_mode thumb1_cc_mode;
> + /* Set to 1 after arm_reorg has started. Reset to 0 at the start of
> + the next function. */
The reset comment is no-longer relevant. Please remove.
Ok for stage1 with that change.
R.
More information about the Gcc-patches
mailing list