[fpc-devel] Re: systemh.inc InterLockedIncrement64 (var Target: int64)

Andrew Brunner andrew.t.brunner at gmail.com
Thu Oct 28 15:28:16 CEST 2010


I tried to use the assembly code from the x64 unit on a i386 build of
FPC but FPC throws error on compile.  Why are the specific x64
instructions being blocked?  The cpu running the code has the ability
to execute the instructions.  I don't see why the compiler is making
the assumption that the code will cause an error.  Is there a switch
at compile time of FPC that removes all references to supported
assembly instructions on i386 build?  Shouldn't the application be
able to pass instructions to the cpu regardless of what build I used
to create the binary exe?

Under Windows there are functions for interlocked*(Int64).

The either the application developer or possibly the end-user should
be able to activate x64 instructions either at compile time or run
time (with no respect to 64 bit binary).  Obviously a 64 bit app would
have blind access to X64 cpu instructions.

I want access to a few of these instructions either at runtime or
compile time.  What about removing the limitation and creating a
boolean variable for x64cpu_detected or something and the developers
worry about misuse.  Is this at all possible?



More information about the fpc-devel mailing list