Constructor and Description |
---|
Bits() |
Modifier and Type | Method and Description |
---|---|
static boolean |
fits(Address val,
int bits)
Find out whether a given signed value can be represented in a
given number of bits.
|
static boolean |
fits(int val,
int bits)
Finds out whether a given signed value can be represented in a
given number of bits.
|
static boolean |
fits(long val,
int bits)
Finds out whether a given signed value can be represented in a
given number of bits.
|
static boolean |
fits(Offset val,
int bits)
Finds out whether a given signed value can be represented in a
given number of bits.
|
static boolean |
fits(Word val,
int bits)
Finds out whether a given signed value can be represented in a
given number of bits.
|
static int |
lower16(int value) |
static int |
lower32(long value) |
static int |
lower8(int value) |
static int |
PPCMaskLower16(int value) |
static int |
PPCMaskLower16(Offset value) |
static int |
PPCMaskUpper16(int value) |
static int |
PPCMaskUpper16(Offset value) |
static int |
upper16(int value) |
static int |
upper24(int value) |
static int |
upper32(long value) |
public Bits()
public static int PPCMaskLower16(int value)
value
- the value to maskpublic static int PPCMaskLower16(Offset value)
value
- the value to maskpublic static int PPCMaskUpper16(int value)
value
- the value to maskpublic static int PPCMaskUpper16(Offset value)
value
- the value to maskpublic static int lower8(int value)
value
- the value to maskpublic static int lower16(int value)
value
- the value to maskpublic static int upper16(int value)
value
- the value to maskpublic static int upper24(int value)
value
- the value to maskpublic static int lower32(long value)
value
- the value to maskpublic static int upper32(long value)
value
- the value to maskpublic static boolean fits(long val, int bits)
val
- the value to be representedbits
- the number of bits to use.true
if val can be encoded in bits.public static boolean fits(Offset val, int bits)
val
- the value to be representedbits
- the number of bits to use.true
if val can be encoded in bits.public static boolean fits(Address val, int bits)
val
- the value to be representedbits
- the number of bits to use.true
if val can be encoded in bits.public static boolean fits(int val, int bits)
val
- the value to be representedbits
- the number of bits to use.true
if val can be encoded in bits.