Commit 08a557f6 by Mark Shinwell Committed by Mark Shinwell

pr-support.c (__gnu_unwind_execute): Insert " + 1" in necessary places to pass…

pr-support.c (__gnu_unwind_execute): Insert " + 1" in necessary places to pass the correct "number of registers"...

	gcc/
	* config/arm/pr-support.c (__gnu_unwind_execute): Insert " + 1" in
	necessary places to pass the correct "number of registers" values
	to _Unwind_VRS_Pop.

	gcc/testsuite/
 	* g++.dg/eh/arm-vfp-unwind.C: New test.

From-SVN: r116291
parent 1af4bba8
2006-08-21 Mark Shinwell <shinwell@codesourcery.com>
* config/arm/pr-support.c (__gnu_unwind_execute): Insert " + 1" in
necessary places to pass the correct "number of registers" values
to _Unwind_VRS_Pop.
2006-08-20 Jan Hubicka <jh@suse.cz> 2006-08-20 Jan Hubicka <jh@suse.cz>
* tree-ssa-alias.c (eq_ptr_info, ptr_info_hash): New function. * tree-ssa-alias.c (eq_ptr_info, ptr_info_hash): New function.
......
...@@ -224,7 +224,7 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws) ...@@ -224,7 +224,7 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws)
{ {
/* Pop VFP registers with fldmx. */ /* Pop VFP registers with fldmx. */
op = next_unwind_byte (uws); op = next_unwind_byte (uws);
op = ((op & 0xf0) << 12) | (op & 0xf); op = ((op & 0xf0) << 12) | ((op & 0xf) + 1);
if (_Unwind_VRS_Pop (context, _UVRSC_VFP, op, _UVRSD_VFPX) if (_Unwind_VRS_Pop (context, _UVRSC_VFP, op, _UVRSD_VFPX)
!= _UVRSR_OK) != _UVRSR_OK)
return _URC_FAILURE; return _URC_FAILURE;
...@@ -253,7 +253,7 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws) ...@@ -253,7 +253,7 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws)
{ {
/* Pop iWMMXt D registers. */ /* Pop iWMMXt D registers. */
op = next_unwind_byte (uws); op = next_unwind_byte (uws);
op = ((op & 0xf0) << 12) | (op & 0xf); op = ((op & 0xf0) << 12) | ((op & 0xf) + 1);
if (_Unwind_VRS_Pop (context, _UVRSC_WMMXD, op, _UVRSD_UINT64) if (_Unwind_VRS_Pop (context, _UVRSC_WMMXD, op, _UVRSD_UINT64)
!= _UVRSR_OK) != _UVRSR_OK)
return _URC_FAILURE; return _URC_FAILURE;
...@@ -284,7 +284,7 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws) ...@@ -284,7 +284,7 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws)
{ {
/* Pop FPA registers. */ /* Pop FPA registers. */
op = next_unwind_byte (uws); op = next_unwind_byte (uws);
op = ((op & 0xf0) << 12) | (op & 0xf); op = ((op & 0xf0) << 12) | ((op & 0xf) + 1);
if (_Unwind_VRS_Pop (context, _UVRSC_FPA, op, _UVRSD_FPAX) if (_Unwind_VRS_Pop (context, _UVRSC_FPA, op, _UVRSD_FPAX)
!= _UVRSR_OK) != _UVRSR_OK)
return _URC_FAILURE; return _URC_FAILURE;
...@@ -294,7 +294,7 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws) ...@@ -294,7 +294,7 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws)
{ {
/* Pop VFP registers with fldmd. */ /* Pop VFP registers with fldmd. */
op = next_unwind_byte (uws); op = next_unwind_byte (uws);
op = ((op & 0xf0) << 12) | (op & 0xf); op = ((op & 0xf0) << 12) | ((op & 0xf) + 1);
if (_Unwind_VRS_Pop (context, _UVRSC_VFP, op, _UVRSD_DOUBLE) if (_Unwind_VRS_Pop (context, _UVRSC_VFP, op, _UVRSD_DOUBLE)
!= _UVRSR_OK) != _UVRSR_OK)
return _URC_FAILURE; return _URC_FAILURE;
......
2006-08-21 Mark Shinwell <shinwell@codesourcery.com>
* g++.dg/eh/arm-vfp-unwind.C: New test.
2006-08-20 Mark Mitchell <mark@codesourcery.com> 2006-08-20 Mark Mitchell <mark@codesourcery.com>
PR c++/28341 PR c++/28341
/* { dg-require-effective-target arm32 } */
/* { dg-do run } */
/* Test to catch off-by-one errors in arm/pr-support.c. */
#if defined (__VFP_FP__) && !defined (__SOFTFP__)
#include <iostream>
#include <stdlib.h>
using namespace std;
static void donkey ()
{
asm volatile ("fcpyd d9, %P0" : : "w" (1.2345) : "d9");
throw 1;
}
int main()
{
try
{
donkey ();
}
catch (int foo)
{
return 0;
}
return 1;
}
#else
int main()
{
return 0;
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment