From owner-svn-src-head@FreeBSD.ORG Sat Jan 19 04:03:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A58A73DA; Sat, 19 Jan 2013 04:03:19 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8CCF190A; Sat, 19 Jan 2013 04:03:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J43J3N070272; Sat, 19 Jan 2013 04:03:19 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0J43JpQ070271; Sat, 19 Jan 2013 04:03:19 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301190403.r0J43JpQ070271@svn.freebsd.org> From: Andrew Turner Date: Sat, 19 Jan 2013 04:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245650 - head/lib/libc/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, 19 Jan 2013 04:03:19 -0000 Author: andrew Date: Sat Jan 19 04:03:18 2013 New Revision: 245650 URL: http://svnweb.freebsd.org/changeset/base/245650 Log: Update the syscall calling convention for ARM EABI. We store the syscall in r7 and use ip to store the old version of r7 as it is not guaranteed to be kept when calling a subroutine. The kernel will preserve the register across system calls. Modified: head/lib/libc/arm/SYS.h Modified: head/lib/libc/arm/SYS.h ============================================================================== --- head/lib/libc/arm/SYS.h Sat Jan 19 03:47:18 2013 (r245649) +++ head/lib/libc/arm/SYS.h Sat Jan 19 04:03:18 2013 (r245650) @@ -39,7 +39,15 @@ #include #include +#ifdef __ARM_EABI__ +#define SYSTRAP(x) \ + mov ip, r7; \ + ldr r7, =SYS_ ## x; \ + swi 0; \ + mov r7, ip +#else #define SYSTRAP(x) swi 0 | SYS_ ## x +#endif #define CERROR _C_LABEL(cerror) #define CURBRK _C_LABEL(curbrk)