From d1ac54e4d076741762136e96c1cdf58a0b9b8afc Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 8 Jun 2023 18:58:33 +0300 Subject: skip saving registers when possible --- arch/riscv64/asm/asm-offsets.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/riscv64/asm') diff --git a/arch/riscv64/asm/asm-offsets.c b/arch/riscv64/asm/asm-offsets.c index 7a8ea01..a053996 100644 --- a/arch/riscv64/asm/asm-offsets.c +++ b/arch/riscv64/asm/asm-offsets.c @@ -37,6 +37,13 @@ */ #define SIZEOF(n, s) DEFINE(sizeof_##n, sizeof(s)) +/** + * Insert enum. + * + * @param e Name of enum value. + */ +#define ENUM(e) DEFINE(e, e) + /** * Generate assembly with calculated offsets and sizes. * See arch/riscv64/gen/source.mk for how the assembly is used. @@ -86,9 +93,13 @@ void asm_offsets() OFFSETOF(exec, struct tcb); OFFSETOF(regs, struct tcb); + OFFSETOF(rid, struct tcb); + OFFSETOF(pid, struct tcb); /* At the moment tcbd is just a single register slot, so this works, but * if it's expanded in the future I'll need to figure out a way to * target specific substructure members. */ OFFSETOF(tcbd, struct tcb); SIZEOF(tcb, struct tcb); + + ENUM(SYS_IPC_RESP); } -- cgit v1.3