Skip to content

Commit

Permalink
Merge e2b41e2 into 221bbe0
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan-Jowett committed Jun 2, 2021
2 parents 221bbe0 + e2b41e2 commit b0581bd
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions vm/ubpf_jit_x86_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,24 @@ static int platform_nonvolatile_registers[] = {
static int platform_parameter_registers[] = {
RCX, RDX, R8, R9
};
#define RCX_ALT R15
#define RCX_ALT R10
// Register assignments:
// BPF R0-R4 are "volatile"
// BPF R5-R10 are "non-volatile"
// Map BPF volatile registers to x64 volatile and map BPF non-volatile to
// x64 non-volatile.
// Avoid R12 as we don't support encoding modrm modifier for using R12.
static int register_map[REGISTER_MAP_SIZE] = {
RAX,
R15,
RDX,
R8,
R9,
R10,
R11,
R12,
R13,
R14,
R15,
RDI,
RSI,
RBX,
RBP,
};
#else
Expand Down

0 comments on commit b0581bd

Please sign in to comment.