This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[csl-arm] Correct VFP unwinding
- From: Daniel Jacobowitz <drow at false dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Paul Brook <paul at codesourcery dot com>
- Date: Wed, 29 Dec 2004 16:21:08 -0500
- Subject: [csl-arm] Correct VFP unwinding
Paul helped me track down a bug in VFP unwinding yesterday; the hard part of
this patch is all his. Without this change some FP unwinding directives can
cause unwinding to fail prematurely.
Look OK for csl-arm-branch, Paul?
--
Daniel Jacobowitz
2004-12-29 Paul Brook <paul@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
* config/arm/unwind-arm.c (_Unwind_VRS_Pop): Correct spelling of
discriminator.
(__gnu_unwind_execute): Correct masks for VFP and FPA unwinding.
Index: gcc-3.4.2/gcc/config/arm/unwind-arm.c
===================================================================
--- gcc-3.4.2.orig/gcc/config/arm/unwind-arm.c 2004-12-17 11:43:19.000000000 -0800
+++ gcc-3.4.2/gcc/config/arm/unwind-arm.c 2004-12-28 10:23:12.000000000 -0800
@@ -231,7 +231,7 @@
_Unwind_VRS_Result _Unwind_VRS_Pop (_Unwind_Context *context,
_Unwind_VRS_RegClass regclass,
- _uw descriminator,
+ _uw discriminator,
_Unwind_VRS_DataRepresentation representation)
{
phase1_vrs *vrs = (phase1_vrs *) context;
@@ -247,7 +247,7 @@
if (representation != _UVRSD_UINT32)
return _UVRSR_FAILED;
- mask = descriminator & 0xffff;
+ mask = discriminator & 0xffff;
ptr = (_uw *) vrs->core.r[R_SP];
/* Pop the requested registers. */
for (i = 0; i < 16; i++)
@@ -263,8 +263,8 @@
case _UVRSC_VFP:
{
- _uw start = descriminator >> 16;
- _uw count = descriminator & 0xffff;
+ _uw start = discriminator >> 16;
+ _uw count = discriminator & 0xffff;
struct vfp_regs tmp;
_uw *sp;
_uw *dest;
@@ -724,7 +724,7 @@
if ((op & 0xfc) == 0xb4)
{
/* Pop FPA E[4]-E[4+nn]. */
- op = 0x4000 | ((op & 3) + 1);
+ op = 0x40000 | ((op & 3) + 1);
if (_Unwind_VRS_Pop (context, _UVRSC_FPA, op, _UVRSD_FPAX)
!= _UVRSR_OK)
return _URC_FAILURE;
@@ -732,7 +732,7 @@
}
/* op & 0xf8 == 0xb8. */
/* Pop VFP D[8]-D[8+nnn] with fldmx. */
- op = 0x8000 | ((op & 7) + 1);
+ op = 0x80000 | ((op & 7) + 1);
if (_Unwind_VRS_Pop (context, _UVRSC_VFP, op, _UVRSD_VFPX)
!= _UVRSR_OK)
return _URC_FAILURE;
@@ -797,7 +797,7 @@
if ((op & 0xf8) == 0xd0)
{
/* Pop VFP D[8]-D[8+nnn] with fldmd. */
- op = 0x8000 | ((op & 7) + 1);
+ op = 0x80000 | ((op & 7) + 1);
if (_Unwind_VRS_Pop (context, _UVRSC_VFP, op, _UVRSD_DOUBLE)
!= _UVRSR_OK)
return _URC_FAILURE;