[fpc-devel] arm embedded cortexM3 unrecognized opcode
Jeppe Johansen
jepjoh2 at kom.aau.dk
Tue Jul 13 13:24:02 CEST 2010
The bit names are a bit hard, since there aren't any parsing facilities
in place for them, to my knowledge. I think they would need a special
syntax to not be seen as symbols by the assembler reader
It'll take some work on the assembler reader and writer to get those
special instructions to work
The special registers should be added to armreg.dat(and then run
mkarmreg). I didn't add all the cortex registers. Is primask a real
register btw? It just assembles to cpsr
Geoffrey Barton skrev:
>
> On 12 Jul 2010, at 19:06, Jeppe Johansen wrote:
>
>> Add the missing instructions to the bottom of armins.dat, run
>> mkarmins in the same directory.
>
>
> It now recognises the mnemonic 'cpsie' but not the following 'i'.
>
> The 'msr' instruction should also allow the interrupts to be
> enabled/disabled as
>
> msr primask,r0
>
> but msr gives an unknown identifier error for 'primask' and all the
> other 'special' register names ('apsr' etc.) Perhaps they have been
> given different names, but I cannot find them listed anywhere in the
> FPC source.
>
>> (and then submit patch) :-)
>
> well, once I have some code which works on the chip, I will ask
> someone where to put it :-)
>
> Geoffrey
>
>>
>> Geoffrey Barton skrev:
>>> I wrote a procedure to turn on interrupts:-
>>>
>>> procedure intenable;nostackframe;
>>> begin
>>> asm
>>> cpsie i
>>> end;
>>> end;
>>>
>>> The compilation fails with 'Error: Unrecognized opcode cpsie'
>>>
>>> The compiler also does not recognise 'cpsid' and also 'primask' as
>>> in 'mrs r0,primask'
>>>
>>> any ideas/workarounds?
>>>
>>> Geoffrey
>>> _______________________________________________
>>> fpc-devel maillist - fpc-devel at lists.freepascal.org
>>> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>>
>> _______________________________________________
>> fpc-devel maillist - fpc-devel at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list