Class US


  • public class US
    extends US
    This class allows for accessing absolute memory locations and machine registers on a ARM processor. Warning: The inherent safety of Java is avoided. Use these methods with special care and only in low-level drivers! The methods of this class will be translated by inserting machine code instructions directly in the code without a method call.
    • Constructor Summary

      Constructors 
      Constructor Description
      US()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void ENABLE_FLOATS()
      Saves FPSCR and all temporary FPRs (Floating Point Registers) and sets the FP flag in MSR (usingGPR0).
      static int GETCPR​(int coproc, int CRn, int opc1, int CRm, int opc2)
      Read content of coprocessor register
      static double GETEXTRD​(int reg)
      Read content of extension double precision register (SIMD and VFP)
      static float GETEXTRS​(int reg)
      Read content of extension single precision register (SIMD and VFP)
      static int GETGPR​(int reg)
      Read content of general purpose register
      static void HALT​(int haltNr)
      Halt exception: program termination, 20 <= haltNr < 256
      static void PUTCPR​(int coproc, int CRn, int opc1, int CRm, int opc2, int value)
      Write to special purpose register
      static void PUTEXTRD​(int reg, double value)
      Write to extension double precision register (SIMD and VFP)
      static void PUTEXTRS​(int reg, float value)
      Write to extension single precision register (SIMD and VFP)
      static void PUTGPR​(int reg, int value)
      Write to general purpose register
    • Constructor Detail

      • US

        public US()
    • Method Detail

      • GETGPR

        public static int GETGPR​(int reg)
        Read content of general purpose register
        Parameters:
        reg - Register number.
        Returns:
        Register content.
      • GETEXTRD

        public static double GETEXTRD​(int reg)
        Read content of extension double precision register (SIMD and VFP)
        Parameters:
        reg - Register number.
        Returns:
        Register content.
      • GETEXTRS

        public static float GETEXTRS​(int reg)
        Read content of extension single precision register (SIMD and VFP)
        Parameters:
        reg - Register number.
        Returns:
        Register content.
      • GETCPR

        public static int GETCPR​(int coproc,
                                 int CRn,
                                 int opc1,
                                 int CRm,
                                 int opc2)
        Read content of coprocessor register
        Parameters:
        coproc - Coprocessor number.
        CRn - CRn field.
        opc1 - opc1 field.
        CRm - CRm field.
        opc2 - opc2 field.
        Returns:
        Register content.
      • PUTGPR

        public static void PUTGPR​(int reg,
                                  int value)
        Write to general purpose register
        Parameters:
        reg - Register number.
        value - Register content.
      • PUTEXTRD

        public static void PUTEXTRD​(int reg,
                                    double value)
        Write to extension double precision register (SIMD and VFP)
        Parameters:
        reg - Register number.
        value - Register content.
      • PUTEXTRS

        public static void PUTEXTRS​(int reg,
                                    float value)
        Write to extension single precision register (SIMD and VFP)
        Parameters:
        reg - Register number.
        value - Register content.
      • PUTCPR

        public static void PUTCPR​(int coproc,
                                  int CRn,
                                  int opc1,
                                  int CRm,
                                  int opc2,
                                  int value)
        Write to special purpose register
        Parameters:
        coproc - Coprocessor number.
        CRn - CRn field.
        opc1 - opc1 field.
        CRm - CRm field.
        opc2 - opc2 field.
        value - Register content.
      • HALT

        public static void HALT​(int haltNr)
        Halt exception: program termination, 20 <= haltNr < 256
        Parameters:
        haltNr - User definable halt number.
      • ENABLE_FLOATS

        public static void ENABLE_FLOATS()
        Saves FPSCR and all temporary FPRs (Floating Point Registers) and sets the FP flag in MSR (usingGPR0). This method must be called before any other statement in a method.