[fpc-pascal] LLVM Backend Support
Marco van de Voort
marcov at stack.nl
Fri Aug 19 14:36:16 CEST 2016
In our previous episode, Jonas Maebe said:
> Another, more important, issue is that the LLVM-based compiler also
> includes the regular code generator for the targeted architecture (to
> generate entry and exit code for pure assembler routines).
FYI, I've been creating some SSE image conversion routines in Delphi/FPC
(FPC for avx) the last few days, and I noticed that Delphi allows something
like that too for 64-bit. (That being generating entry and exit code for
asm code)
It has pseudo directives to push registers on entry, allowing it
to create a stack frame (aligned, with SEH record).
There are four functions:
.noframe - omit stackframe (our nostackframe)
.pushnv - save general purpose non-volatile register (pushes)
.savenv - save sse2/3 non-volatile (saves to stack)
.params <x> - reserves enoughs stackspace to call a procedure with <x> regs params
the (<x> time 8, addressable as an byte array using @param[])
http://community.embarcadero.com/blogs/entry/more-x64-assembler-funfactsandndashnew-assembler-directives-38940
More information about the fpc-pascal
mailing list