From: Jonathan Larmour <jifl@jifvik.org>
To: Spencer Oliver <spen@spen-soft.co.uk>
Cc: ecos-patches@ecos.sourceware.org
Subject: Re: [PATCH] when building using binutils 2.20:
Date: Wed, 12 May 2010 13:12:00 -0000 [thread overview]
Message-ID: <4BEAA92D.70807@jifvik.org> (raw)
In-Reply-To: <4BE012A5.1050907@spen-soft.co.uk>
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 <spen@spen-soft.co.uk>
> # 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
next prev parent reply other threads:[~2010-05-12 13:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 12:27 Spencer Oliver
2010-05-12 13:12 ` Jonathan Larmour [this message]
2010-05-17 7:23 ` Daniel Néri
2010-05-17 9:36 ` Spencer Oliver
2010-05-17 11:40 ` Nick Garnett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BEAA92D.70807@jifvik.org \
--to=jifl@jifvik.org \
--cc=ecos-patches@ecos.sourceware.org \
--cc=spen@spen-soft.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).