Maybe is expected that the 64 bit code is used by default in 64 bit builds?
Ideally, I would like to make the 64bit vs 32bit setting automatic, by having the code detect it. But I could not see a way of doing that. Suggestions are welcome here.
However, my understanding is that the compiler provides 64bit integers, even on a 32bit CPU, and I wanted to give the programmer the option to override that, and force 32bit integers internally. Some CPUs have differences in the way 32bit vs 64bit registers work, especially when they overflow and on bit shift operations.
When coding my library, I wanted to create a 64bit Pascal translation of Henry Warren's C implementation of Knuth's fast division algorithm, but could not get it to work.
One of the problems I encountered was that the behaviour of 64bit registers was different to 32bit registers when they overflowed. Henry Warren's C code was designed for 32bit registers, and the C code seems to allow registers to overflow, and then depends on that behaviour of the register. When I stepped through my Pascal translation, the register behaviour assumed by the Warrens's C code seemed different to the behaviour I was seeing. Another factor might have been the code that Free Pascal was generating might have had differences.
Because of these problems, I wanted to give the programmer using my library the option of forcing 32bit integers.