GPR_NUM
#define GPR_END (GPR_BASE + GPR_NUM - 1)
r = membuf_write(&to, ®s->regs, sizeof(u64) * GPR_NUM);
int a0_start = sizeof(u64) * GPR_NUM;