Results 1 to 4 of 4

Thread: How to use processor extended instructions?

  1. #1

    How to use processor extended instructions?

    Mmx, sse, etc

  2. #2
    You might also wanna share which development environment are you using and which platforms are you targeting. Delphi and Lazarus are quite different from one another especially regarding the compilers they use. And based on the compiler ti might be easier or harder to write a code that would make use of mentioned extended CPU features. Heck Delphi even has different compilers for different platforms.

    Any way you should also bare in mind that it is possible that when you are using features that come with your development platform (included libraries) they might already be using some of CPU extended features if they are available. For instance when you compile 64 bit Windows application in Delphi many of included features already make use of SSE and SSE2 instruction sets.

  3. #3
    Delphi and Windows and 64bit.

    I'm not after anything specific at this point but made the post because I didn't really find any general online information about it.

  4. #4
    FPC - configure the target CPU (for general instruction extensions, like POPCNT) and FPU (for vector instruction set, like SSE). For example, on x86, you have to pass the option -Cfsse2 to the compiler to use SSE2 for fp calculations. On x64, SSE2 is default, but if you want to use something higher, like AVX, you'll have to pass the option -CfAVX. Just don't have any huge expectations about the performance boost; SSE2 on 32bit helps quite a lot, but that's about it, until FPC gets autovectorization.
    In addition, there are some standard library functions that use extensions if they are detected at program startup, like Move.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts