GTPin
Functions
GTReplay: Register State Inspection API

A group of GTReplay APIs that provide access to the dynamic state of the emulated GEN instruction More...

Functions

GTREPLAY_API uint32_t GTReplay_DynamicExecMask (GTReplayIns ins, GTReplayState state)
GTREPLAY_API uint64_t GTReplay_GetMemoryAccessAddr (GTReplayIns ins, GTReplayState state, uint32_t accessId)
GTREPLAY_API void GTReplay_GetMemoryWriteValue (GTReplayIns ins, GTReplayState state, uint32_t accessId, uint8_t *data)
GTREPLAY_API void GTReplay_GetDestination (GTReplayIns ins, GTReplayState state, uint32_t currentExecMask, uint8_t *dst, uint32_t *numOfElements, uint32_t *elementWidth)
GTREPLAY_API void GTReplay_GetSrcOperand (GTReplayIns ins, GTReplayState state, uint32_t srcId, uint8_t *src, uint32_t *numOfElements, uint32_t *elementWidth)
GTREPLAY_API void GTReplay_GetSendDestination (GTReplayIns ins, GTReplayState state, uint8_t *dst, uint32_t *numOfElements, uint32_t *elementWidth)
GTREPLAY_API uint32_t GTReplay_GetGrfReg (GTReplayState state, uint32_t regNum, uint8_t *dst)
GTREPLAY_API uint32_t GTReplay_GetGrfRegByte (GTReplayState state, uint32_t regNum, uint32_t regSubNum, uint8_t *reg)
GTREPLAY_API uint32_t GTReplay_GetGrfRegWord (GTReplayState state, uint32_t regNum, uint32_t regSubNum, uint16_t *reg)
GTREPLAY_API uint32_t GTReplay_GetGrfRegDword (GTReplayState state, uint32_t regNum, uint32_t regSubNum, uint32_t *reg)
GTREPLAY_API uint32_t GTReplay_GetGrfRegQword (GTReplayState state, uint32_t regNum, uint32_t regSubNum, uint64_t *reg)

Detailed Description

A group of GTReplay APIs that provide access to the dynamic state of the emulated GEN instruction


Function Documentation

GTREPLAY_API uint32_t GTReplay_DynamicExecMask ( GTReplayIns  ins,
GTReplayState  state 
)
Returns:
instruction dynamic exec_mask: exec_mask[0:exec_size-1]
Parameters:
[in]insan instruction handle.
[in]statea state handle.
Availability:
  • OnKernelBuild
GTREPLAY_API void GTReplay_GetDestination ( GTReplayIns  ins,
GTReplayState  state,
uint32_t  currentExecMask,
uint8_t *  dst,
uint32_t *  numOfElements,
uint32_t *  elementWidth 
)

Return destination operand

Parameters:
[in]insan instruction handle.
[in]statea state handle.
[in]currentExecMaskcurrent execution mask
[out]dstpointer to the data buffer for return value (it is responsibility of the caller to allocate enough space)
[out]numOfElementspointer to a buffer where the number of elements is returned
[out]elementWidthpointer to a buffer where the element width is returned
Availability:
  • OnKernelBuild
GTREPLAY_API uint32_t GTReplay_GetGrfReg ( GTReplayState  state,
uint32_t  regNum,
uint8_t *  dst 
)

Return specified GRF register -1 is returned in case of wrong parameters

Parameters:
[in]statea state handle.
[in]regNumregister num
[out]dstpointer to the data buffer for return value (it is responsibility of the caller to allocate enough space)
Availability:
  • OnKernelBuild
GTREPLAY_API uint32_t GTReplay_GetGrfRegByte ( GTReplayState  state,
uint32_t  regNum,
uint32_t  regSubNum,
uint8_t *  reg 
)

Return single one-byte register value -1 is returned in case of wrong parameters

Parameters:
[in]statea state handle.
[in]regNumregister num
[in]regSubNumregister sub num
[out]regpointer to a location where to return register value
Availability:
  • OnKernelBuild
GTREPLAY_API uint32_t GTReplay_GetGrfRegDword ( GTReplayState  state,
uint32_t  regNum,
uint32_t  regSubNum,
uint32_t *  reg 
)

Return single one-dword register value -1 is returned in case of wrong parameters

Parameters:
[in]statea state handle.
[in]regNumregister num
[in]regSubNumregister sub num
[out]regpointer to a location where to return register value
Availability:
  • OnKernelBuild
GTREPLAY_API uint32_t GTReplay_GetGrfRegQword ( GTReplayState  state,
uint32_t  regNum,
uint32_t  regSubNum,
uint64_t *  reg 
)

Return single one-qword register value -1 is returned in case of wrong parameters

Parameters:
[in]statea state handle.
[in]regNumregister num
[in]regSubNumregister sub num
[out]regpointer to a location where to return register value
Availability:
  • OnKernelBuild
GTREPLAY_API uint32_t GTReplay_GetGrfRegWord ( GTReplayState  state,
uint32_t  regNum,
uint32_t  regSubNum,
uint16_t *  reg 
)

Return single one-word register value -1 is returned in case of wrong parameters

Parameters:
[in]statea state handle.
[in]regNumregister num
[in]regSubNumregister sub num
[out]regpointer to a location where to return register value
Availability:
  • OnKernelBuild
GTREPLAY_API uint64_t GTReplay_GetMemoryAccessAddr ( GTReplayIns  ins,
GTReplayState  state,
uint32_t  accessId 
)
Returns:
memory access address
Parameters:
[in]insan instruction handle.
[in]statea state handle.
[in]accessIdan access ID
Availability:
  • OnKernelBuild
GTREPLAY_API void GTReplay_GetMemoryWriteValue ( GTReplayIns  ins,
GTReplayState  state,
uint32_t  accessId,
uint8_t *  data 
)

Get memory write value

Parameters:
[in]insan instruction handle.
[in]statea state handle.
[in]accessIdan access ID
[out]datapointer to the data buffer for return value (it is responsibility of the caller to allocate enough space)
Availability:
  • OnKernelBuild
GTREPLAY_API void GTReplay_GetSendDestination ( GTReplayIns  ins,
GTReplayState  state,
uint8_t *  dst,
uint32_t *  numOfElements,
uint32_t *  elementWidth 
)

Return destination operand o fSEND instruction

Parameters:
[in]insan instruction handle.
[in]statea state handle.
[out]dstpointer to the data buffer for return value (it is responsibility of the caller to allocate enough space)
[out]numOfElementspointer to a buffer where the number of elements is returned
[out]elementWidthpointer to a buffer where the element width is returned
Availability:
  • OnKernelBuild
GTREPLAY_API void GTReplay_GetSrcOperand ( GTReplayIns  ins,
GTReplayState  state,
uint32_t  srcId,
uint8_t *  src,
uint32_t *  numOfElements,
uint32_t *  elementWidth 
)

Return source operand

Parameters:
[in]insan instruction handle.
[in]statea state handle.
[in]srcIdthe ID of the source operand (0, 1, or 2)
[out]srcpointer to the data buffer for return value (it is responsibility of the caller to allocate enough space)
[out]numOfElementspointer to a buffer where the number of elements is returned
[out]elementWidthpointer to a buffer where the element width is returned
Availability:
  • execution
 All Data Structures Functions Variables Typedefs Enumerations Enumerator


  Copyright (C) 2013-2025 Intel Corporation
SPDX-License-Identifier: MIT