[fpc-devel] Trunk does not build on AArch64
Sven Barth
pascaldragon at googlemail.com
Sun Oct 18 11:31:38 CEST 2020
Am 18.10.2020 um 11:15 schrieb J. Gareth Moreton:
> Hi Sven - thanks for the quick check. I'm out of the house currently
> so I can't try it out immediately, but I'll try it out later this
> evening. By the way, both my source and target are aarch64-linux (I'm
> using the prototype aarch64 build of the Raspberry Pi OS, athough I
> have an SD card with the standard 32-bit Arm Raspian as well).
So you used 3.2.0 aarch64-linux as starting compiler? (though the
question isn't important anymore as the problem was somewhere else)
> In regards to it not supporting inline assembly, it might only be
> applicable to FPC 3.2.x, as I tried to write some customised assembly
> language but was getting unrecognised opcode errors for instructions
> that definitely exist (like LDR).
3.2.0 also supports inline assembly for aarch64. And LDR works as well
as the following code in the Rtti unit from 3.2.0 shows:
=== code begin ===
const
RawThunkPlaceholderProc = $8765876587658765;
RawThunkPlaceholderContext = $4321432143214321;
type
TRawThunkProc = PtrUInt;
TRawThunkContext = PtrUInt;
procedure RawThunk; assembler; nostackframe;
asm
ldr x16, .LProc
ldr x0, .LContext
br x16
.LProc:
.quad RawThunkPlaceholderProc
.LContext:
.quad RawThunkPlaceholderContext
RawThunkEnd:
end;
=== code end ===
So you probably either used something that's definitely not supposed to
be supported or something that the assembly reader does not yet handle
correctly (e.g. I had to fix 3.1.1 so that the code above is handled
correctly)
Thus if you have such code and it doesn't work please report it.
Regards,
Sven
More information about the fpc-devel
mailing list