diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-06-08 18:58:33 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-06-08 18:58:33 +0300 |
| commit | d1ac54e4d076741762136e96c1cdf58a0b9b8afc (patch) | |
| tree | 3f7ab762bd770d990e787267c91662d807fea11b /arch/riscv64/asm/asm-offsets.c | |
| parent | dd10667c56b943c19436c6540946f9ad0f71d257 (diff) | |
| download | kmi-d1ac54e4d076741762136e96c1cdf58a0b9b8afc.tar.gz kmi-d1ac54e4d076741762136e96c1cdf58a0b9b8afc.zip | |
skip saving registers when possible
Diffstat (limited to 'arch/riscv64/asm/asm-offsets.c')
| -rw-r--r-- | arch/riscv64/asm/asm-offsets.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ -38,6 +38,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); } |
