Skip to content
STIMSMITH

push_gpr_to_kernel_stack

CodeArtifact

push_gpr_to_kernel_stack() is a RISC-V assembly-generation helper referenced in the riscv_asm_program_gen flow. Its documented role is to push general-purpose registers to the stack for trap handling.

First seen 5/26/2026
Last seen 5/28/2026
Evidence 1 chunks
Wiki v1

WIKI

push_gpr_to_kernel_stack

push_gpr_to_kernel_stack() is a code artifact referenced in the RISC-V assembly program generation flow described for riscv_asm_program_gen.[C1]

Purpose

READ FULL ARTICLE →

NEIGHBORHOOD

No graph connections found for this entity yet. It may appear in future ingestion runs.

explore full graph →

RELATIONSHIPS

3 connections
riscv_asm_program_gen part of → 100% 2e
push_gpr_to_kernel_stack is a function within riscv_asm_program_gen for pushing GPRs to stack for trap handling.
gen_program ← uses 100% 2e
gen_program calls push_gpr_to_kernel_stack to push GPRs to the kernel stack for trap handling.
trap handling implements → 100% 2e
push_gpr_to_kernel_stack implements trap handling by pushing GPRs to the kernel stack.

CITATIONS

4 sources
4 citations — click to collapse
[1] push_gpr_to_kernel_stack() pushes general-purpose registers to the stack for trap handling. RISC-V source class riscv_asm_program_gen, the brain behind ...
[2] After main and sub-program generation, host-interface-related instructions are added by gen_section(), including write_tohost and _exit content. RISC-V source class riscv_asm_program_gen, the brain behind ...
[3] riscv_asm_program uses gen_section() to select mtvec_handler, which has exception_handler and interrupt_handler defined. RISC-V source class riscv_asm_program_gen, the brain behind ...
[4] The surrounding generator flow produces complete RISC-V assembly programs with randomized instructions and randomized GPR selections. RISC-V source class riscv_asm_program_gen, the brain behind ...