# MARKUS MAIWALD (ARCHITECT) | VOXIS FORGE (AI)
# RUMPK HAL // RISC-V 64 CONSTANTS

# RISC-V Context Frame
# ra + s0-s11 = 13 registers * 8 bytes = 104
# Aligned to 112 for 16-byte alignment
const CONTEXT_SIZE* = 112

# Stack layout after saves in switch.S:
#   [sp + 0]   = ra (return address)
#   [sp + 8]   = s0
#   [sp + 16]  = s1
#   ...
#   [sp + 96]  = s11

const RA_OFFSET* = 0 # Return address at index 0
