Package org.deepjava.unsafe.ppc
Class US
- java.lang.Object
-
- org.deepjava.unsafe.US
-
- org.deepjava.unsafe.ppc.US
-
public class US extends US
This class allows for accessing absolute memory locations and machine registers on a PowerPC 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 double
GETFPR(int reg)
Read content of floating point registerstatic int
GETGPR(int reg)
Read content of general purpose registerstatic int
GETSPR(int reg)
Read content of special purpose registerstatic void
HALT(int haltNr)
Halt exception: program termination, 20 <= haltNr < 256static void
PUTFPR(int reg, double value)
Write to floating point registerstatic void
PUTGPR(int reg, int value)
Write to general purpose registerstatic void
PUTSPR(int reg, int value)
Write to special purpose register
-
-
-
Method Detail
-
GETGPR
public static int GETGPR(int reg)
Read content of general purpose register- Parameters:
reg
- Register number.- Returns:
- Register content.
-
GETFPR
public static double GETFPR(int reg)
Read content of floating point register- Parameters:
reg
- Register number.- Returns:
- Register content.
-
GETSPR
public static int GETSPR(int reg)
Read content of special purpose register- Parameters:
reg
- Register number.- Returns:
- Register content.
-
PUTGPR
public static void PUTGPR(int reg, int value)
Write to general purpose register- Parameters:
reg
- Register number.value
- Register content.
-
PUTFPR
public static void PUTFPR(int reg, double value)
Write to floating point register- Parameters:
reg
- Register number.value
- Register content.
-
PUTSPR
public static void PUTSPR(int reg, int value)
Write to special purpose register- Parameters:
reg
- Register number.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.
-
-