GTPin

- Main Page
- Related Pages
- Modules
- Data Structures

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions
gtpin::GtReg Class Reference
GEN Register

Register descriptor. More...

`#include <gt_reg.h>`

## Public Member Functions
| GtReg ()
| Construct invalid register descriptor.
| GtReg (GtRegFileType regType, GtArchRegType archRegType, GtRegNum regNum, GtSubRegNum subRegNum, uint32_t elementSize)
| Construct descriptor of a GEN register.
| GtReg (const GtReg &enclosingReg, uint32_t size, uint32_t index)
| Construct descriptor for a partial register, which consists of 'size' bytes starting at (size * index) offset within 'enclosingReg' register.
GtReg & | Resize (uint32_t elementSize)
| Set specified size of the register in bytes. Change subregister number accordingly.
bool | operator== (const GtReg &other) const
| Equality operator.
bool | operator!= (const GtReg &other) const
| Inequality operator.
bool | operator< (const GtReg &other) const
| Operator 'less'.
| operator bool () const
| Return true if this is a valid register.
bool | IsSamePreg (const GtReg &other) const
| Return true if this and specified registers are equal regardless of the virtual register assignment.
bool | Contains (const GtReg &other) const
| Return true if this register contains all bits of the specified register.
bool | IsValid () const
| Return true for a valid register.
bool | IsGrf () const
| Return true for a GRF register.
bool | IsArf () const
| Return true for an ARF register.
GtRegFileType | Type () const
| Return type of the register file.
GtArchRegType | ArchRegType () const
| Return type of the ARF register.
GtRegNum | RegNum () const
| Return the register number.
GtSubRegNum | SubRegNum () const
| Return the subregister number.
uint32_t | ElementSize () const
| Return size of the data element in bytes.
uint32_t | SubRegNumInBytes () const
| Return offset of the subregister within the enclosing register.
bool | IsNullReg () const
| Return true for NULL regiser.
bool | IsIpReg () const
| Return true for IP regiser.
bool | IsStateReg () const
| Return true for STATE regiser.
bool | IsAddrReg () const
| Return true for ADDRESS regiser.
bool | IsFlagReg () const
| Return true for FLAG regiser.
bool | IsAccReg () const
| Return true for ACC regiser.
bool | IsTimeStampReg () const
| Return true for TM regiser.
bool | IsChannelEnableReg () const
| Return true for CE regiser.
bool | IsDebugReg () const
| Return true for DBG regiser.
bool | IsStackPointerReg () const
| Return true for SP regiser.
bool | IsPerfMonReg () const
| Return true for PM regiser.
GtReg & | SetRegNum (GtRegNum regNum)
| Set the specified register number.
GtReg & | SetSubRegNum (GtSubRegNum subRegNum)
| Set the specified subregister number.
std::string | ToString () const
| Return string representation.

## Detailed Description

Register descriptor.

Specifies position and size of the register (element) in the register file.

## Constructor & Destructor Documentation

gtpin::GtReg::GtReg | ( | GtRegFileType | regType,
|  | GtArchRegType | archRegType,
|  | GtRegNum | regNum,
|  | GtSubRegNum | subRegNum,
|  | uint32_t | elementSize
| ) |  | `[inline]`

Construct descriptor of a GEN register.

Parameters:

  [in] | regType | Register type, either GRF or ARF
  [in] | archRegType | Type of the architecture register; valid only if regType == GED_REG_FILE_ARF
  [in] | regNum | Register number. In GRF, this is the register index within GRF array In ARF, this is the register ordinal number within 'archRegType' registers
  [in] | subRegNum | Sub-register number - index of the data element
  [in] | elementSize | Size of the data element in bytes

Precondition:
  regType.IsGrf() || regType.IsArf()
  regType.IsGrf() || archRegType.IsValid()

gtpin::GtReg::GtReg | ( | const GtReg & | enclosingReg,
|  | uint32_t | size,
|  | uint32_t | index
| ) |  | `[inline]`

Construct descriptor for a partial register, which consists of 'size' bytes starting at (size * index) offset within 'enclosingReg' register.

Parameters:

  [in] | enclosingReg | Register, containing the partial register to be constructed
  [in] | size | Size of the partial register, in bytes
  [in] | index | Index of the partial register within 'enclosingReg'

Precondition:
  size != 0
  enclosingReg.ElementSize() % size == 0
  enclosingReg.ElementSize() > size * index

## Member Function Documentation

GtReg & gtpin::GtReg::Resize | ( | uint32_t | elementSize | ) | `[inline]`

Set specified size of the register in bytes. Change subregister number accordingly.

Precondition:
  elementSize != 0
  SubRegNumInBytes() % elementSize == 0

All Data Structures Functions Variables Typedefs Enumerations Enumerator

      Copyright (C) 2013-2025 Intel Corporation

      SPDX-License-Identifier: MIT