This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: arm_stub SWI compiler warning
- From: Mark Salter <msalter at redhat dot com>
- To: Andrew Lunn <andrew at lunn dot ch>
- Cc: eCos Disuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Sun, 19 Sep 2004 17:49:38 -0400
- Subject: [ECOS] Re: arm_stub SWI compiler warning
- Organization: Red Hat Inc.
- References: <20040919132050.GB24679@lunn.ch>
On Sun, 2004-09-19 at 09:20, Andrew Lunn wrote:
> Hi Mark
>
> arm_stub.c is giving me a compiler warning. The line causing the problem is:
>
> case 0x3: // Coprocessor & SWI
> if (((ins & 0x03000000) == 0x03000000) && ins_will_execute(ins)) {
> // SWI
> -> return (CYGNUM_HAL_VECTOR_SOFTWARE_INTERRUPT * 4);
> } else {
> return (pc+1);
> }
>
> which is in function
> // Decide the next instruction to be executed for a given instruction
> static unsigned long *
> target_ins(unsigned long *pc, unsigned long ins)
>
> This code does not look right to me. Shouldn't it be returning the
> address in the software interrupt vector, where as its just returning
> 4x a constant, which is not an address at all.
>
It looks like the code is using CYGNUM_HAL_VECTOR_SOFTWARE_INTERRUPT as
an offset into __exception_handlers and assumes __exception_handlers
is at address 0x0. That will usually work, but it might be better to
use the address contained in the actual vector.
--Mark
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss