Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/dev/kinst/amd64/kinst_isa.h
Show All 17 Lines | |||||
* to 16 bytes, 32 bytes is enough to cover even the worst case scenario. | * to 16 bytes, 32 bytes is enough to cover even the worst case scenario. | ||||
*/ | */ | ||||
#define KINST_TRAMP_SIZE 32 | #define KINST_TRAMP_SIZE 32 | ||||
#define KINST_TRAMPCHUNK_SIZE PAGE_SIZE | #define KINST_TRAMPCHUNK_SIZE PAGE_SIZE | ||||
typedef uint8_t kinst_patchval_t; | typedef uint8_t kinst_patchval_t; | ||||
struct kinst_probe_md { | struct kinst_probe_md { | ||||
int flags; | int flags; | ||||
int instlen; /* original instr len */ | int instlen; /* original instr len */ | ||||
int tinstlen; /* trampoline instr len */ | int tinstlen; /* trampoline instr len */ | ||||
uint8_t template[16]; /* copied into thread tramps */ | uint8_t template[16]; /* copied into thread tramps */ | ||||
int dispoff; /* offset of rip displacement */ | int dispoff; /* offset of rip displacement */ | ||||
/* operands to "call" instruction branch target */ | /* operands to "call" instruction branch target */ | ||||
int reg1; | int reg1; | ||||
int reg2; | int reg2; | ||||
int scale; | int scale; | ||||
int64_t disp; | int64_t disp; | ||||
}; | }; | ||||
#endif /* _KINST_ISA_H_ */ | #endif /* _KINST_ISA_H_ */ |