Commit Graph

73 Commits

Author SHA1 Message Date
Michael VAN CANNEYT
ccfa38c68e * Dotted RTL compiles 2023-07-27 19:04:03 +02:00
svenbarth
52cf07d968 * the define to check for inclusion in the System unit is FPC_IS_SYSTEM, *not* FPC_IN_SYSTEM
git-svn-id: trunk@47197 -
2020-10-25 15:20:39 +00:00
svenbarth
b0f0ff1bc6 * fix for Mantis #37986: apply patch by Bart Broersma to fix a typo in a comment
git-svn-id: trunk@47196 -
2020-10-25 13:20:38 +00:00
svenbarth
d51213d26a * adjust softfpu unit so that it can be really used as a standalone unit instead of mainly as part of the System unit
git-svn-id: trunk@47193 -
2020-10-25 10:18:18 +00:00
pierre
1e8aa99f81 * Disable range and overflow checking inside softfpu implementation
git-svn-id: trunk@46682 -
2020-08-25 06:34:29 +00:00
pierre
adf064cbb4 New: rtl/inc/genmathh.inc source file, to provide a unique position
for the interface definition of float64 and float32 records,
  available to all systems if FPUNONE is not defined.

  rtl/inc/genmath.inc: Remove float64/float32, as they are now in rtl/inc/genmathh.inc
  rtl/inc/softfpu.pp: Use provided definitions of float32 and float64
  if available (by checking presence of FPC_SYSTEM_HAS_floatXX macro)

  rtl/inc/systemh.inc: include genmathh.inc if FPUNONE is not defined.
  rtl/java/jsystemh_types.inc: Likewise.

git-svn-id: trunk@45821 -
2020-07-21 14:24:14 +00:00
pierre
7020490f81 Put floating point type as first variant of floatXX definitions, to ensure correct alignment
git-svn-id: trunk@45780 -
2020-07-13 14:13:13 +00:00
pierre
61d16e1063 Allow compilation of softfpu unit with 128-bit upport on big endian code (code generated might be wrong)
git-svn-id: trunk@37257 -
2017-09-19 20:59:16 +00:00
Károly Balogh
a57d0d51b4 softfpu: make it possible to optionally inline some of the simple functions. also made it possible to replace the MUL32TO64 function with compiler generated code. If the new defines are enabled, they results in 15-30% speedup on m68k (68020+) softfpu code
git-svn-id: trunk@36352 -
2017-05-27 22:12:27 +00:00
florian
8c5fdc9dc2 * softfpu patch by Max Nazhalov: Small fixes to softfpu.pp complementing r27215
git-svn-id: trunk@33923 -
2016-06-05 21:16:01 +00:00
Károly Balogh
8d98f31afc two cases of use casts instead of anding with when extracting 16bit values
git-svn-id: trunk@28615 -
2014-09-07 23:38:33 +00:00
sergei
5279693919 * softfpu.pp: fixed two more porting bugs, and also added two typecasts to avoid unnecessary 64-bit operations.
git-svn-id: trunk@28609 -
2014-09-06 21:01:50 +00:00
sergei
ee8fcc8bdb * softfpu.pp: reverted r28318 and replaced it with a improved solution:
* Moved handling of 64-bit values > high(int64) to qword_to_float64, so that normalizeRoundAndPackFloat64 procedure stays unmodified compared to C source.
  * Using "jamming" right shift instead of regular one, so the least significant bit is not dropped but participates in rounding.
  * Take a shortcut for values with <= 53 significant bits, which are convertible into float64 exactly and do not need rounding.

git-svn-id: trunk@28346 -
2014-08-08 20:47:52 +00:00
Károly Balogh
3c8b24eead a proposed fix to the qword_to_float64 problem
git-svn-id: trunk@28318 -
2014-08-06 15:14:52 +00:00
Károly Balogh
baac5114a7 added a missing comment from the SoftFPU C source. probably explains why qword_to_float64 fails with values which have the uppermost bit set
git-svn-id: trunk@28316 -
2014-08-06 14:11:09 +00:00
sergei
0dea20d8e7 * softfloat: Fixed int64->double and qword->double conversions to take rounding mode into account (actually, brought them up to date with Softfloat-2b C source). Now test/units/math/troundm.pp is consistent for all targets.
git-svn-id: trunk@28312 -
2014-08-04 21:56:40 +00:00
sergei
bf51683e78 * Softfloat: added some typecasts to prevent promotion to 64 bits where it is not intended.
git-svn-id: trunk@28308 -
2014-08-03 12:14:43 +00:00
sergei
96abd7f370 * Softfloat: marked ExtractFloat32*, ExtractFloat64* and PackFloat32 helpers as inline.
* int64_to_float64 and qword_to_float64: call 'function' overload of PackFloat64. Whenever arguments are constant it can be evaluated entirely at compile time (the procedure PackFloat64 does not have this property even if marked as inline because it is too complex, i.e. consists of more than single statement).

git-svn-id: trunk@28307 -
2014-08-03 12:00:38 +00:00
sergei
cf2b4a4dbd * softfpu cleanup: use Pascal boolean types where appropriate, use 64-bit overload of shift64RightJamming() to simplify things.
git-svn-id: trunk@28280 -
2014-07-30 23:39:10 +00:00
sergei
22e099d000 * sqrt(real): for targets with emulated floating point, invoke float64_sqrt or float32_sqrt from softfpu code. Testing on ARM CPU shows that float64_sqrt executes about twice faster and offers better accuracy than fpc_sqrt_real from genmath.inc.
* softfpu.pp: changed float64_sqrt into a function, so it is consistent with other compiler-invoked routines.

git-svn-id: trunk@27809 -
2014-05-21 15:07:13 +00:00
sergei
eb984a5adb * Replaced last remaining C tokens.
git-svn-id: trunk@27365 -
2014-03-30 05:03:55 +00:00
sergei
20cc82dfea * Two more "&& vs &" porting bugs fixed.
git-svn-id: trunk@27364 -
2014-03-30 04:37:52 +00:00
sergei
5c1f404631 * softfpu.pp: clean up.
git-svn-id: trunk@27283 -
2014-03-25 14:45:41 +00:00
sergei
94a045aa3d * Moved declarations of TFPURoundingMode,TFPUExceptionMask and TFPUPrecisionMode to System unit. Declarations in Math unit changed to aliases.
* Changed type of softfloat_exception_mask and softfloat_exception_flags to TFPUExceptionMask, softfloat_rounding_mode to TFPURoundingMode.
- Cleaned out numerous conversions happening when getting/setting exception mask and rounding mode.

git-svn-id: trunk@27215 -
2014-03-20 22:44:46 +00:00
sergei
825900671b * Typo in r27184.
git-svn-id: trunk@27196 -
2014-03-20 04:27:51 +00:00
sergei
fcfed19c84 * Fixed one of the C porting bugs (wonder how many are still left...)
git-svn-id: trunk@27184 -
2014-03-19 15:32:29 +00:00
sergei
13da05a778 * Factored direct access to softfloat_exception_flags into a helper procedure.
git-svn-id: trunk@27179 -
2014-03-18 16:36:47 +00:00
masta
dad4079e0c Fix shift128Right in rtl/inc/softfpu.pp
The old code would always return 0 if the shiftamount was more than 63.

git-svn-id: trunk@25291 -
2013-08-18 21:12:53 +00:00
florian
162cb30528 * another patch by Max Nazhalov to fix shifting and rounding of float128
git-svn-id: trunk@25031 -
2013-07-02 21:03:39 +00:00
florian
a0292b8962 * patch by Max Nazhalov to fix more conversion issues of the C code translation, resolves #24691
git-svn-id: trunk@25022 -
2013-06-30 18:07:40 +00:00
florian
caef53e63b * another patch by Max Nazhalov to fix missing exits in the softfpu code
git-svn-id: trunk@24891 -
2013-06-13 19:40:17 +00:00
florian
7f6aa98553 * restored changes made in r24864 which I accidently overwrote with r24871
git-svn-id: trunk@24890 -
2013-06-13 18:38:35 +00:00
florian
980563d576 * several small errors fixed, float128<->float64 conversion works now
git-svn-id: trunk@24872 -
2013-06-11 21:00:26 +00:00
florian
92477a14b8 o patch by Max Nazholov:
* more C code ported
 * missing exits fixed
 * var-modifier of shortShift128Left fixed
 * some range warnings fixed

git-svn-id: trunk@24871 -
2013-06-11 21:00:23 +00:00
pierre
aae318403d Fix a int64<->single conversion failure exposed in test/units/softfpu/sfttst.pp
git-svn-id: trunk@24864 -
2013-06-10 13:51:02 +00:00
florian
f0487f8fde * remove packed used for nan records in the softfpu code, it served no purpose
* recordered files of nan records in the softfpu code

git-svn-id: trunk@23300 -
2013-01-02 18:13:21 +00:00
florian
b01e6e1671 * remove duplicate types after r20603, resolves #21548
git-svn-id: trunk@20620 -
2012-03-25 09:34:28 +00:00
pierre
702db31dc6 Fix syntax error in record
git-svn-id: trunk@20407 -
2012-02-22 23:24:34 +00:00
florian
f0f64a573b * don't pack softfpu helper records and added dummy for proper alignment, generates much better code on CPUs like arm
git-svn-id: trunk@20398 -
2012-02-22 20:13:38 +00:00
pierre
f4a9b3d73b + Allow compilation as an external unit
git-svn-id: trunk@20203 -
2012-01-31 15:57:45 +00:00
florian
41636711e4 * fix to align float64 correctly
git-svn-id: trunk@19791 -
2011-12-09 21:34:09 +00:00
pierre
144d4c41f2 * Define FPC_SYSTEM_HAS_FLOAT32/64 in softfpu unit
git-svn-id: trunk@17701 -
2011-06-09 08:21:07 +00:00
tom_at_work
28e5db2df8 + Add qword_to_float32/64 functions and fixed int64_to_float64 function
git-svn-id: trunk@17623 -
2011-06-01 13:19:18 +00:00
pierre
cee190b1f8 * shift128right last parameter should also by var type
git-svn-id: trunk@14993 -
2010-03-08 08:00:56 +00:00
florian
2a5c3a3c14 * fixed copy&paste typo
git-svn-id: trunk@11228 -
2008-06-14 13:07:17 +00:00
florian
4ac1deb50b * moved float_rounding_mode to systemh.inc; renamed to softfloat_rounding_mode
git-svn-id: trunk@11219 -
2008-06-12 20:23:37 +00:00
peter
911f926274 * disabled float128
git-svn-id: trunk@9129 -
2007-11-04 14:41:51 +00:00
florian
e3085015f7 * continued to work on float128 stuff
git-svn-id: trunk@9117 -
2007-11-03 21:41:54 +00:00
florian
3afb948ca4 + start of a float128 unit, was still lying around, so it won't get lost
git-svn-id: trunk@9031 -
2007-11-01 10:48:57 +00:00
florian
370f05c516 * soft float128 code compiles in theory (ies the compiler)
git-svn-id: trunk@8919 -
2007-10-23 20:23:13 +00:00