Commit Graph

34 Commits

Author SHA1 Message Date
Jonas Maebe
0758aa1143 FPU exception mask: generlised system unit interface 2022-10-17 19:43:01 +00:00
pierre
38ddf2e8c5 Fix spelling error of revision 48023
git-svn-id: trunk@48024 -
2021-01-04 08:35:36 +00:00
pierre
3362abb30c * Set softfloat_rounding_mode indise SetRoundMode function for all CPUs.
* SetRoundMode returns previous rounding mode value for all CPUs.

git-svn-id: trunk@48018 -
2021-01-03 21:44:18 +00:00
florian
c189af0e3d * improved software floating point exception handling in the rtl
git-svn-id: trunk@43163 -
2019-10-10 20:31:31 +00:00
florian
c418d63c16 + create defines with FPU capabilites
+ make use of FPU capability defines in the rtl

git-svn-id: trunk@42681 -
2019-08-13 22:12:49 +00:00
florian
1c067e96bf * fix VFPv4 support
git-svn-id: trunk@33182 -
2016-03-06 13:33:16 +00:00
yury
e1a0b1204a * Removed unused vars in RTL.
git-svn-id: trunk@31750 -
2015-09-17 16:48:53 +00:00
Jeppe Johansen
44ad5af04d Fix some minor UMULL, and FPv4_S16 define problems
git-svn-id: trunk@31560 -
2015-09-06 20:14:16 +00:00
Jeppe Johansen
9478099e5a Undo recent VFP assembler changes to make bootstrapping from 3.0.1 possible.
git-svn-id: trunk@30183 -
2015-03-14 10:04:17 +00:00
Jeppe Johansen
9e5979e8be Implemented UAL syntax support in the ARM assembler reader. Can be toggled with a field for now, but not implemented yet. Still using pre-UAL syntax for now.
Switched codegeneration of VFPv2 and VFPv3 to use UAL mnemonics and syntax.
Updated VFP code in RTL to use UAL syntax too.
Added preliminary ELF support for ARM.
Added support for linking of WinCE COFF files. Should work for with a standard ARMv4-I target.

git-svn-id: branches/laksen/armiw@29247 -
2014-12-10 20:44:34 +00:00
sergei
67a8c315d8 * ARM: SetExceptionMask and SetRoundingMode must return the old value of mask/mode respectively, not the new one.
git-svn-id: trunk@27217 -
2014-03-21 06:03:00 +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
7b56c90d82 - MIPS,SPARC and ARM-wince: removed remaining references to softfloat stuff.
git-svn-id: trunk@27204 -
2014-03-20 17:46:01 +00:00
masta
f354651180 Fix ARM FPU Exceptions for WinCE
r21952 introduced wrong code (through copy&waste) for the wince
exception-setup routines.

This patch hopefully fixes the code again.

git-svn-id: trunk@21961 -
2012-07-23 22:58:02 +00:00
masta
386738a7c3 Fix ARM FPU exception masks
This corrects the handling of exception masks and ARM VFP
implementations. The old code enable the exception when it was present
in the mask. So in fact it did the contrary of what it was supposed to
do.

VFP-Support is currently broken, this patch at least allows to build a
working VFP-native compiler. But the full build still breaks because of
some compiler options not properly beeing passed down to packages/ which
results in:

"Trying to use a unit which was compiled with a different FPU mode"

because somehow OPT="-Cfvfpv2" did not get passed down.

git-svn-id: trunk@21952 -
2012-07-23 07:26:57 +00:00
Jonas Maebe
6ba8dc7146 + support for the ARM hard float EABI on Linux (patch by Peter Green):
o new eabihf (hard float) abi
   o vfpv3_d16 variant of VFP (default variant used by EABI assemblers: VFPv3
     with only 16 double registers instead of 32) and pass it to GNU as
   o make the odd numbered single precision floating point VFP registers
     available for explicit allocation for use by the calling convention
  * fixed copy/paste error in stdname of S30 register
  -> use -dFPC_ARMHF to create an ARM eabi hard float compiler
  (mantis #21554)

git-svn-id: trunk@20660 -
2012-03-29 20:50:09 +00:00
Jonas Maebe
fbebd87593 * use BLX instead of "mov r14, r15; mov r15, reg" for a_call_reg on ARMv6
and above, so this also works when calling thumb code (should actually
    also be done for ARMv5T, but we don't have a monicker for that yet)
  * use BX instead of "mov r15, r14" for simple returns from subroutines
    on ARMv6+ to support returning to thumb code from ARM code (idem)

git-svn-id: trunk@14332 -
2009-12-04 22:38:50 +00:00
Jonas Maebe
91fc26a530 * the bits in the VFP fpscr don't mask exceptions, but enable them
(was used correctly in fpu init code in arm.inc, but inverted in
     setexcetionmask logic)

git-svn-id: trunk@14328 -
2009-12-04 19:54:35 +00:00
Jonas Maebe
d1538ab023 o added ARM VPFv2/VFPv3 support:
+ RTL support:
      o VFP exceptions are disabled by default on Darwin,
        because they cause kernel panics on iPhoneOS 2.2.1 at least
      o all denormals are truncated to 0 on Darwin, because disabling
        that also causes kernel panics on iPhoneOS 2.2.1 (probably
        because otherwise denormals can also cause exceptions)
    * set softfloat rounding mode correctly for non-wince/darwin/vfp
      targets
    + compiler support: only half the number of single precision
      registers is available due to limitations of the register
      allocator
    + added a number of comments about why the stackframe on ARM is
      set up the way it is by the compiler
    + added regtype and subregtype info to regsets, because they're
      also used for VFP registers (+ support in assembler reader)
    + various generic support routines for dealing with floating point
      values located in integer registers that have to be transferred to
      mm registers (needed for VFP)
    * renamed use_sse() to use_vectorfpu() and also use it for
      ARM/vfp support
    o only superficially tested for Linux (compiler compiled with -Cpvfpv6
      -Cfvfpv2 works on a Cortex-A8, no testsuite run performed -- at least
      the fpu exception handler still needs to be implemented), Darwin has
      been tested more thoroughly
  + added ARMv6 cpu type and made it default for Darwin/ARM
  + ARMv6+ implementations of atomic operations using ldrex/strex
  * don't use r9 on Darwin/ARM, as it's reserved under certain
    circumstances (don't know yet which ones)
  * changed C-test object files for ARM/Darwin to ARMv6 versions
  * check in assembler reader that regsets are not empty, because
    instructions with a regset operand have undefined behaviour in that
    case
  * fixed resultdef of tarmtypeconvnode.first_int_to_real in case of
    int64->single type conversion
  * fixed constant pool locations in case 64 bit constants are generated,
    and/or when vfp instructions with limited reach are present

  WARNING: when using VFP on an ARMv6 or later cpu, you *must* compile all
    code with -Cparmv6 (or higher), or you will get crashes. The reason is
    that storing/restoring multiple VFP registers must happen using
    different instructions on pre/post-ARMv6.

git-svn-id: trunk@14317 -
2009-12-03 22:46:30 +00:00
Jonas Maebe
30a51c2dee + support for the different rounding modes in the generic rounding
routines (mantis #11392)

git-svn-id: trunk@11290 -
2008-06-27 17:20:56 +00:00
Jonas Maebe
7d44ca0113 * fixed unportable soft float mask handling which broke on big endian
systems after yesterday's set changes

git-svn-id: trunk@7402 -
2007-05-20 10:25:48 +00:00
florian
d78071f8b2 * ensure that softfloat and libgcc float never use rfs/wfs
git-svn-id: trunk@7229 -
2007-05-01 11:47:19 +00:00
florian
1ab81c7eb6 * fixed fpa flag setting
git-svn-id: trunk@6154 -
2007-01-23 22:11:54 +00:00
florian
83a0391c24 * gba and nds have no softfloat support
git-svn-id: trunk@6090 -
2007-01-20 20:41:04 +00:00
yury
458abdef3e * implemented SysResetFPU for arm-wince.
* set softfloat_exception_mask in SetExceptionMask for ARM.

git-svn-id: trunk@6035 -
2007-01-17 23:58:19 +00:00
florian
075011a2a5 * fpa exception masking fixed
git-svn-id: trunk@6026 -
2007-01-17 15:52:36 +00:00
yury
68a71f4ca3 * fixed SetPrecisionMode/GetPrecisionMode for wince.
git-svn-id: trunk@5673 -
2006-12-22 00:49:17 +00:00
yury
e1b9814b5d * fixed some warnings and notes while compiling RTL.
git-svn-id: trunk@4256 -
2006-07-19 10:31:15 +00:00
yury
a083f5754e * implemented exceptions, rounding, precision control for arm-wince math.
git-svn-id: trunk@4104 -
2006-07-06 18:56:36 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
7b5dc40284 * compilation on arm fixed 2004-01-26 11:48:24 +00:00