/* CPU */

/* THESE FUNCTIONS ADDED FOR THE DeskLib 2.30 [RM/32] RELEASE.
   THEY ARE NOT PRESENT IN THE ORIGINAL v2.30 VERSION OF DESKLIB. */

extern int CPU_Mode(void);
/* This returns the 'mode' of the processor, which is:
     '26' for PC+PSR (old style operation)
   or:
     '32' for PC/CPSR (new style operation).
*/

extern int CPU_ID(void);
/* This returns the CPU ID, as follows:
     ARM 1    &10  [theoretical - first RISC OS machine used an ARM 2]
     ARM 2    &20
     ARM 250  &25  ["mezzanine board" may report something different]
     ARM 3    &30
     Anything later will return the CPUID as specified in the processor
     documentation.
*/

extern char *CPU_Type(void);
/* This tries to return the CPU type as a string, more accurately than
   CPU_ID (above).

   Possible returned strings: "ARM1"
                              "ARM2"
                              "ARM250"
                              "ARM3"
                              "ARM600"
                              "ARM610"
                              "ARM620"
                              "ARM700"
                              "ARM710"
                              "ARM710a"
                              "ARM710T"
                              "ARM720T"
                              "ARM740T"
                              "ARM7500"
                              "ARM7500FE"
                              "ARM800"
                              "ARM810"
                              "ARM920T"
                              "ARM940T"
                              "ARM966E-S"
                              "SA110-K"
                              "SA110-S"
                              "SA110-T"
                              "SA1100-B"
                              "SA1100-C"
                              "SA1100-D"
                              "SA1100-E"
                              "80200"
                              "Unknown ARM (ID &xxxxxxxx)"
*/

extern char *CPU_Class(void);
/* As a side-effect of the CPU_Type() function, you can also enquire the
   processor class, or it's "architecture version". The possible strings
   returned are:

     "1"     ARM1; not used in a commercial machine.

     "2"     ARM2; added "MUL" and "MLA" to class 1, as well as more
             banked registers to FIQ mode; and co-processor support.

     "2a"    ARM250, 3
             Adds "SWP" and "SWPB", as well as CP15 for processor setup,
             and an on-board cache - though the ARM250 core is apparently
             an ARM3 with no CP15 and no cache...

     "3"     ARM600, 610, 620, 700, 710, 710a, 7500, 7500FE
             Extends addressing range to full 32bit by splitting PC+PSR
             into seperate parts. More instructions, more processor modes.

     "4"     SA110-x, ???
             This extends "3" with halfword load/store, support for sign-
             extended values, another processor mode...

     "4T"    ARM710T, 720T, 740T
             No 26bit support; implements Thumb instead.

     "5"     ???
     "5T"    ???
     "5TE"   ???

  Not detected:
     "3G"    Version of "3" without 26bit (PC+PSR) support.
     "3M"    Version of "3" with long multiply.
     "4xM"   Version of "4" without long multiply.
     "4TxM"  Version of "4T" without long multiply.
     "5xM"   Version of "5" without long multiply.
     "5TxM"  Version to "5T" without long multiply.

  YOU MUST CALL CPU_Type()" BEFORE USING THIS FUNCTION!!!
*/


extern void CPU_DumpRegistersToFile(void);
/* Saves all registers to "<Wimp$ScrapDir>.regsxx", where 'xx' is a hex
   number (starting at "00"). Preserves all (current mode - should be USR
   or USR32) registers except R14 and PC.
*/
