This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ARM/Thumb backend and CAN_DEBUG_WITHOUT_FP
- To: Bernd Schmidt <bernds at pathia dot cygnus dot co dot uk>
- Subject: Re: ARM/Thumb backend and CAN_DEBUG_WITHOUT_FP
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Wed, 01 Dec 1999 16:17:20 +0000
- Cc: gcc-patches at gcc dot gnu dot org
- Cc: richard dot earnshaw at arm dot com
- Organization: ARM Ltd.
- Reply-To: richard dot earnshaw at arm dot com
> The merged arm/thumb backend has a problem with the macro
> CAN_DEBUG_WITHOUT_FP. It defines it to TARGET_THUMB, but the value of the
> macro is never used, toplev.c only tests whether it is defined or not. We
> can't change that easily, because at the point where it is tested, we
> haven't parsed enough of the commandline to determine whether we're
> compiling arm or thumb code.
>
> The patch below works around this by setting a special variable
> "set_flag_omit_frame_pointer" which indicates whether the user used this
> compiler flag. If not, we can later change its default value.
>
> This isn't very pretty, but I don't really see alternatives.
>
> Bernd
What was wrong with this patch that I committed some time back? It was
supposed to have addressed the different requirements of ARM/Thumb code.
Mon Oct 25 15:42:09 1999 Richard Earnshaw (rearnsha@arm.com)
* arm.h (TARGET_APCS_FRAME): Renamed from TARGET_APCS -- all uses
updated.
(CAN_DEBUG_WITHOUT_FP): Define.
(FIXED_REGISTERS): Make r11 call-saved.
(CALL_USED_REGISTERS): Likewise.
(CONDITIONAL_REGISTER_USAGE): Fix r11 if TARGET_APCS_FRAME.
(FRAME_POINTER_REQUIRED): Correct logic for determining when a
frame-pointer is required.
(TARGET_DEFAULT): Make default setting include ARM_FLAG_APCS_FRAME.
* arm.c (arm_override_options): Warn about -mno-apcs-frame and -g
if the target normally needs a stack frame in non-leaf functions.
(use_return_insn): Correct logic for determining when a return
instruction can be used.
(output_return_instruction): Handle the frame-pointer register as
a normal register when not TARGET_APCS_FRAME.
(arm_output_prologue): Likewise.
(arm_output_epilogue): Likewise.
(output_func_epilogue): Likewise.
(arm_expand_prologue): Likewise.
* netbsd.h semi.h (TARGET_DEFAULT): Add ARM_FLAG_APCS_FRAME.