Commit dbed9538 authored by Ben Avison's avatar Ben Avison
Browse files

Support ARMv8 (and potentially some ARMv7) cores.

Detail:
  Replace conditionally executed undefined instructions with branches over
  on opposite condition.
Admin:
  Tested on Raspberry Pi 3.

Version 0.11. Tagged as 'VFPSupport-0_11'
parent febc8da4
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.10"
Module_Version SETA 10
Module_MajorVersion SETS "0.11"
Module_Version SETA 11
Module_MinorVersion SETS ""
Module_Date SETS "08 Feb 2015"
Module_ApplicationDate SETS "08-Feb-15"
Module_Date SETS "29 Feb 2016"
Module_ApplicationDate SETS "29-Feb-16"
Module_ComponentName SETS "VFPSupport"
Module_ComponentPath SETS "mixed/RiscOS/Sources/HWSupport/VFPSupport"
Module_FullVersion SETS "0.10"
Module_HelpVersion SETS "0.10 (08 Feb 2015)"
Module_FullVersion SETS "0.11"
Module_HelpVersion SETS "0.11 (29 Feb 2016)"
END
/* (0.10)
/* (0.11)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.10
#define Module_MajorVersion_CMHG 0.11
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 08 Feb 2015
#define Module_Date_CMHG 29 Feb 2016
#define Module_MajorVersion "0.10"
#define Module_Version 10
#define Module_MajorVersion "0.11"
#define Module_Version 11
#define Module_MinorVersion ""
#define Module_Date "08 Feb 2015"
#define Module_Date "29 Feb 2016"
#define Module_ApplicationDate "08-Feb-15"
#define Module_ApplicationDate "29-Feb-16"
#define Module_ComponentName "VFPSupport"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/VFPSupport"
#define Module_FullVersion "0.10"
#define Module_HelpVersion "0.10 (08 Feb 2015)"
#define Module_LibraryVersionInfo "0:10"
#define Module_FullVersion "0.11"
#define Module_HelpVersion "0.11 (29 Feb 2016)"
#define Module_LibraryVersionInfo "0:11"
......@@ -258,9 +258,10 @@ CheckHardware
MRC p15,0,r3,c1,c0,2 ; read it back to get status
AND r4, r3, #&F<<20
CMP r4, #&F<<20
MCRNE p15,0,r2,c1,c0,2 ; restore original CPACR
BNE NoVFP_v6v7
CMP r0, #&F
BEQ %FT05
MCR p15,0,r2,c1,c0,2 ; restore original CPACR
B NoVFP_v6v7
05 CMP r0, #&F
BNE %FT10
; Both ARMv6 and ARMv7 identify themselves with &F in the main ID register
; To work out which is which, it looks like the only (or easiest) way is to check the cache type register
......@@ -366,9 +367,10 @@ BadVFP
NoMVFR ; Currently we don't cope with situations where the MVFR registers are absent
; Restore CPACR if ARMv6+
CMP r0, #&7
MCRGE p15,0,r2,c1,c0,2
myISB GE,r0 ; Deal with pipelined CP15 ops on ARMv6+. TODO - ARMv5
; Restore interrupts
BLT %FT01
MCR p15,0,r2,c1,c0,2
myISB ,r0 ; Deal with pipelined CP15 ops on ARMv6+. TODO - ARMv5
01 ; Restore interrupts
MSR CPSR_c, R1
ADRL r0, ErrorBlock_VFPSupport_BadHW
B ReturnError_Stacked
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment