blob: feba157b6b7813ee98db5901d388080b26a8894b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#pragma once
#include <stdint.h>
struct registers {
uint32_t eax, ebx, ecx, edx, esi, edi;
void *ebp, *esp, *eip;
};
// saves a return value according to the SysV ABI
inline void regs_savereturn(struct registers *regs, uint64_t value) {
regs->eax = value;
regs->edx = value >> 32;
}
|