push_gpr_to_kernel_stack
CodeArtifactpush_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
NEIGHBORHOOD
No graph connections found for this entity yet. It may appear in future ingestion runs.
explore full graph →RELATIONSHIPS
3 connectionspush_gpr_to_kernel_stack is a function within riscv_asm_program_gen for pushing GPRs to stack for trap handling.
gen_program calls push_gpr_to_kernel_stack to push GPRs to the kernel stack for trap handling.
push_gpr_to_kernel_stack implements trap handling by pushing GPRs to the kernel stack.
LINKED ENTITIES
2 linksriscv_asm_program_gen generation_flow_context The evidence describes push_gpr_to_kernel_stack() inside the RISC-V assembly program generation flow associated with the riscv_asm_program_gen class.
gen_section sequenced_with The evidence states that host-interface instructions are added by gen_section(), and that riscv_asm_program uses gen_section() to select the mtvec_handler section near the push_gpr_to_kernel_stack() trap-handling setup.
CITATIONS
4 sources4 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 ...