Package org.deepjava.unsafe.arm
Class US
- java.lang.Object
-
- org.deepjava.unsafe.US
-
- org.deepjava.unsafe.arm.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 voidENABLE_FLOATS()Saves FPSCR and all temporary FPRs (Floating Point Registers) and sets the FP flag in MSR (usingGPR0).static intGETCPR(int coproc, int CRn, int opc1, int CRm, int opc2)Read content of coprocessor registerstatic doubleGETEXTRD(int reg)Read content of extension double precision register (SIMD and VFP)static floatGETEXTRS(int reg)Read content of extension single precision register (SIMD and VFP)static intGETGPR(int reg)Read content of general purpose registerstatic voidHALT(int haltNr)Halt exception: program termination, 20 <= haltNr < 256static voidPUTCPR(int coproc, int CRn, int opc1, int CRm, int opc2, int value)Write to special purpose registerstatic voidPUTEXTRD(int reg, double value)Write to extension double precision register (SIMD and VFP)static voidPUTEXTRS(int reg, float value)Write to extension single precision register (SIMD and VFP)static voidPUTGPR(int reg, int value)Write to general purpose register
-
-
-
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.
-
-