- 08 Feb, 2014 1 commit
-
-
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'
-
- 20 Mar, 2012 1 commit
-
-
Jeffrey Lee authored
Detail: Resources/UK/Messages, s/Errors, hdr/VFPSupport - Errors now declared in public header. New/updated error messages and symbols. s/GetAll - Changed GET order to work with errors in header file s/Module - Disallow instantiation. Manually issue Service_ModulePostFinal during finalisation, to give clients slightly more warning than the kernel does. Admin: Tested in OMAP3 ROM Version 0.03. Tagged as 'VFPSupport-0_03'
-
- 25 Nov, 2010 1 commit
-
-
Jeffrey Lee authored
Detail: Initial VFP/NEON support code for RISC OS. Features: * Basic detection code for determining VFP version. Should work OK on all architecture versions. * Provides code to perform VFP/NEON context switches * Context switches can be lazy or immediate * Context register dumps can be stored in user-allocated memory or memory allocated by VFPSupport * Basic APIs for examining contexts and reporting available hardware features * "FastAPI" that privileged code can use for context switching in order to avoid SWI call overheads Missing/unfinished features: * No VFP exception handler is present, so the module will refuse to run on anything but a VFPv3 system * Lazy context switching is simplistic, opting to activate the new context upon the first undefined instruction abort instead of checking to see if it was a VFP instruction that triggered the abort * No interface to allow debuggers to easily get their hands on a register dump following a crash * No code to automatically clean up contexts left behind by dying programs * Can't be used by FIQ handlers, or from code called by an FIQ handler * Currently uses an error base of 0! Other notes: * Doc/vfpversions contains some random notes about the different VFP/NEON versions * Test/test1,ffb is a BASIC program that tests most of the module's functionality Admin: Tested on Iyonix & Beagleboard. Iyonix version exits correctly, while Beagleboard version passes all tests in the test1 script. Need to sort out proper error numbers, and translate the error messages. Version 0.01. Not tagged
-