Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

sparc_stack_write(3C)

Name

sparc_stack_read, sparc_stack_write - access a SPARC stack frame

Synopsis

#include <sys/stack.h>

void sparc_stack_read(uint64_t *target, uint64_t *to, size_t n);

void sparc_stack_write(uint64_t *target, uint64_t *from, size_t n);

Description

The sparc_stack_read() function copies n extended words from address target within a SPARC V9 stack frame to memory address to.

The sparc_stack_write() function copies n extended words from memory address from to address target within a SPARC V9 stack frame.

sparc_stack_read() and sparc_stack_write() can be used to read or write to a SPARC V9 stack frame without triggering an ADI mismatch exception when the ADISTACK security extension is enabled. For more information see adi(3C) and sxadm(8). The caller is responsible for ensuring that the register window for the frame has been spilled to the stack (by executing the flushw instruction, for example).

Usage

The sparc_stack_read() and sparc_stack_write() functions are only available with the 64-bit version of libc(3LIB), and then only on SPARC platforms. They are not available with the 32-bit version of this library, nor on x86 platforms.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Architecture
SPARC
Interface Stability
Committed
MT-Level
MT-Safe

See Also

adi(3C), adistack_clear_frame(3C), adistack_clear_stack(3C), sxadm(8), attributes(7), standards(7)