[fpc-devel] arm embedded cortexM3 unrecognized opcode

Bernd Mueller mueller.b at gmx.net
Wed Jul 14 11:02:09 CEST 2010


Hans-Peter Diettrich wrote:
> Jeppe Johansen schrieb:
>> I think that'll only complicate things. I think the compiler should be 
>> able to do anything, down to lowest level. Just like you have CLI, 
>> HLT, FXSTOR, WRMSR, etc instruction support in x86
> 
> Then many users will wonder why their application with included ASM from 
> somewhere else (DOS time...) will compile fine, but fails to run :-(
> 

Users, who do embedded stuff (without OS) NEED FULL control over the 
controller. I agree with Jeppe, that the compiler should not restrict 
something. Otherwise, you would need eventually ugly workarounds like 
the following (on ARM7 with an old fpc 2.3.1), which could easily be 
done in gcc btw.

procedure Disable;
{
    mrs r0, cpsr
    orr r0, r0, #0x80
    msr cpsr, r0
}
begin
    asm
       .long 0xE10F0000
       .long 0xE3800080
       .long 0xE129F000
    end;
end;

Regards, Bernd.



More information about the fpc-devel mailing list