On 12/12/2023 17:48, Anthony Walter via fpc-pascal wrote:
Do any of the compiler devs know if Pascal programs for the x86 instruction set are using ENTER and its second argument to the best possible effect? I am curious.

FPC used it in the past, but stopped using it because
1) on modern processors the expanded sequence is much faster than the single enter instruction 2) enter is limited to allocating stack frames of 32kb or 64kb (so we had to support non-enter-based entry code anyway) 3) IIRC the Linux kernel doesn't support the enter instruction (if it requires a new page to be allocated for the stack, I believe it can crash the program)

TP did use it.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to