Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2022-02

register calling convention for Apple M1 ?

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Frb

Trying to get the IDE lldb based debugger to work on M1.... But I don't have M1 myself, so ...

When
     procedure fpc_Raiseexception (Obj : TObject; AnAddr : CodePointer; AFrame : Pointer); compilerproc;
is entered, the IDE tries to get the arguments. In normal user installs this code has no debug info, though the IDE relies on knowing the register for each of he arguments?

I do hope that the call on M1 also uses registers. If so, can anyone tell me which registers?

Obj:     On 64bit-Intel Linux that is RDI   (Win64: RCX) AnAddr:  On 64bit-Intel Linux that is RSI   (Win64: RDX) AFrame:  On 64bit-Intel Linux that is RDX   (Win64: R8)

Anything similar on M1?

Reply by email

Jonas Maebe
to Dmitry Boyarintsev: On Wed, Feb 16, 2022 at 3:17 PM Martin Frb via fpc-devel < should it be ARM64 calling…
Dmitry Boyarintsev wrote 10 lines
On Wed, Feb 16, 2022 at 3:17 PM Martin Frb via fpc-devel < > wrote: Anything similar on M1? should it be ARM64 calling convention? https://en.wikipedia.org/wiki/Calling_convention#ARM_(A64) <https://en.wikipedia.org/wiki/Calling_convention#ARM_(A64)>

With the exceptions documented at
https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms (although those don't affect fpc_Raiseexception).

Jonas

Reply by email