From owner-svn-src-head@FreeBSD.ORG Sat Aug 31 14:56:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 13D1E91B; Sat, 31 Aug 2013 14:56:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DBD7625F4; Sat, 31 Aug 2013 14:56:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VEu9OI029524; Sat, 31 Aug 2013 14:56:09 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VEu9wL029522; Sat, 31 Aug 2013 14:56:09 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201308311456.r7VEu9wL029522@svn.freebsd.org> From: Andrew Turner Date: Sat, 31 Aug 2013 14:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255096 - head/contrib/gcc/config/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 14:56:10 -0000 Author: andrew Date: Sat Aug 31 14:56:09 2013 New Revision: 255096 URL: http://svnweb.freebsd.org/changeset/base/255096 Log: Implement _Unwind_GetIP and _Unwind_GetIPInfo as functions as that is what we expect on FreeBSD. The implementation is based on the existing macros. Modified: head/contrib/gcc/config/arm/unwind-arm.c head/contrib/gcc/config/arm/unwind-arm.h Modified: head/contrib/gcc/config/arm/unwind-arm.c ============================================================================== --- head/contrib/gcc/config/arm/unwind-arm.c Sat Aug 31 14:53:19 2013 (r255095) +++ head/contrib/gcc/config/arm/unwind-arm.c Sat Aug 31 14:56:09 2013 (r255096) @@ -1074,3 +1074,19 @@ _Unwind_GetTextRelBase (_Unwind_Context { abort (); } + +#ifdef __FreeBSD__ +/* FreeBSD expects these to be functions */ +_Unwind_Ptr +_Unwind_GetIP (struct _Unwind_Context *context) +{ + return _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1; +} + +_Unwind_Ptr +_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn) +{ + *ip_before_insn = 0; + return _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1; +} +#endif Modified: head/contrib/gcc/config/arm/unwind-arm.h ============================================================================== --- head/contrib/gcc/config/arm/unwind-arm.h Sat Aug 31 14:53:19 2013 (r255095) +++ head/contrib/gcc/config/arm/unwind-arm.h Sat Aug 31 14:56:09 2013 (r255096) @@ -253,12 +253,17 @@ extern "C" { return val; } +#ifndef __FreeBSD__ /* Return the address of the instruction, not the actual IP value. */ #define _Unwind_GetIP(context) \ (_Unwind_GetGR (context, 15) & ~(_Unwind_Word)1) #define _Unwind_GetIPInfo(context, ip_before_insn) \ (*ip_before_insn = 0, _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1) +#else + _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *); + _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *); +#endif static inline void _Unwind_SetGR (_Unwind_Context *context, int regno, _Unwind_Word val)