From 382a2a57e43236cbb10ab391f25bf3a5eb6de955 Mon Sep 17 00:00:00 2001 From: shinwell Date: Wed, 13 Dec 2006 17:32:47 +0000 Subject: gcc/ * config/arm/arm.c (arm_output_fldmx): Output FLDMD instead of FLDMX. Rename function to... (vfp_output_fldmd): ...this. (vfp_output_fstmx): Output FSTMD instead of FSTMX. Rename function to... (vfp_output_fstmd): ...this. (vfp_emit_fstmx): Don't leave space in the frame layout for the FSTMX format word. Rename function to... (vfp_emit_fstmd): ...this. (arm_get_vfp_saved_size): Don't add in space for the FSTMX format word. (arm_output_epilogue): Adjust comment to reflect use of FSTMD. (arm_unwind_emit_sequence): Don't compensate for the FSTMX format word. Also emit "vsave" assembler directives in such cases rather than "save". * config/arm/libunwind.S (gnu_Unwind_Restore_VFP, gnu_Unwind_Save_VFP): Adjust comments. (gnu_Unwind_Restore_VFP_D, gnu_Unwind_Save_VFP_D): New functions for saving and restoring using FSTMD and FLDMD rather than FSTMX and FLDMX. (gnu_Unwind_Restore_VFP_D_16_to_31, gnu_Unwind_Restore_VFP_D_16_to_31): New functions for saving and restoring the VFPv3 registers 16 .. 31. * config/arm/pr-support.c (gnu_unwind_execute): Add conditional compilation case to correctly handle unwind opcode 0xc8 when using VFP. * config/arm/unwind-arm.c (struct vfpv3_regs): New. (DEMAND_SAVE_VFP_D, DEMAND_SAVE_VFP_V3): New flags. (__gnu_Unwind_Save_VFP_D, __gnu_Unwind_Restore_VFP_D, __gnu_Unwind_Save_VFP_D_16_to_31, __gnu_Unwind_Restore_VFP_D_16_to_31): Declare. (restore_non_core_regs): Restore registers using FLDMD rather than FLDMX if required. Also handle restoration of VFPv3 registers. (_Unwind_VRS_Pop): Handle saving and restoring of registers using FSTMD and FLDMD if required; also handle VFPv3 registers 16 .. 31, including cases where the caller specifies a range of registers that overlaps the d15/d16 boundary. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119838 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/arm/pr-support.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'gcc/config/arm/pr-support.c') diff --git a/gcc/config/arm/pr-support.c b/gcc/config/arm/pr-support.c index f0e733a11a7..b5592b192fc 100644 --- a/gcc/config/arm/pr-support.c +++ b/gcc/config/arm/pr-support.c @@ -282,13 +282,23 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws) } if (op == 0xc8) { - /* Pop FPA registers. */ - op = next_unwind_byte (uws); +#ifndef __VFP_FP__ + /* Pop FPA registers. */ + op = next_unwind_byte (uws); op = ((op & 0xf0) << 12) | ((op & 0xf) + 1); - if (_Unwind_VRS_Pop (context, _UVRSC_FPA, op, _UVRSD_FPAX) - != _UVRSR_OK) - return _URC_FAILURE; - continue; + if (_Unwind_VRS_Pop (context, _UVRSC_FPA, op, _UVRSD_FPAX) + != _UVRSR_OK) + return _URC_FAILURE; + continue; +#else + /* Pop VFPv3 registers D[16+ssss]-D[16+ssss+cccc] with vldm. */ + op = next_unwind_byte (uws); + op = (((op & 0xf0) + 16) << 12) | ((op & 0xf) + 1); + if (_Unwind_VRS_Pop (context, _UVRSC_VFP, op, _UVRSD_DOUBLE) + != _UVRSR_OK) + return _URC_FAILURE; + continue; +#endif } if (op == 0xc9) { -- cgit v1.2.1