1. 08 Feb, 2015 1 commit
    • Jeffrey Lee's avatar
      Add support for Cortex-A7 & Cortex-A15 FPUs. Add short vector mode emulation for Cortex-A7, A9, A15 · febc8da4
      Jeffrey Lee authored
      Detail:
        Makefile - Simplify decision about whether to include support code. More hardware needs it than not, so have a list of machine types which don't need it rather than a list of machine types which do.
        hdr/VFPSupport - Add definitions for new VFPSupport_Features reason code
        hdr/shared - Add some comments for extra clarity
        s/Instructions - Add support for emulating VFPv3 'VMOV immediate' instruction
        s/Module - Update hardware detection & support handlers to deal with Cortex-A7, Cortex-A9 and Cortex-A15, all of which report different subarchitectures and differ in method of reporting exceptions despite the fact they basically all have the same requirements as far as support code is concerned (support code only required if we want short vector emulation). Implement the new VFPSupport_Features reason code, which returns information about whether short vectors are supported.
        s/SupportCode - Extend support code to cope with Cortex-A7, A9, A15 & VMOV imm emulation.
        Test/features,ffb - Simple test of VFPSupport_Features SWI
        Test/test7,ffb - Test for VFPv3 'VMOV immediate' handling in scalar & vector mode (HW scalar implementation tested against SW vector implementation)
      Admin:
        Tested on ARM1176JZF-S, Cortex-A7, Cortex-A8, Cortex-A9
        Cortex-A15 supported tested 'in theory' by forcing appropriate support code to be installed on Cortex-A9
      
      
      Version 0.10. Tagged as 'VFPSupport-0_10'
      febc8da4
  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