.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * bpf_jit64.h: BPF JIT compiler for PPC64 |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2016 Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> |
---|
5 | 6 | * IBM Corporation |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or |
---|
8 | | - * modify it under the terms of the GNU General Public License |
---|
9 | | - * as published by the Free Software Foundation; version 2 |
---|
10 | | - * of the License. |
---|
11 | 7 | */ |
---|
12 | 8 | #ifndef _BPF_JIT64_H |
---|
13 | 9 | #define _BPF_JIT64_H |
---|
.. | .. |
---|
74 | 70 | */ |
---|
75 | 71 | #define PPC_BPF_LL(r, base, i) do { \ |
---|
76 | 72 | if ((i) % 4) { \ |
---|
77 | | - PPC_LI(b2p[TMP_REG_2], (i)); \ |
---|
78 | | - PPC_LDX(r, base, b2p[TMP_REG_2]); \ |
---|
| 73 | + EMIT(PPC_RAW_LI(b2p[TMP_REG_2], (i)));\ |
---|
| 74 | + EMIT(PPC_RAW_LDX(r, base, \ |
---|
| 75 | + b2p[TMP_REG_2])); \ |
---|
79 | 76 | } else \ |
---|
80 | | - PPC_LD(r, base, i); \ |
---|
| 77 | + EMIT(PPC_RAW_LD(r, base, i)); \ |
---|
81 | 78 | } while(0) |
---|
82 | 79 | #define PPC_BPF_STL(r, base, i) do { \ |
---|
83 | 80 | if ((i) % 4) { \ |
---|
84 | | - PPC_LI(b2p[TMP_REG_2], (i)); \ |
---|
85 | | - PPC_STDX(r, base, b2p[TMP_REG_2]); \ |
---|
| 81 | + EMIT(PPC_RAW_LI(b2p[TMP_REG_2], (i)));\ |
---|
| 82 | + EMIT(PPC_RAW_STDX(r, base, \ |
---|
| 83 | + b2p[TMP_REG_2])); \ |
---|
86 | 84 | } else \ |
---|
87 | | - PPC_STD(r, base, i); \ |
---|
| 85 | + EMIT(PPC_RAW_STD(r, base, i)); \ |
---|
88 | 86 | } while(0) |
---|
89 | | -#define PPC_BPF_STLU(r, base, i) do { PPC_STDU(r, base, i); } while(0) |
---|
| 87 | +#define PPC_BPF_STLU(r, base, i) do { EMIT(PPC_RAW_STDU(r, base, i)); } while(0) |
---|
90 | 88 | |
---|
91 | 89 | #define SEEN_FUNC 0x1000 /* might call external helpers */ |
---|
92 | 90 | #define SEEN_STACK 0x2000 /* uses BPF stack */ |
---|