From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22450 invoked by alias); 12 May 2010 13:12:23 -0000 Received: (qmail 22385 invoked by uid 22791); 12 May 2010 13:12:22 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from virtual.bogons.net (HELO virtual.bogons.net) (193.178.223.136) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 May 2010 13:12:17 +0000 Received: from jifvik.dyndns.org (jifvik.dyndns.org [85.158.45.40]) by virtual.bogons.net (8.10.2+Sun/8.11.2) with ESMTP id o4CDCEG04032; Wed, 12 May 2010 14:12:14 +0100 (BST) Received: from [172.31.1.2] (unknown [172.31.1.2]) by jifvik.dyndns.org (Postfix) with ESMTP id E8D9D3FE1; Wed, 12 May 2010 14:12:13 +0100 (BST) Message-ID: <4BEAA92D.70807@jifvik.org> Date: Wed, 12 May 2010 13:12:00 -0000 From: Jonathan Larmour User-Agent: Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515) MIME-Version: 1.0 To: Spencer Oliver Cc: ecos-patches@ecos.sourceware.org Subject: Re: [PATCH] when building using binutils 2.20: References: <4BE012A5.1050907@spen-soft.co.uk> In-Reply-To: <4BE012A5.1050907@spen-soft.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2010-05/txt/msg00013.txt.bz2 Spencer Oliver wrote: > cortex_m3: buildfix for binutils 2.20 > > when building using binutils 2.20: > - swi inst now requires an argument. > - msr psp,sp is not allowed. I'll let Nick handle this patch, but I'm curious (and admittedly haven't looked at the ISA details): it seems strange that msr psp,sp used to be allowed but now is not - and presumably it worked on the hardware otherwise it wouldn't have been in the port. Jifl > ------------------------------------------------------------------------ > > # HG changeset patch > # User Spencer Oliver > # Date 1272975499 -3600 > # Node ID d31e3aac03a66dd841d6b9a48c1261c00b437475 > # Parent 9b59569aaea99c165f8b838325d2f6bd4951ab36 > cortex_m3: buildfix for binutils 2.20 > > when building using binutils 2.20: > - swi inst now requires an argument. > - msr psp,sp is not allowed. > > diff -r 9b59569aaea9 -r d31e3aac03a6 packages/hal/cortexm/arch/current/include/hal_intr.h > --- a/packages/hal/cortexm/arch/current/include/hal_intr.h Fri Apr 23 12:01:39 2010 +0000 > +++ b/packages/hal/cortexm/arch/current/include/hal_intr.h Tue May 04 13:18:19 2010 +0100 > @@ -298,7 +298,7 @@ > { \ > __asm__ volatile ( \ > "ldr r3,=hal_call_dsrs_vsr \n" \ > - "swi \n" \ > + "swi 0 \n" \ > : \ > : \ > : "r3" \ > diff -r 9b59569aaea9 -r d31e3aac03a6 packages/hal/cortexm/arch/current/src/hal_misc.c > --- a/packages/hal/cortexm/arch/current/src/hal_misc.c Fri Apr 23 12:01:39 2010 +0000 > +++ b/packages/hal/cortexm/arch/current/src/hal_misc.c Tue May 04 13:18:19 2010 +0100 > @@ -185,7 +185,7 @@ > > hal_vsr_table[CYGNUM_HAL_VECTOR_SERVICE] = (CYG_ADDRESS)hal_switch_state_vsr; > > - __asm__ volatile( "swi" ); > + __asm__ volatile( "swi 0" ); > > hal_vsr_table[CYGNUM_HAL_VECTOR_SERVICE] = (CYG_ADDRESS)hal_default_svc_vsr; > > diff -r 9b59569aaea9 -r d31e3aac03a6 packages/hal/cortexm/arch/current/src/vectors.S > --- a/packages/hal/cortexm/arch/current/src/vectors.S Fri Apr 23 12:01:39 2010 +0000 > +++ b/packages/hal/cortexm/arch/current/src/vectors.S Tue May 04 13:18:19 2010 +0100 > @@ -130,7 +130,8 @@ > msr control,r0 > isb // Insert a barrier > > - msr psp,sp // Copy SP to PSP > + mov r0,sp > + msr psp,r0 // Copy SP to PSP > > #if !defined(CYGPKG_KERNEL) > sub sp,#(CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE/2) > @@ -274,7 +275,7 @@ > hal_interrupt_end_done: > > ldr r3,=hal_interrupt_end_vsr > - swi > + swi 0 > > //========================================================================== > // Interrupt end VSR -- ------["The best things in life aren't things."]------ Opinions==mine