Recent

Author Topic: rtl/inc/int64.inc file usage  (Read 1654 times)

lagprogramming

  • Full Member
  • ***
  • Posts: 159
rtl/inc/int64.inc file usage
« on: September 14, 2015, 09:16:30 am »
   Is rtl/inc/int64.inc file used when dealing with int64 operations on a 32bit CPU? Something like the software float operations on CPUs that don't support it.
   Is there any reason to use rtl/inc/int64.inc file on a 64bit CPU?
   Are there CPU manufacturers that still sell CPU's that require this file in FPC?

   In the context of having floating point variable operations that can be done also in software mode, the questions are asked because I don't know when are routines like the following ones used:
Code: [Select]
function fpc_div_qword(n,z : qword) : qword; compilerproc;
function fpc_mod_qword(n,z : qword) : qword; compilerproc;
function fpc_div_int64(n,z : int64) : int64; compilerproc;
function fpc_mod_int64(n,z : int64) : int64; compilerproc;
function fpc_mul_qword(f1,f2 : qword;checkoverflow : longbool) : qword; compilerproc;
function fpc_mul_int64(f1,f2 : int64;checkoverflow : longbool) : int64; compilerproc;
function fpc_mul_dword_to_qword(f1,f2 : dword) : qword; compilerproc;
function fpc_mul_longint_to_int64(f1,f2 : longint) : int64; compilerproc;

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 659
Re: rtl/inc/int64.inc file usage
« Reply #1 on: September 14, 2015, 09:21:03 am »
That file is used for some 32 bit architectures, and on all 16bit (e.g. 8086) and 8 bit (e.g. AVR) cpus. Not all routines are used on all architectures, it depends on the capabilities of the architecture.