|
#define | BPF_PPC_STACK_LOCALS 32 |
|
#define | BPF_PPC_STACK_BASIC (48+64) |
|
#define | BPF_PPC_STACK_SAVE (18*8) |
|
#define | BPF_PPC_STACKFRAME |
|
#define | BPF_PPC_SLOWPATH_FRAME (48+64) |
|
#define | r_skb 3 |
|
#define | r_ret 3 |
|
#define | r_A 4 |
|
#define | r_X 5 |
|
#define | r_addr 6 |
|
#define | r_scratch1 7 |
|
#define | r_D 14 |
|
#define | r_HL 15 |
|
#define | r_M 16 |
|
#define | DECLARE_LOAD_FUNC(func) extern u8 func[], func##_negative_offset[], func##_positive_offset[] |
|
#define | FUNCTION_DESCR_SIZE 24 |
|
#define | IMM_H(i) ((uintptr_t)(i)>>16) |
|
#define | IMM_HA(i) |
|
#define | IMM_L(i) ((uintptr_t)(i) & 0xffff) |
|
#define | PLANT_INSTR(d, idx, instr) do { if (d) { (d)[idx] = instr; } idx++; } while (0) |
|
#define | EMIT(instr) PLANT_INSTR(image, ctx->idx, instr) |
|
#define | PPC_NOP() EMIT(PPC_INST_NOP) |
|
#define | PPC_BLR() EMIT(PPC_INST_BLR) |
|
#define | PPC_BLRL() EMIT(PPC_INST_BLRL) |
|
#define | PPC_MTLR(r) EMIT(PPC_INST_MTLR | ___PPC_RT(r)) |
|
#define | PPC_ADDI(d, a, i) |
|
#define | PPC_MR(d, a) PPC_OR(d, a, a) |
|
#define | PPC_LI(r, i) PPC_ADDI(r, 0, i) |
|
#define | PPC_ADDIS(d, a, i) |
|
#define | PPC_LIS(r, i) PPC_ADDIS(r, 0, i) |
|
#define | PPC_STD(r, base, i) |
|
#define | PPC_LD(r, base, i) |
|
#define | PPC_LWZ(r, base, i) |
|
#define | PPC_LHZ(r, base, i) |
|
#define | PPC_LD_OFFS(r, base, i) |
|
#define | PPC_LWZ_OFFS(r, base, i) |
|
#define | PPC_LHZ_OFFS(r, base, i) |
|
#define | PPC_CMPWI(a, i) EMIT(PPC_INST_CMPWI | ___PPC_RA(a) | IMM_L(i)) |
|
#define | PPC_CMPDI(a, i) EMIT(PPC_INST_CMPDI | ___PPC_RA(a) | IMM_L(i)) |
|
#define | PPC_CMPLWI(a, i) EMIT(PPC_INST_CMPLWI | ___PPC_RA(a) | IMM_L(i)) |
|
#define | PPC_CMPLW(a, b) EMIT(PPC_INST_CMPLW | ___PPC_RA(a) | ___PPC_RB(b)) |
|
#define | PPC_SUB(d, a, b) |
|
#define | PPC_ADD(d, a, b) |
|
#define | PPC_MUL(d, a, b) |
|
#define | PPC_MULHWU(d, a, b) |
|
#define | PPC_MULI(d, a, i) |
|
#define | PPC_DIVWU(d, a, b) |
|
#define | PPC_AND(d, a, b) |
|
#define | PPC_ANDI(d, a, i) |
|
#define | PPC_AND_DOT(d, a, b) |
|
#define | PPC_OR(d, a, b) |
|
#define | PPC_ORI(d, a, i) |
|
#define | PPC_ORIS(d, a, i) |
|
#define | PPC_SLW(d, a, s) |
|
#define | PPC_SRW(d, a, s) |
|
#define | PPC_SLWI(d, a, i) |
|
#define | PPC_SRWI(d, a, i) |
|
#define | PPC_SLDI(d, a, i) |
|
#define | PPC_NEG(d, a) EMIT(PPC_INST_NEG | ___PPC_RT(d) | ___PPC_RA(a)) |
|
#define | PPC_JMP(dest) |
|
#define | PPC_BCC_SHORT(cond, dest) |
|
#define | PPC_LI32(d, i) |
|
#define | PPC_LI64(d, i) |
|
#define | PPC_BCC(cond, dest) |
|
#define | CR0_LT 0 |
|
#define | CR0_GT 1 |
|
#define | CR0_EQ 2 |
|
#define | COND_CMP_TRUE 0x100 |
|
#define | COND_CMP_FALSE 0x000 |
|
#define | COND_GT (CR0_GT | COND_CMP_TRUE) |
|
#define | COND_GE (CR0_LT | COND_CMP_FALSE) |
|
#define | COND_EQ (CR0_EQ | COND_CMP_TRUE) |
|
#define | COND_NE (CR0_EQ | COND_CMP_FALSE) |
|
#define | COND_LT (CR0_LT | COND_CMP_TRUE) |
|
#define | SEEN_DATAREF 0x10000 /* might call external helpers */ |
|
#define | SEEN_XREG 0x20000 /* X reg is used */ |
|
#define | SEEN_MEM |
|
#define | SEEN_MEM_MSK 0x0ffff |
|