[ECOS] arm_stub SWI compiler warning

Andrew Lunn andrew@lunn.ch
Sun Sep 19 13:20:00 GMT 2004


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.

        Thanks
                Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list