Skip to main content

## s_getpc

# Function s_getpc

Source

    pub fn s_getpc() -> i64

🔬This is a nightly-only experimental API. (`stdarch_amdgpu` #149988)
Available on `target_arch=amdgpu` only.
Expand description

Returns the current process counter.

Provides access to the s_getpc_b64 instruction, but with the return value sign-extended from the width of the underlying PC hardware register even on processors where the s_getpc_b64 instruction returns a zero-extended value.