Re: [fpc-devel] Help with inline assembler code

2023-03-29 Thread Jeppe Johansen via fpc-devel
Hi, A much more deterministic version would do it as this: function HiInteger(value: LongInt): LongInt; nostackframe; assembler; asm   mov r0, r0, asr #16 end; If you do it with an inline ASM block and without stackframes it becomes much harder to predict how you need to address variables by n

[fpc-devel] Help with inline assembler code

2023-03-29 Thread Paul Renaud via fpc-devel
Hello,  I've been having a problem getting some code to compile.  I've gone through the documentation, butthere isn't any specific info for the arm version. This is a simplified version Program Test;     Function HiInteger( Value: LongInt ): LongInt;     Begin   Asm     LdR R0, Value