B2R2


RegType Module

A helper for RegType.

Functions and values

Function or value Description

RegType.checkIfValidRegType t

Full Usage: RegType.checkIfValidRegType t

Parameters:
t : int<MeasureProduct<rt, MeasureOne>>

RegType.double t

Full Usage: RegType.double t

Parameters:
Returns: int<MeasureProduct<rt, MeasureOne>> A RegType.

Get a double-sized RegType from a given RegType.

t : RegType

RegType.

Returns: int<MeasureProduct<rt, MeasureOne>>

A RegType.

RegType.fromBitWidth n

Full Usage: RegType.fromBitWidth n

Parameters:
    n : int - Bit width in integer.

Returns: int<MeasureProduct<rt, MeasureOne>> A RegType.

Get the corresponding integer RegType from the given bit width. When a negative integer is given, it will return a floating point type.

n : int

Bit width in integer.

Returns: int<MeasureProduct<rt, MeasureOne>>

A RegType.

RegType.fromByteWidth n

Full Usage: RegType.fromByteWidth n

Parameters:
    n : int - Byte width in integer.

Returns: int<MeasureProduct<rt, MeasureOne>> A RegType.

Get the corresponding integer RegType from the given byte width.

n : int

Byte width in integer.

Returns: int<MeasureProduct<rt, MeasureOne>>

A RegType.

RegType.getMask t

Full Usage: RegType.getMask t

Parameters:
Returns: bigint A bit mask in big integer.

Get a bitmask (in integer) from the given RegType.

t : int<MeasureProduct<rt, MeasureOne>>
Returns: bigint

A bit mask in big integer.

RegType.isFP t

Full Usage: RegType.isFP t

Parameters:
Returns: bool A Boolean value that is true if the given RegType is a floating-point type, false otherwise.

Check if the given RegType is a floating-point (FP) type.

t : RegType

RegType.

Returns: bool

A Boolean value that is true if the given RegType is a floating-point type, false otherwise.

RegType.toBitWidth t

Full Usage: RegType.toBitWidth t

Parameters:
Returns: int A bit width in integer of the given RegType.

Convert a RegType to an integer of bit width.

t : RegType

RegType.

Returns: int

A bit width in integer of the given RegType.

RegType.toByteWidth t

Full Usage: RegType.toByteWidth t

Parameters:
Returns: int A byte width in integer of the given RegType.

Get a byte width from a RegType.

t : RegType

RegType.

Returns: int

A byte width in integer of the given RegType.

RegType.toString t

Full Usage: RegType.toString t

Parameters:
Returns: string A string representation for RegType. For example, I32 means a 32-bit integer type.

Convert RegType to string.

t : RegType

RegType.

Returns: string

A string representation for RegType. For example, I32 means a 32-bit integer type.