1. 03 May, 2021 1 commit
    • Robert Sprowson's avatar
      Update SoftFloat library to 2c · 2f1e4f6c
      Robert Sprowson authored
      Library release from 2015 is almost identical to 2b, except
      * Lots and lots of comments improved, legalese wording changed
      * Fix for 128 bit shift in softfloat-macros
      * A few 32->32 and 64->64 casts which do nothing on ARM
      
      Version 0.14. Tagged as 'VFPSupport-0_14'
      2f1e4f6c
  2. 08 Feb, 2014 1 commit
    • Jeffrey Lee's avatar
      Add VFPv2 support code · a5596610
      Jeffrey Lee authored
      Detail:
        This update adds the support code necessary to allow the VFPv2 coprocessor in the Raspberry Pi to be used in its full IEEE-compliant mode, and to add support for the generation of errors on VFP match exceptions (division by zero, etc.)
        SoftFloat Release 2b (http://www.jhauser.us/arithmetic/SoftFloat.html) is used to perform the floating point calculations in software, ensuring their accuracy.
        As with FPEmulator, the support code will only be included on machines which require it; at the moment this decision is handled by the makefile, based around the target machine type.
        Note that the current version of the support code does not implement default NaN or flush-to-zero mode, so it is not a fully accurate emulation of the hardware.
        Also added a new SWI, VFPSupport_ExceptionDump, for creating and reading a VFP context exception dump, and a new reason code to VFPSupport_Features to query which exception enable bits are supported
        File changes:
        - Makefile - Rewritten to use the CModule fragment, and to add the necessary rules for (optionally) building the support code.
        - Licences - File summarising the different licences used by different portions of the code
        - Test/test2c,ffb, Test/test3,ffb, Test/test4,ffb, Test/test5,ffb, Test/test6src,ffb - Several test programs for validating behaviour of the support code, mainly focused around unusual causes of exceptions and validating instruction decoding and short vector support
        - actions/ARMv7_VFP, arctions/common, c/head, cache/classify - decgen files for building the instruction decoder. This decoder is only used for synchronous exceptions, to determine whether the instruction is or isn't a valid VFP instruction. Asynchronous exceptions utilise a simpler, hand-crafted decoder in the assembler sources.
        - h/classify - Header for the decgen decoder
        - hdr/shared - Header with some definitions shared between the C and assembler sources (will be Hdr2H'd to generate the C header)
        - hdr/VFPSupport - Updated with new error numbers, SWI definitions
        - s/CSupport - Math support functions from the C library sources, required by SoftFloat
        - s/Errors - Added new error definitions
        - s/GetAll - Include support code if necessary. Add debug switch, plus optimisation switch for machines with 16 D registers
        - s/Instructions - Core data processing instruction emulation code. This file is included twice, once for single precision and once for double precision. The code calls through to the SoftFloat routines to perform the calculations.
        - s/Module - Adjust handling of undefined instruction vector to allow the support code to be installed instead of OldHandler if necessary. Initialise the support code as necessary. Add new SWIs & reason codes.
        - s/SupportCode - Undefined instruction handler which controls the rest of the support code. Also raises RISC OS errors as necessary (division by zero, etc.)
        - softfloat/* - The SoftFloat library sources. It's been tweaked in a few places for integration with the assembler support code, but otherwise no changes to the core logic were necessary.
        - Resources/UK/Messages - Updated with new error text
      Admin:
        Tested on Raspberry Pi & BB-xM
        Support code tested using the supplied test routines and the TestFloat tool (http://www.jhauser.us/arithmetic/TestFloat.html)
      
      
      Version 0.06. Tagged as 'VFPSupport-0_06'
      a5596610