Definition
gp ( RISC-V)
gpis the RISC-V integer registerx3, designated as the global pointer. It holds a fixed address that provides a stable base for accessing global variables and thread-local storage at a constant offset.The value of
gpis typically set once during program initialisation to point into the global data segment, allowing data accesses via small immediate offsets. This design reduces the code size of instructions that reference globals, as the base address need not be loaded separately for each access.