[COMMITTED] bpf: remove bpf-helpers.h

Message ID 20231127062618.21624-1-jose.marchesi@oracle.com
State Accepted
Headers
Series [COMMITTED] bpf: remove bpf-helpers.h |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Jose E. Marchesi Nov. 27, 2023, 6:26 a.m. UTC
  Now that we are finally able to use the kernel provided bpf_helpers.h
file and associated machinery, there is no longer need to distribute
our own version.

This patch removes bpf-helpers.h and deletes most of the associated
tests from the gcc.target/bpf testsuite.  Two tests are adapted and
retained: one testing the kernel_helper attribute, which is still
useful, and the other making sure that proper constant propagation is
performed with -O2, which is necessary to use the helpers defined as
static pointers in the kernel's bpf_helpers.h.

Regtested in target bpf-unknown-none and host x86_64-linux-gnu.

gcc/ChangeLog

	* config/bpf/bpf-helpers.h: Remove.
	* config.gcc: Adapt accordingly.

gcc/testsuite/ChangeLog

	* gcc.target/bpf/helper-bind.c: Do not include bpf-helpers.h.
	* gcc.target/bpf/helper-skb-ancestor-cgroup-id.c: Likewise, and
	renamed from skb-ancestor-cgroup-id.c.
	* gcc.target/bpf/helper-bpf-redirect.c: Remove.
	* gcc.target/bpf/helper-clone-redirect.c: Likewise.
	* gcc.target/bpf/helper-csum-diff.c: Likewise.
	* gcc.target/bpf/helper-csum-update.c: Likewise.
	* gcc.target/bpf/helper-current-task-under-cgroup.c: Likewise.
	* gcc.target/bpf/helper-fib-lookup.c: Likewise.
	* gcc.target/bpf/helper-get-cgroup-classid.c: Likewise.
	* gcc.target/bpf/helper-get-current-cgroup-id.c: Likewise.
	* gcc.target/bpf/helper-get-current-comm.c: Likewise.
	* gcc.target/bpf/helper-get-current-pid-tgid.c: Likewise.
	* gcc.target/bpf/helper-get-current-task.c: Likewise.
	* gcc.target/bpf/helper-get-current-uid-gid.c: Likewise.
	* gcc.target/bpf/helper-get-hash-recalc.c: Likewise.
	* gcc.target/bpf/helper-get-listener-sock.c: Likewise.
	* gcc.target/bpf/helper-get-local-storage.c: Likewise.
	* gcc.target/bpf/helper-get-numa-node-id.c: Likewise.
	* gcc.target/bpf/helper-get-prandom-u32.c: Likewise.
	* gcc.target/bpf/helper-get-route-realm.c: Likewise.
	* gcc.target/bpf/helper-get-smp-processor-id.c: Likewise.
	* gcc.target/bpf/helper-get-socket-cookie.c: Likewise.
	* gcc.target/bpf/helper-get-socket-uid.c: Likewise.
	* gcc.target/bpf/helper-get-stack.c: Likewise.
	* gcc.target/bpf/helper-get-stackid.c: Likewise.
	* gcc.target/bpf/helper-getsockopt.c: Likewise.
	* gcc.target/bpf/helper-ktime-get-ns.c: Likewise.
	* gcc.target/bpf/helper-l3-csum-replace.c: Likewise.
	* gcc.target/bpf/helper-l4-csum-replace.c: Likewise.
	* gcc.target/bpf/helper-lwt-push-encap.c: Likewise.
	* gcc.target/bpf/helper-lwt-seg6-action.c: Likewise.
	* gcc.target/bpf/helper-lwt-seg6-adjust-srh.c: Likewise.
	* gcc.target/bpf/helper-lwt-seg6-store-bytes.c: Likewise.
	* gcc.target/bpf/helper-map-delete-elem.c: Likewise.
	* gcc.target/bpf/helper-map-lookup-elem.c: Likewise.
	* gcc.target/bpf/helper-map-peek-elem.c: Likewise.
	* gcc.target/bpf/helper-map-pop-elem.c: Likewise.
	* gcc.target/bpf/helper-map-push-elem.c: Likewise.
	* gcc.target/bpf/helper-map-update-elem.c: Likewise.
	* gcc.target/bpf/helper-msg-apply-bytes.c: Likewise.
	* gcc.target/bpf/helper-msg-cork-bytes.c: Likewise.
	* gcc.target/bpf/helper-msg-pop-data.c: Likewise.
	* gcc.target/bpf/helper-msg-pull-data.c: Likewise.
	* gcc.target/bpf/helper-msg-push-data.c: Likewise.
	* gcc.target/bpf/helper-msg-redirect-hash.c: Likewise.
	* gcc.target/bpf/helper-msg-redirect-map.c: Likewise.
	* gcc.target/bpf/helper-override-return.c: Likewise.
	* gcc.target/bpf/helper-perf-event-output.c: Likewise.
	* gcc.target/bpf/helper-perf-event-read-value.c: Likewise.
	* gcc.target/bpf/helper-perf-event-read.c: Likewise.
	* gcc.target/bpf/helper-perf-prog-read-value.c: Likewise.
	* gcc.target/bpf/helper-probe-read-str.c: Likewise.
	* gcc.target/bpf/helper-probe-read.c: Likewise.
	* gcc.target/bpf/helper-probe-write-user.c: Likewise.
	* gcc.target/bpf/helper-rc-keydown.c: Likewise.
	* gcc.target/bpf/helper-rc-pointer-rel.c: Likewise.
	* gcc.target/bpf/helper-rc-repeat.c: Likewise.
	* gcc.target/bpf/helper-redirect-map.c: Likewise.
	* gcc.target/bpf/helper-set-hash-invalid.c: Likewise.
	* gcc.target/bpf/helper-set-hash.c: Likewise.
	* gcc.target/bpf/helper-setsockopt.c: Likewise.
	* gcc.target/bpf/helper-sk-fullsock.c: Likewise.
	* gcc.target/bpf/helper-sk-lookup-tcp.c: Likewise.
	* gcc.target/bpf/helper-sk-lookup-upd.c: Likewise.
	* gcc.target/bpf/helper-sk-redirect-hash.c: Likewise.
	* gcc.target/bpf/helper-sk-redirect-map.c: Likewise.
	* gcc.target/bpf/helper-sk-release.c: Likewise.
	* gcc.target/bpf/helper-sk-select-reuseport.c: Likewise.
	* gcc.target/bpf/helper-sk-storage-delete.c: Likewise.
	* gcc.target/bpf/helper-sk-storage-get.c: Likewise.
	* gcc.target/bpf/helper-skb-adjust-room.c: Likewise.
	* gcc.target/bpf/helper-skb-cgroup-id.c: Likewise.
	* gcc.target/bpf/helper-skb-change-head.c: Likewise.
	* gcc.target/bpf/helper-skb-change-proto.c: Likewise.
	* gcc.target/bpf/helper-skb-change-tail.c: Likewise.
	* gcc.target/bpf/helper-skb-change-type.c: Likewise.
	* gcc.target/bpf/helper-skb-ecn-set-ce.c: Likewise.
	* gcc.target/bpf/helper-skb-get-tunnel-key.c: Likewise.
	* gcc.target/bpf/helper-skb-get-tunnel-opt.c: Likewise.
	* gcc.target/bpf/helper-skb-get-xfrm-state.c: Likewise.
	* gcc.target/bpf/helper-skb-load-bytes-relative.c: Likewise.
	* gcc.target/bpf/helper-skb-load-bytes.c: Likewise.
	* gcc.target/bpf/helper-skb-pull-data.c: Likewise.
	* gcc.target/bpf/helper-skb-set-tunnel-key.c: Likewise.
	* gcc.target/bpf/helper-skb-set-tunnel-opt.c: Likewise.
	* gcc.target/bpf/helper-skb-store-bytes.c: Likewise.
	* gcc.target/bpf/helper-skb-under-cgroup.c: Likewise.
	* gcc.target/bpf/helper-skb-vlan-pop.c: Likewise.
	* gcc.target/bpf/helper-skb-vlan-push.c: Likewise.
	* gcc.target/bpf/helper-skc-lookup-tcp.c: Likewise.
	* gcc.target/bpf/helper-sock-hash-update.c: Likewise.
	* gcc.target/bpf/helper-sock-map-update.c: Likewise.
	* gcc.target/bpf/helper-sock-ops-cb-flags-set.c: Likewise.
	* gcc.target/bpf/helper-spin-lock.c: Likewise.
	* gcc.target/bpf/helper-spin-unlock.c: Likewise.
	* gcc.target/bpf/helper-strtol.c: Likewise.
	* gcc.target/bpf/helper-strtoul.c: Likewise.
	* gcc.target/bpf/helper-sysctl-get-current-value.c: Likewise.
	* gcc.target/bpf/helper-sysctl-get-name.c: Likewise.
	* gcc.target/bpf/helper-sysctl-get-new-value.c: Likewise.
	* gcc.target/bpf/helper-sysctl-set-new-value.c: Likewise.
	* gcc.target/bpf/helper-tail-call.c: Likewise.
	* gcc.target/bpf/helper-tcp-check-syncookie.c: Likewise.
	* gcc.target/bpf/helper-tcp-sock.c: Likewise.
	* gcc.target/bpf/helper-trace-printk.c: Likewise.
	* gcc.target/bpf/helper-xdp-adjust-head.c: Likewise.
	* gcc.target/bpf/helper-xdp-adjust-meta.c: Likewise.
	* gcc.target/bpf/helper-xdp-adjust-tail.c: Likewise.
	* gcc.target/bpf/skb-ancestor-cgroup-id.c: Likewise.
---
 gcc/config.gcc                                |   1 -
 gcc/config/bpf/bpf-helpers.h                  | 427 ------------------
 gcc/testsuite/gcc.target/bpf/helper-bind.c    |   4 +-
 .../gcc.target/bpf/helper-bpf-redirect.c      |  17 -
 .../gcc.target/bpf/helper-clone-redirect.c    |  18 -
 .../gcc.target/bpf/helper-csum-diff.c         |  18 -
 .../gcc.target/bpf/helper-csum-update.c       |  17 -
 .../bpf/helper-current-task-under-cgroup.c    |  17 -
 .../gcc.target/bpf/helper-fib-lookup.c        |  18 -
 .../bpf/helper-get-cgroup-classid.c           |  16 -
 .../bpf/helper-get-current-cgroup-id.c        |  15 -
 .../gcc.target/bpf/helper-get-current-comm.c  |  17 -
 .../bpf/helper-get-current-pid-tgid.c         |  15 -
 .../gcc.target/bpf/helper-get-current-task.c  |  15 -
 .../bpf/helper-get-current-uid-gid.c          |  15 -
 .../gcc.target/bpf/helper-get-hash-recalc.c   |  16 -
 .../gcc.target/bpf/helper-get-listener-sock.c |  15 -
 .../gcc.target/bpf/helper-get-local-storage.c |  16 -
 .../gcc.target/bpf/helper-get-numa-node-id.c  |  15 -
 .../gcc.target/bpf/helper-get-prandom-u32.c   |  15 -
 .../gcc.target/bpf/helper-get-route-realm.c   |  16 -
 .../bpf/helper-get-smp-processor-id.c         |  15 -
 .../gcc.target/bpf/helper-get-socket-cookie.c |  16 -
 .../gcc.target/bpf/helper-get-socket-uid.c    |  16 -
 .../gcc.target/bpf/helper-get-stack.c         |  18 -
 .../gcc.target/bpf/helper-get-stackid.c       |  17 -
 .../gcc.target/bpf/helper-getsockopt.c        |  19 -
 .../gcc.target/bpf/helper-ktime-get-ns.c      |  14 -
 .../gcc.target/bpf/helper-l3-csum-replace.c   |  18 -
 .../gcc.target/bpf/helper-l4-csum-replace.c   |  18 -
 .../gcc.target/bpf/helper-lwt-push-encap.c    |  17 -
 .../gcc.target/bpf/helper-lwt-seg6-action.c   |  18 -
 .../bpf/helper-lwt-seg6-adjust-srh.c          |  17 -
 .../bpf/helper-lwt-seg6-store-bytes.c         |  17 -
 .../gcc.target/bpf/helper-map-delete-elem.c   |  17 -
 .../gcc.target/bpf/helper-map-lookup-elem.c   |  15 -
 .../gcc.target/bpf/helper-map-peek-elem.c     |  17 -
 .../gcc.target/bpf/helper-map-pop-elem.c      |  17 -
 .../gcc.target/bpf/helper-map-push-elem.c     |  18 -
 .../gcc.target/bpf/helper-map-update-elem.c   |  18 -
 .../gcc.target/bpf/helper-msg-apply-bytes.c   |  17 -
 .../gcc.target/bpf/helper-msg-cork-bytes.c    |  17 -
 .../gcc.target/bpf/helper-msg-pop-data.c      |  18 -
 .../gcc.target/bpf/helper-msg-pull-data.c     |  17 -
 .../gcc.target/bpf/helper-msg-push-data.c     |  18 -
 .../gcc.target/bpf/helper-msg-redirect-hash.c |  18 -
 .../gcc.target/bpf/helper-msg-redirect-map.c  |  18 -
 .../gcc.target/bpf/helper-override-return.c   |  17 -
 .../gcc.target/bpf/helper-perf-event-output.c |  18 -
 .../bpf/helper-perf-event-read-value.c        |  18 -
 .../gcc.target/bpf/helper-perf-event-read.c   |  17 -
 .../bpf/helper-perf-prog-read-value.c         |  17 -
 .../gcc.target/bpf/helper-probe-read-str.c    |  18 -
 .../gcc.target/bpf/helper-probe-read.c        |  17 -
 .../gcc.target/bpf/helper-probe-write-user.c  |  17 -
 .../gcc.target/bpf/helper-rc-keydown.c        |  18 -
 .../gcc.target/bpf/helper-rc-pointer-rel.c    |  17 -
 .../gcc.target/bpf/helper-rc-repeat.c         |  16 -
 .../gcc.target/bpf/helper-redirect-map.c      |  18 -
 .../gcc.target/bpf/helper-set-hash-invalid.c  |  15 -
 .../gcc.target/bpf/helper-set-hash.c          |  17 -
 .../gcc.target/bpf/helper-setsockopt.c        |  20 -
 .../gcc.target/bpf/helper-sk-fullsock.c       |  15 -
 .../gcc.target/bpf/helper-sk-lookup-tcp.c     |  21 -
 .../gcc.target/bpf/helper-sk-lookup-upd.c     |  21 -
 .../gcc.target/bpf/helper-sk-redirect-hash.c  |  17 -
 .../gcc.target/bpf/helper-sk-redirect-map.c   |  18 -
 .../gcc.target/bpf/helper-sk-release.c        |  16 -
 .../bpf/helper-sk-select-reuseport.c          |  18 -
 .../gcc.target/bpf/helper-sk-storage-delete.c |  16 -
 .../gcc.target/bpf/helper-sk-storage-get.c    |  17 -
 .../gcc.target/bpf/helper-skb-adjust-room.c   |  19 -
 ...p-id.c => helper-skb-ancestor-cgroup-id.c} |   6 +-
 .../gcc.target/bpf/helper-skb-cgroup-id.c     |  16 -
 .../gcc.target/bpf/helper-skb-change-head.c   |  18 -
 .../gcc.target/bpf/helper-skb-change-proto.c  |  18 -
 .../gcc.target/bpf/helper-skb-change-tail.c   |  18 -
 .../gcc.target/bpf/helper-skb-change-type.c   |  17 -
 .../gcc.target/bpf/helper-skb-ecn-set-ce.c    |  16 -
 .../bpf/helper-skb-get-tunnel-key.c           |  18 -
 .../bpf/helper-skb-get-tunnel-opt.c           |  18 -
 .../bpf/helper-skb-get-xfrm-state.c           |  19 -
 .../bpf/helper-skb-load-bytes-relative.c      |  19 -
 .../gcc.target/bpf/helper-skb-load-bytes.c    |  17 -
 .../gcc.target/bpf/helper-skb-pull-data.c     |  17 -
 .../bpf/helper-skb-set-tunnel-key.c           |  18 -
 .../bpf/helper-skb-set-tunnel-opt.c           |  18 -
 .../gcc.target/bpf/helper-skb-store-bytes.c   |  20 -
 .../gcc.target/bpf/helper-skb-under-cgroup.c  |  17 -
 .../gcc.target/bpf/helper-skb-vlan-pop.c      |  16 -
 .../gcc.target/bpf/helper-skb-vlan-push.c     |  18 -
 .../gcc.target/bpf/helper-skc-lookup-tcp.c    |  19 -
 .../gcc.target/bpf/helper-sock-hash-update.c  |  18 -
 .../gcc.target/bpf/helper-sock-map-update.c   |  17 -
 .../bpf/helper-sock-ops-cb-flags-set.c        |  17 -
 .../gcc.target/bpf/helper-spin-lock.c         |  15 -
 .../gcc.target/bpf/helper-spin-unlock.c       |  15 -
 gcc/testsuite/gcc.target/bpf/helper-strtol.c  |  20 -
 gcc/testsuite/gcc.target/bpf/helper-strtoul.c |  20 -
 .../bpf/helper-sysctl-get-current-value.c     |  18 -
 .../gcc.target/bpf/helper-sysctl-get-name.c   |  19 -
 .../bpf/helper-sysctl-get-new-value.c         |  18 -
 .../bpf/helper-sysctl-set-new-value.c         |  18 -
 .../gcc.target/bpf/helper-tail-call.c         |  17 -
 .../bpf/helper-tcp-check-syncookie.c          |  19 -
 .../gcc.target/bpf/helper-tcp-sock.c          |  15 -
 .../gcc.target/bpf/helper-trace-printk.c      |  16 -
 .../gcc.target/bpf/helper-xdp-adjust-head.c   |  17 -
 .../gcc.target/bpf/helper-xdp-adjust-meta.c   |  17 -
 .../gcc.target/bpf/helper-xdp-adjust-tail.c   |  16 -
 110 files changed, 7 insertions(+), 2254 deletions(-)
 delete mode 100644 gcc/config/bpf/bpf-helpers.h
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-bpf-redirect.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-clone-redirect.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-csum-diff.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-csum-update.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-current-task-under-cgroup.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-fib-lookup.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-cgroup-classid.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-cgroup-id.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-comm.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-pid-tgid.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-task.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-uid-gid.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-hash-recalc.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-listener-sock.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-local-storage.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-numa-node-id.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-prandom-u32.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-route-realm.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-smp-processor-id.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-socket-cookie.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-socket-uid.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-stack.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-stackid.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-getsockopt.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-ktime-get-ns.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-l3-csum-replace.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-l4-csum-replace.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-push-encap.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-action.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-adjust-srh.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-store-bytes.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-delete-elem.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-lookup-elem.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-peek-elem.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-pop-elem.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-push-elem.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-update-elem.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-apply-bytes.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-cork-bytes.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-pop-data.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-pull-data.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-push-data.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-redirect-hash.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-redirect-map.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-override-return.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-event-output.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-event-read-value.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-event-read.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-prog-read-value.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-probe-read-str.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-probe-read.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-probe-write-user.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-rc-keydown.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-rc-pointer-rel.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-rc-repeat.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-redirect-map.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-set-hash-invalid.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-set-hash.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-setsockopt.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-fullsock.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-lookup-tcp.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-lookup-upd.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-redirect-hash.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-redirect-map.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-release.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-select-reuseport.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-storage-delete.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-storage-get.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-adjust-room.c
 rename gcc/testsuite/gcc.target/bpf/{skb-ancestor-cgroup-id.c => helper-skb-ancestor-cgroup-id.c} (57%)
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-cgroup-id.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-head.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-proto.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-tail.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-type.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-ecn-set-ce.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-key.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-opt.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-get-xfrm-state.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes-relative.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-pull-data.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-key.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-opt.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-store-bytes.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-under-cgroup.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-vlan-pop.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-vlan-push.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-skc-lookup-tcp.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sock-hash-update.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sock-map-update.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sock-ops-cb-flags-set.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-spin-lock.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-spin-unlock.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-strtol.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-strtoul.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-get-current-value.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-get-name.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-get-new-value.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-set-new-value.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-tail-call.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-tcp-check-syncookie.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-tcp-sock.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-trace-printk.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-head.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-meta.c
 delete mode 100644 gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-tail.c
  

Patch

diff --git a/gcc/config.gcc b/gcc/config.gcc
index b88591b6fd8..d007550d326 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1651,7 +1651,6 @@  bpf-*-*)
         tm_file="elfos.h ${tm_file}"
         tmake_file="${tmake_file} bpf/t-bpf"
         use_collect2=no
-        extra_headers="bpf-helpers.h"
         use_gcc_stdint=provide
         extra_objs="coreout.o core-builtins.o"
         target_gtfiles="$target_gtfiles \$(srcdir)/config/bpf/coreout.cc \$(srcdir)/config/bpf/core-builtins.cc"
diff --git a/gcc/config/bpf/bpf-helpers.h b/gcc/config/bpf/bpf-helpers.h
deleted file mode 100644
index 4a6825cba79..00000000000
--- a/gcc/config/bpf/bpf-helpers.h
+++ /dev/null
@@ -1,427 +0,0 @@ 
-/* Copyright (C) 2019-2023 Free Software Foundation, Inc.
-
-   This file is part of GCC.
-
-   GCC is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
-
-   GCC is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   Under Section 7 of GPL version 3, you are granted additional
-   permissions described in the GCC Runtime Library Exception, version
-   3.1, as published by the Free Software Foundation.
-
-   You should have received a copy of the GNU General Public License and
-   a copy of the GCC Runtime Library Exception along with this program;
-   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* The purpose of this file is to provide a compatiblity layer with
-   the Linux kernel bpf_helpers.h header that is located in
-   linux/tools/testing/selftests/bpf/bpf_helpers.h.  That file is
-   currently llvm-specific.  */
-
-#ifndef __BPF_HELPERS_H
-#define __BPF_HELPERS_H
-
-#define SEC(NAME) __attribute__((section(NAME), used))
-#define KERNEL_HELPER(NUM) __attribute__((kernel_helper(NUM)))
-
-/* Flags used in some kernel helpers.  */
-
-#define BPF_ANY     0
-#define BPF_NOEXIST 1
-#define BPF_EXIST   2
-
-#define BPF_F_LOCK 4
-#define BPF_F_NO_COMMON_LRU (1U << 1)
-#define BPF_F_NUMA_NODE (1U << 2)
-
-/* Prototypes of functions to call kernel helpers.
-   Please keep these protoypes sorted by helper number.  */
-
-void *bpf_map_lookup_elem (void *map, const void *key)
-  KERNEL_HELPER (1);
-
-int bpf_map_update_elem (void *map, const void *key, const void *value,
-			 unsigned long long flags)
-  KERNEL_HELPER (2);
-
-int bpf_map_delete_elem (void *map, const void *key)
-  KERNEL_HELPER (3);
-
-int bpf_probe_read (void *dst, int size, const void *unsafe_ptr)
-  KERNEL_HELPER (4);
-
-unsigned long long bpf_ktime_get_ns (void)
-  KERNEL_HELPER (5);
-
-int bpf_trace_printk (const char *fmt, int fmt_size, ...)
-  KERNEL_HELPER (6);
-
-unsigned long long bpf_get_prandom_u32 (void)
-  KERNEL_HELPER (7);
-
-unsigned long long bpf_get_smp_processor_id (void)
-  KERNEL_HELPER (8);
-
-int bpf_skb_store_bytes (void *ctx, int off, void *from, int len,
-			 unsigned int start_header)
-  KERNEL_HELPER (9);
-
-int bpf_l3_csum_replace (void *ctx, int off, int from, int to, int flags)
-  KERNEL_HELPER (10);
-
-int bpf_l4_csum_replace (void *ctx, int off, int from, int to, int flags)
-  KERNEL_HELPER (11);
-
-int bpf_tail_call (void *ctx, void *map, unsigned int index)
-  KERNEL_HELPER (12);
-
-int bpf_clone_redirect (void *ctx, int ifindex, int flags)
-  KERNEL_HELPER (13);
-
-unsigned long long bpf_get_current_pid_tgid (void)
-  KERNEL_HELPER (14);
-
-unsigned long long bpf_get_current_uid_gid (void)
-  KERNEL_HELPER (15);
-
-int bpf_get_current_comm (void *buf, int buf_size)
-  KERNEL_HELPER (16);
-
-unsigned int bpf_get_cgroup_classid (void *ctx)
-  KERNEL_HELPER (17);
-
-int bpf_skb_vlan_push (void *ctx, short vlan_proto,
-		       unsigned short vlan_tci)
-  KERNEL_HELPER (18);
-
-int bpf_skb_vlan_pop (void *ctx)
-  KERNEL_HELPER (19);
-
-int bpf_skb_get_tunnel_key (void *ctx, void *key, int size, int flags)
-  KERNEL_HELPER (20);
-
-int bpf_skb_set_tunnel_key (void *ctx, void *key, int size, int flags)
-  KERNEL_HELPER (21);
-
-unsigned long long bpf_perf_event_read (void *map, unsigned long long flags)
-  KERNEL_HELPER (22);
-
-int bpf_redirect (int ifindex, int flags)
-  KERNEL_HELPER (23);
-
-unsigned int bpf_get_route_realm (void *ctx)
-  KERNEL_HELPER (24);
-
-int bpf_perf_event_output (void *ctx, void *map, unsigned long long flags,
-			   void *data, int size)
-  KERNEL_HELPER (25);
-
-int bpf_skb_load_bytes (void *ctx, int off, void *to, int len)
-  KERNEL_HELPER (26);
-
-int bpf_get_stackid (void *ctx, void *map, int flags)
-  KERNEL_HELPER (27);
-
-int bpf_csum_diff (void *from, int from_size, void *to, int to_size, int seed)
-  KERNEL_HELPER (28);
-
-int bpf_skb_get_tunnel_opt (void *ctx, void *md, int size)
-  KERNEL_HELPER (29);
-
-int bpf_skb_set_tunnel_opt (void *ctx, void *md, int size)
-  KERNEL_HELPER (30);
-
-int bpf_skb_change_proto (void *ctx, short proto, unsigned long flags)
-  KERNEL_HELPER (31);
-
-int bpf_skb_change_type (void *ctx, unsigned int type)
-  KERNEL_HELPER (32);
-
-int bpf_skb_under_cgroup (void *ctx, void *map, int index)
-  KERNEL_HELPER (33);
-
-unsigned int bpf_get_hash_recalc (void *ctx)
-  KERNEL_HELPER (34);
-
-unsigned long long bpf_get_current_task (void)
-  KERNEL_HELPER (35);
-
-int bpf_probe_write_user (void *dst, const void *src, int size)
-  KERNEL_HELPER (36);
-
-int bpf_current_task_under_cgroup (void *map, int index)
-  KERNEL_HELPER (37);
-
-int bpf_skb_change_tail (void *ctx, unsigned int len, unsigned long flags)
-  KERNEL_HELPER (38);
-
-int bpf_skb_pull_data (void *, int len)
-  KERNEL_HELPER (39);
-
-long long bpf_csum_update (void *ctx, unsigned int csum)
-  KERNEL_HELPER (40);
-
-void bpf_set_hash_invalid (void *ctx)
-  KERNEL_HELPER (41);
-
-int bpf_get_numa_node_id (void)
-  KERNEL_HELPER (42);
-
-int bpf_skb_change_head (void *, int len, int flags)
-  KERNEL_HELPER (43);
-
-int bpf_xdp_adjust_head (void *ctx, int offset)
-  KERNEL_HELPER (44);
-
-int bpf_probe_read_str (void *ctx, unsigned int size, const void *unsafe_ptr)
-  KERNEL_HELPER (45);
-
-int bpf_get_socket_cookie (void *ctx)
-  KERNEL_HELPER (46);
-
-unsigned int bpf_get_socket_uid (void *ctx)
-  KERNEL_HELPER (47);
-
-unsigned int bpf_set_hash (void *ctx, unsigned int hash)
-  KERNEL_HELPER (48);
-
-int bpf_setsockopt (void *ctx, int level, int optname, void *optval, int optlen)
-  KERNEL_HELPER (49);
-
-int bpf_skb_adjust_room (void *ctx, int len_diff, unsigned int mode,
-			 unsigned long long flags)
-  KERNEL_HELPER (50);
-
-int bpf_redirect_map (void *map, int key, int flags)
-  KERNEL_HELPER (51);
-
-int bpf_sk_redirect_map (void *ctx, void *map, int key, int flags)
-  KERNEL_HELPER (52);
-
-int bpf_sock_map_update (void *map, void *key, void *value,
-			 unsigned long long flags)
-  KERNEL_HELPER (53);
-
-int bpf_xdp_adjust_meta (void *ctx, int offset)
-  KERNEL_HELPER (54);
-
-int bpf_perf_event_read_value (void *map, unsigned long long flags,
-			       void *buf, unsigned int buf_size)
-  KERNEL_HELPER (55);
-
-int bpf_perf_prog_read_value (void *ctx, void *buf, unsigned int buf_size)
-  KERNEL_HELPER (56);
-
-int bpf_getsockopt (void *ctx, int level, int optname, void *optval,
-		    int optlen)
-  KERNEL_HELPER (57);
-
-int bpf_override_return (void *ctx, unsigned long rc)
-  KERNEL_HELPER (58);
-
-int bpf_sock_ops_cb_flags_set (void *ctx, int flags)
-  KERNEL_HELPER (59);
-
-int bpf_msg_redirect_map (void *ctx, void *map, int key, int flags)
-  KERNEL_HELPER (60);
-
-int bpf_msg_apply_bytes (void *ctx, int len)
-  KERNEL_HELPER (61);
-
-int bpf_msg_cork_bytes (void *ctx, int len)
-  KERNEL_HELPER (62);
-
-int bpf_msg_pull_data (void *, int len)
-  KERNEL_HELPER (63);
-
-int bpf_bind (void *ctx, void *addr, int addr_len)
-  KERNEL_HELPER (64);
-
-int bpf_xdp_adjust_tail (struct xdp_md *xdp_md, int delta)
-  KERNEL_HELPER (65);
-
-int bpf_skb_get_xfrm_state (void *ctx, int index, void *state,
-			    int size, int flags)
-  KERNEL_HELPER (66);
-
-int bpf_get_stack (void *ctx, void *buf, int size, int flags)
-  KERNEL_HELPER (67);
-
-int bpf_skb_load_bytes_relative (void *ctx, int off, void *to, int len,
-				 unsigned int start_header)
-  KERNEL_HELPER (68);
-
-int bpf_fib_lookup (void *ctx, struct bpf_fib_lookup *params,
-		    int plen, unsigned int flags)
-  KERNEL_HELPER (69);
-
-int bpf_sock_hash_update (void *map, void *key, void *value,
-			  unsigned long long flags)
-  KERNEL_HELPER (70);
-
-int bpf_msg_redirect_hash (void *ctx, void *map, void *key, int flags)
-  KERNEL_HELPER (71);
-
-int bpf_sk_redirect_hash (void *ctx, void *map, void *key, int flags)
-  KERNEL_HELPER (72);
-
-int bpf_lwt_push_encap (void *ctx, unsigned int type, void *hdr,
-			unsigned int len)
-  KERNEL_HELPER (73);
-
-int bpf_lwt_seg6_store_bytes (void *ctx, unsigned int offset,
-			      void *from, unsigned int len)
-  KERNEL_HELPER (74);
-
-int bpf_lwt_seg6_adjust_srh (void *ctx, unsigned int offset,
-			     unsigned int len)
-  KERNEL_HELPER (75);
-
-int bpf_lwt_seg6_action (void *ctx, unsigned int action, void *param,
-			 unsigned int param_len)
-  KERNEL_HELPER (76);
-
-int bpf_rc_repeat (void *ctx)
-  KERNEL_HELPER (77);
-
-int bpf_rc_keydown (void *ctx, unsigned int protocol,
-		    unsigned long long scancode, unsigned int toggle)
-  KERNEL_HELPER (78);
-
-unsigned bpf_skb_cgroup_id (void *ctx)
-  KERNEL_HELPER (79);
-
-unsigned long long bpf_get_current_cgroup_id (void)
-  KERNEL_HELPER (80);
-
-void *bpf_get_local_storage (void *map, unsigned long long flags)
-  KERNEL_HELPER (81);
-
-int bpf_sk_select_reuseport (void *ctx, void *map, void *key, unsigned int flags)
-  KERNEL_HELPER (82);
-
-unsigned long long bpf_skb_ancestor_cgroup_id (void *ctx, int level)
-  KERNEL_HELPER (83);
-
-struct bpf_sock *bpf_sk_lookup_tcp (void *ctx, struct bpf_sock_tuple *tuple,
-				    int size, unsigned long long netns_id,
-				    unsigned long long flags)
-  KERNEL_HELPER (84);
-
-struct bpf_sock *bpf_sk_lookup_udp (void *ctx, struct bpf_sock_tuple *tuple,
-				    int size, unsigned long long netns_id,
-				    unsigned long long flags)
-  KERNEL_HELPER (85);
-
-int bpf_sk_release (struct bpf_sock *sk)
-  KERNEL_HELPER (86);
-
-int bpf_map_push_elem (void *map, const void *value, unsigned long long flags)
-  KERNEL_HELPER (87);
-
-int bpf_map_pop_elem (void *map, void *value)
-  KERNEL_HELPER (88);
-
-int bpf_map_peek_elem (void *map, void *value)
-  KERNEL_HELPER (89);
-
-int bpf_msg_push_data (void *ctx, int start, int cut, int flags)
-  KERNEL_HELPER (90);
-
-int bpf_msg_pop_data (void *ctx, int start, int cut, int flags)
-  KERNEL_HELPER (91);
-
-int bpf_rc_pointer_rel (void *ctx, int rel_x, int rel_y)
-  KERNEL_HELPER (92);
-
-void bpf_spin_lock (struct bpf_spin_lock *lock)
-  KERNEL_HELPER (93);
-
-void bpf_spin_unlock (struct bpf_spin_lock *lock)
-  KERNEL_HELPER (94);
-
-struct bpf_sock *bpf_sk_fullsock (struct bpf_sock *sk)
-  KERNEL_HELPER (95);
-
-struct bpf_sock *bpf_tcp_sock (struct bpf_sock *sk)
-  KERNEL_HELPER (96);
-
-int bpf_skb_ecn_set_ce (void *ctx)
-  KERNEL_HELPER (97);
-
-struct bpf_sock *bpf_get_listener_sock (struct bpf_sock *sk)
-  KERNEL_HELPER (98);
-
-struct bpf_sock *bpf_skc_lookup_tcp (void *ctx,
-				     struct bpf_sock_tuple *tuple,
-				     unsigned int tuple_size,
-				     unsigned long netns,
-				     unsigned long flags)
-  KERNEL_HELPER (99);
-
-int bpf_tcp_check_syncookie (struct bpf_sock *sk, void *iph,
-			     unsigned int iph_len,
-			     struct tcp_hdr *th,
-			     unsigned int th_len)
-  KERNEL_HELPER (100);
-
-int bpf_sysctl_get_name (struct bpf_sysctl *ctx,
-			 char *buf, unsigned long buf_len,
-			 unsigned long flags)
-  KERNEL_HELPER (101);
-
-int bpf_sysctl_get_current_value (struct bpf_sysctl *ctx,
-				  char *buf, unsigned long buf_len)
-  KERNEL_HELPER (102);
-
-int bpf_sysctl_get_new_value (struct bpf_sysctl *ctx, char *buf,
-			      unsigned long buf_len)
-  KERNEL_HELPER (103);
-
-int bpf_sysctl_set_new_value (struct bpf_sysctl *ctx, const char *buf,
-			      unsigned long buf_len)
-  KERNEL_HELPER (104);
-
-int bpf_strtol (const char *buf, unsigned long buf_len,
-		unsigned long flags, long *res)
-  KERNEL_HELPER (105);
-
-int bpf_strtoul (const char *buf, unsigned long buf_len,
-		 unsigned long flags, unsigned long *res)
-  KERNEL_HELPER (106);
-
-void *bpf_sk_storage_get (void *map, struct bpf_sock *sk,
-			  void *value, long flags)
-  KERNEL_HELPER (107);
-
-int bpf_sk_storage_delete (void *map, struct bpf_sock *sk)
-  KERNEL_HELPER (108);
-
-/* Functions to emit BPF_LD_ABS and BPF_LD_IND instructions.  We
-   provide the "standard" names as synonyms of the corresponding GCC
-   builtins.  Note how the SKB argument is ignored.  */
-
-#define load_byte(SKB,OFF) __builtin_bpf_load_byte ((OFF))
-#define load_half(SKB,OFF) __builtin_bpf_load_half ((OFF))
-#define load_word(SKB,OFF) __builtin_bpf_load_word ((OFF))
-
-struct bpf_map_def
-{
-  unsigned int type;
-  unsigned int key_size;
-  unsigned int value_size;
-  unsigned int max_entries;
-  unsigned int map_flags;
-  unsigned int inner_map_idx;
-  unsigned int numa_node;
-};
-
-#endif /* ! __BPF_HELPERS_H */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-bind.c b/gcc/testsuite/gcc.target/bpf/helper-bind.c
index 8dfde242a23..53514ba3233 100644
--- a/gcc/testsuite/gcc.target/bpf/helper-bind.c
+++ b/gcc/testsuite/gcc.target/bpf/helper-bind.c
@@ -2,7 +2,9 @@ 
 /* { dg-options "-std=gnu99" } */
 
 #include <stdint.h>
-#include <bpf-helpers.h>
+
+int bpf_bind (void *ctx, void *addr, int addr_len)
+  __attribute__((kernel_helper(64)));
 
 void
 foo ()
diff --git a/gcc/testsuite/gcc.target/bpf/helper-bpf-redirect.c b/gcc/testsuite/gcc.target/bpf/helper-bpf-redirect.c
deleted file mode 100644
index 9937d5ab4cc..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-bpf-redirect.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  uint32_t ifindex;
-  uint64_t flags;
-
-  ret = bpf_redirect (ifindex, flags);
-}
-
-/* { dg-final { scan-assembler "call\t23" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-clone-redirect.c b/gcc/testsuite/gcc.target/bpf/helper-clone-redirect.c
deleted file mode 100644
index e38adbc40e7..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-clone-redirect.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint32_t ifindex;
-  uint64_t flags;
-
-  ret = bpf_clone_redirect (skb, ifindex, flags);
-}
-
-/* { dg-final { scan-assembler "call\t13" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-csum-diff.c b/gcc/testsuite/gcc.target/bpf/helper-csum-diff.c
deleted file mode 100644
index a1c8bf5a026..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-csum-diff.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int64_t ret;
-  int32_t *to, *from;
-  uint64_t to_size, from_size;
-  int seed;
-
-  ret = bpf_csum_diff (from, from_size, to, to_size, seed);
-}
-
-/* { dg-final { scan-assembler "call\t28" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-csum-update.c b/gcc/testsuite/gcc.target/bpf/helper-csum-update.c
deleted file mode 100644
index 4f65033acb4..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-csum-update.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int64_t ret;
-  void *skb;
-  int csum;
-
-  ret = bpf_csum_update (skb, csum);
-}
-
-/* { dg-final { scan-assembler "call\t40" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-current-task-under-cgroup.c b/gcc/testsuite/gcc.target/bpf/helper-current-task-under-cgroup.c
deleted file mode 100644
index 5b05378a730..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-current-task-under-cgroup.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *map;
-  uint32_t index;
-
-  ret = bpf_current_task_under_cgroup (map, index);
-}
-
-/* { dg-final { scan-assembler "call\t37" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-fib-lookup.c b/gcc/testsuite/gcc.target/bpf/helper-fib-lookup.c
deleted file mode 100644
index 8290234108a..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-fib-lookup.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx, *params;
-  int plen;
-  uint32_t flags;
-
-  ret = bpf_fib_lookup (ctx, params, plen, flags);
-}
-
-/* { dg-final { scan-assembler "call\t69" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-cgroup-classid.c b/gcc/testsuite/gcc.target/bpf/helper-get-cgroup-classid.c
deleted file mode 100644
index 5d85a89c632..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-cgroup-classid.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint32_t ret;
-  void *skb;
-
-  ret = bpf_get_cgroup_classid (skb);
-}
-
-/* { dg-final { scan-assembler "call\t17" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-current-cgroup-id.c b/gcc/testsuite/gcc.target/bpf/helper-get-current-cgroup-id.c
deleted file mode 100644
index 6f55e5167fa..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-current-cgroup-id.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint64_t ret;
-
-  ret = bpf_get_current_cgroup_id ();
-}
-
-/* { dg-final { scan-assembler "call\t80" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-current-comm.c b/gcc/testsuite/gcc.target/bpf/helper-get-current-comm.c
deleted file mode 100644
index 1e25cd1cc7e..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-current-comm.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *buf;
-  uint32_t size_of_buf;
-
-  ret = bpf_get_current_comm (buf, size_of_buf);
-}
-
-/* { dg-final { scan-assembler "call\t16" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-current-pid-tgid.c b/gcc/testsuite/gcc.target/bpf/helper-get-current-pid-tgid.c
deleted file mode 100644
index 1dd7a1e507b..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-current-pid-tgid.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint64_t ret;
-
-  ret = bpf_get_current_pid_tgid ();
-}
-
-/* { dg-final { scan-assembler "call\t14" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-current-task.c b/gcc/testsuite/gcc.target/bpf/helper-get-current-task.c
deleted file mode 100644
index 79344d15abf..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-current-task.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint64_t ret;
-
-  ret = bpf_get_current_task ();
-}
-
-/* { dg-final { scan-assembler "call\t35" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-current-uid-gid.c b/gcc/testsuite/gcc.target/bpf/helper-get-current-uid-gid.c
deleted file mode 100644
index b3e7261c35b..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-current-uid-gid.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint64_t ret;
-
-  ret = bpf_get_current_uid_gid ();
-}
-
-/* { dg-final { scan-assembler "call\t15" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-hash-recalc.c b/gcc/testsuite/gcc.target/bpf/helper-get-hash-recalc.c
deleted file mode 100644
index e9d87ae9bcc..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-hash-recalc.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint32_t ret;
-  void *skb;
-
-  ret = bpf_get_hash_recalc (skb);
-}
-
-/* { dg-final { scan-assembler "call\t34" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-listener-sock.c b/gcc/testsuite/gcc.target/bpf/helper-get-listener-sock.c
deleted file mode 100644
index 500ba787a3a..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-listener-sock.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  void *ret, *sk;
-
-  ret = bpf_get_listener_sock (sk);
-}
-
-/* { dg-final { scan-assembler "call\t98" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-local-storage.c b/gcc/testsuite/gcc.target/bpf/helper-get-local-storage.c
deleted file mode 100644
index 616342c4d62..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-local-storage.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  void *ret, *map;
-  uint64_t flags;
-
-  ret = bpf_get_local_storage (map, flags);
-}
-
-/* { dg-final { scan-assembler "call\t81" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-numa-node-id.c b/gcc/testsuite/gcc.target/bpf/helper-get-numa-node-id.c
deleted file mode 100644
index e6477a5c1ff..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-numa-node-id.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-
-  ret = bpf_get_numa_node_id ();
-}
-
-/* { dg-final { scan-assembler "call\t42" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-prandom-u32.c b/gcc/testsuite/gcc.target/bpf/helper-get-prandom-u32.c
deleted file mode 100644
index f30cafd36b0..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-prandom-u32.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint32_t ret;
-
-  ret = bpf_get_prandom_u32 ();
-}
-
-/* { dg-final { scan-assembler "call\t7" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-route-realm.c b/gcc/testsuite/gcc.target/bpf/helper-get-route-realm.c
deleted file mode 100644
index b7794307802..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-route-realm.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint32_t ret;
-  void *skb;
-
-  ret = bpf_get_route_realm (skb);
-}
-
-/* { dg-final { scan-assembler "call\t24" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-smp-processor-id.c b/gcc/testsuite/gcc.target/bpf/helper-get-smp-processor-id.c
deleted file mode 100644
index 7d0e9869826..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-smp-processor-id.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint32_t ret;
-
-  ret = bpf_get_smp_processor_id ();
-}
-
-/* { dg-final { scan-assembler "call\t8" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-socket-cookie.c b/gcc/testsuite/gcc.target/bpf/helper-get-socket-cookie.c
deleted file mode 100644
index e6c538578b7..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-socket-cookie.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint64_t ret;
-  void *skb;
-
-  ret = bpf_get_socket_cookie (skb);
-}
-
-/* { dg-final { scan-assembler "call\t46" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-socket-uid.c b/gcc/testsuite/gcc.target/bpf/helper-get-socket-uid.c
deleted file mode 100644
index c1eaa2b7c29..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-socket-uid.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint32_t ret;
-  void *skb;
-
-  ret = bpf_get_socket_uid (skb);
-}
-
-/* { dg-final { scan-assembler "call\t47" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-stack.c b/gcc/testsuite/gcc.target/bpf/helper-get-stack.c
deleted file mode 100644
index cc3f6a06bb2..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-stack.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *regs, *buf;
-  uint32_t size;
-  uint64_t flags;
-
-  ret = bpf_get_stack (regs, buf, size, flags);
-}
-
-/* { dg-final { scan-assembler "call\t67" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-stackid.c b/gcc/testsuite/gcc.target/bpf/helper-get-stackid.c
deleted file mode 100644
index cc3ecb01a05..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-get-stackid.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx, *map;
-  uint64_t flags;
-
-  ret = bpf_get_stackid (ctx, map, flags);
-}
-
-/* { dg-final { scan-assembler "call\t27" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-getsockopt.c b/gcc/testsuite/gcc.target/bpf/helper-getsockopt.c
deleted file mode 100644
index 3f71b6bfa6c..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-getsockopt.c
+++ /dev/null
@@ -1,19 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *bpf_socket;
-  int level, optname, optlen;
-  char *optval;
-
-  ret = bpf_getsockopt (bpf_socket, level,
-			optname, optval, optlen);
-}
-
-/* { dg-final { scan-assembler "call\t57" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-ktime-get-ns.c b/gcc/testsuite/gcc.target/bpf/helper-ktime-get-ns.c
deleted file mode 100644
index 77f1661f387..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-ktime-get-ns.c
+++ /dev/null
@@ -1,14 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint64_t ret;
-  ret = bpf_ktime_get_ns ();
-}
-
-/* { dg-final { scan-assembler "call\t5" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-l3-csum-replace.c b/gcc/testsuite/gcc.target/bpf/helper-l3-csum-replace.c
deleted file mode 100644
index c3f1b78397a..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-l3-csum-replace.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint32_t offset;
-  uint64_t from, to, size;
-
-  ret = bpf_l3_csum_replace (skb, offset, from, to, size);
-}
-
-/* { dg-final { scan-assembler "call\t10" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-l4-csum-replace.c b/gcc/testsuite/gcc.target/bpf/helper-l4-csum-replace.c
deleted file mode 100644
index fd54f0b5e88..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-l4-csum-replace.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint32_t offset;
-  uint64_t from, to, size;
-
-  ret = bpf_l4_csum_replace (skb, offset, from, to, size);
-}
-
-/* { dg-final { scan-assembler "call\t11" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-lwt-push-encap.c b/gcc/testsuite/gcc.target/bpf/helper-lwt-push-encap.c
deleted file mode 100644
index c6d82ccf8ba..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-lwt-push-encap.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb, *hdr;
-  uint32_t type, len;
-
-  ret = bpf_lwt_push_encap (skb, type, hdr, len);
-}
-
-/* { dg-final { scan-assembler "call\t73" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-action.c b/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-action.c
deleted file mode 100644
index 2fc7e48e526..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-action.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb, *param;
-  uint32_t action, param_len;
-
-  ret = bpf_lwt_seg6_action (skb, action,
-			     param, param_len);
-}
-
-/* { dg-final { scan-assembler "call\t76" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-adjust-srh.c b/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-adjust-srh.c
deleted file mode 100644
index 762ab411ef2..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-adjust-srh.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint32_t offset, delta;
-
-  ret = bpf_lwt_seg6_adjust_srh (skb, offset, delta);
-}
-
-/* { dg-final { scan-assembler "call\t75" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-store-bytes.c b/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-store-bytes.c
deleted file mode 100644
index 80a1f1205f0..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-store-bytes.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb, *from;
-  uint32_t offset, len;
-
-  ret = bpf_lwt_seg6_store_bytes (skb, offset, from, len);
-}
-
-/* { dg-final { scan-assembler "call\t74" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-delete-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-delete-elem.c
deleted file mode 100644
index 0200b15eb45..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-map-delete-elem.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <bpf-helpers.h>
-
-char *map () { return 0; }
-
-void
-foo ()
-{
-  int ret;
-  char *key = 0;
-
-  ret = bpf_map_delete_elem (map (), key);
-}
-
-/* { dg-final { scan-assembler "call\t3" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-lookup-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-lookup-elem.c
deleted file mode 100644
index 1d443a05138..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-map-lookup-elem.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <bpf-helpers.h>
-
-char *map () { return 0; }
-
-void
-foo ()
-{
-  char *key = 0, *value = 0;
-  value = bpf_map_lookup_elem (map (), key);
-}
-
-/* { dg-final { scan-assembler "call\t1" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-peek-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-peek-elem.c
deleted file mode 100644
index de833f202a9..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-map-peek-elem.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <bpf-helpers.h>
-
-char *map () { return 0; }
-
-void
-foo ()
-{
-  int ret;
-  char *value = 0;
-
-  ret = bpf_map_peek_elem (map (), value);
-}
-
-/* { dg-final { scan-assembler "call\t89" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-pop-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-pop-elem.c
deleted file mode 100644
index 7d76f853f38..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-map-pop-elem.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <bpf-helpers.h>
-
-char *map () { return 0; }
-
-void
-foo ()
-{
-  int ret;
-  char *value = 0;
-
-  ret = bpf_map_pop_elem (map (), value);
-}
-
-/* { dg-final { scan-assembler "call\t88" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-push-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-push-elem.c
deleted file mode 100644
index b4b2a8ef1ef..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-map-push-elem.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <bpf-helpers.h>
-
-char *map () { return 0; }
-
-void
-foo ()
-{
-  int ret;
-  char *value = 0;
-  long long flags = 0;
-
-  ret = bpf_map_push_elem (map (), value, flags);
-}
-
-/* { dg-final { scan-assembler "call\t87" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-update-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-update-elem.c
deleted file mode 100644
index 6cceafe62e3..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-map-update-elem.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <bpf-helpers.h>
-
-char *map () { return 0; }
-
-void
-foo ()
-{
-  int ret;
-  long long flags = 0;
-  char *key = 0, *value = 0;
-
-  ret = bpf_map_update_elem (map (), key, value, flags);
-}
-
-/* { dg-final { scan-assembler "call\t2" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-apply-bytes.c b/gcc/testsuite/gcc.target/bpf/helper-msg-apply-bytes.c
deleted file mode 100644
index e72035cff7c..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-msg-apply-bytes.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *msg;
-  uint32_t bytes;
-
-  ret = bpf_msg_apply_bytes (msg, bytes);
-}
-
-/* { dg-final { scan-assembler "call\t61" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-cork-bytes.c b/gcc/testsuite/gcc.target/bpf/helper-msg-cork-bytes.c
deleted file mode 100644
index 350c2bfa0e6..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-msg-cork-bytes.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *msg;
-  uint32_t bytes;
-
-  ret = bpf_msg_cork_bytes (msg, bytes);
-}
-
-/* { dg-final { scan-assembler "call\t62" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-pop-data.c b/gcc/testsuite/gcc.target/bpf/helper-msg-pop-data.c
deleted file mode 100644
index 567904433f9..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-msg-pop-data.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint32_t start, pop;
-  uint64_t flags;
-
-  ret = bpf_msg_pop_data (skb, start, pop, flags);
-}
-
-/* { dg-final { scan-assembler "call\t91" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-pull-data.c b/gcc/testsuite/gcc.target/bpf/helper-msg-pull-data.c
deleted file mode 100644
index 98d343b0295..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-msg-pull-data.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *msg;
-  int len;
-
-  ret = bpf_msg_pull_data (msg, len);
-}
-
-/* { dg-final { scan-assembler "call\t63" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-push-data.c b/gcc/testsuite/gcc.target/bpf/helper-msg-push-data.c
deleted file mode 100644
index 40b936162fc..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-msg-push-data.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint32_t start, len;
-  uint64_t flags;
-
-  ret = bpf_msg_push_data (skb, start, len, flags);
-}
-
-/* { dg-final { scan-assembler "call\t90" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-hash.c b/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-hash.c
deleted file mode 100644
index 6ac680cc098..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-hash.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *msg, *map, *key;
-  uint64_t flags;
-
-  ret = bpf_msg_redirect_hash (msg, map, key,
-						flags);
-}
-
-/* { dg-final { scan-assembler "call\t71" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-map.c b/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-map.c
deleted file mode 100644
index ed7652bfc90..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-map.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *msg, *map;
-  uint64_t key;
-  uint64_t flags;
-
-  ret = bpf_msg_redirect_map (msg, map, key, flags);
-}
-
-/* { dg-final { scan-assembler "call\t60" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-override-return.c b/gcc/testsuite/gcc.target/bpf/helper-override-return.c
deleted file mode 100644
index 50366861c1d..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-override-return.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *regs;
-  uint64_t rc;
-
-  ret = bpf_override_return (regs, rc);
-}
-
-/* { dg-final { scan-assembler "call\t58" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-perf-event-output.c b/gcc/testsuite/gcc.target/bpf/helper-perf-event-output.c
deleted file mode 100644
index 24ed565097e..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-perf-event-output.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx, *map;
-  uint64_t flags;
-  void *data;
-  uint64_t size;
-
-  ret = bpf_perf_event_output (ctx, map, flags, data, size);
-}
-
-/* { dg-final { scan-assembler "call\t25" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-perf-event-read-value.c b/gcc/testsuite/gcc.target/bpf/helper-perf-event-read-value.c
deleted file mode 100644
index 6e6184f4512..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-perf-event-read-value.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *map, *buf;
-  uint64_t flags;
-  uint64_t buf_size;
-
-  ret = bpf_perf_event_read_value (map, flags, buf, buf_size);
-}
-
-/* { dg-final { scan-assembler "call\t55" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-perf-event-read.c b/gcc/testsuite/gcc.target/bpf/helper-perf-event-read.c
deleted file mode 100644
index 674058daa8d..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-perf-event-read.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint64_t ret;
-  void *map;
-  uint64_t flags;
-
-  ret = bpf_perf_event_read (map, flags);
-}
-
-/* { dg-final { scan-assembler "call\t22" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-perf-prog-read-value.c b/gcc/testsuite/gcc.target/bpf/helper-perf-prog-read-value.c
deleted file mode 100644
index 341a541838d..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-perf-prog-read-value.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx, *buf;
-  uint64_t buf_size;
-
-  ret = bpf_perf_prog_read_value (ctx, buf, buf_size);
-}
-
-/* { dg-final { scan-assembler "call\t56" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-probe-read-str.c b/gcc/testsuite/gcc.target/bpf/helper-probe-read-str.c
deleted file mode 100644
index 02d1a07cb4a..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-probe-read-str.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  int size;
-  void *dst;
-  const void *unsafe_ptr;
-
-  ret = bpf_probe_read_str (dst, size, unsafe_ptr);
-}
-
-/* { dg-final { scan-assembler "call\t45" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-probe-read.c b/gcc/testsuite/gcc.target/bpf/helper-probe-read.c
deleted file mode 100644
index 64261c56f92..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-probe-read.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *src, *dst;
-  uint32_t size;
-
-  ret = bpf_probe_read (dst, size, src);
-}
-
-/* { dg-final { scan-assembler "call\t4" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-probe-write-user.c b/gcc/testsuite/gcc.target/bpf/helper-probe-write-user.c
deleted file mode 100644
index 127ae61c8a4..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-probe-write-user.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *dst, *src;
-  uint32_t len;
-
-  ret = bpf_probe_write_user (dst, src, len);
-}
-
-/* { dg-final { scan-assembler "call\t36" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-rc-keydown.c b/gcc/testsuite/gcc.target/bpf/helper-rc-keydown.c
deleted file mode 100644
index dd90423b14b..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-rc-keydown.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx;
-  uint32_t protocol, toggle;
-  uint64_t scancode;
-
-  ret = bpf_rc_keydown (ctx, protocol, scancode, toggle);
-}
-
-/* { dg-final { scan-assembler "call\t78" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-rc-pointer-rel.c b/gcc/testsuite/gcc.target/bpf/helper-rc-pointer-rel.c
deleted file mode 100644
index ca0a5c4ac75..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-rc-pointer-rel.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx;
-  int32_t rel_x, rel_y;
-
-  ret = bpf_rc_pointer_rel (ctx, rel_x, rel_y);
-}
-
-/* { dg-final { scan-assembler "call\t92" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-rc-repeat.c b/gcc/testsuite/gcc.target/bpf/helper-rc-repeat.c
deleted file mode 100644
index 79d3b5c5fdf..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-rc-repeat.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx;
-
-  ret = bpf_rc_repeat (ctx);
-}
-
-/* { dg-final { scan-assembler "call\t77" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-redirect-map.c b/gcc/testsuite/gcc.target/bpf/helper-redirect-map.c
deleted file mode 100644
index 50b3e814893..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-redirect-map.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *map;
-  uint32_t key;
-  uint64_t flags;
-
-  ret = bpf_redirect_map (map, key, flags);
-}
-
-/* { dg-final { scan-assembler "call\t51" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-set-hash-invalid.c b/gcc/testsuite/gcc.target/bpf/helper-set-hash-invalid.c
deleted file mode 100644
index adbc41bce19..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-set-hash-invalid.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  void *skb;
-
-  bpf_set_hash_invalid (skb);
-}
-
-/* { dg-final { scan-assembler "call\t41" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-set-hash.c b/gcc/testsuite/gcc.target/bpf/helper-set-hash.c
deleted file mode 100644
index cafe5399c7d..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-set-hash.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint32_t ret;
-  void *skb;
-  uint32_t hash;
-
-  ret = bpf_set_hash (skb, hash);
-}
-
-/* { dg-final { scan-assembler "call\t48" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-setsockopt.c b/gcc/testsuite/gcc.target/bpf/helper-setsockopt.c
deleted file mode 100644
index 930b8b2f2a0..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-setsockopt.c
+++ /dev/null
@@ -1,20 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *bpf_socket;
-  int level;
-  int optname;
-  void *optval;
-  int optlen;
-
-  ret = bpf_setsockopt (bpf_socket, level, optname, optval, optlen);
-}
-
-/* { dg-final { scan-assembler "call\t49" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-fullsock.c b/gcc/testsuite/gcc.target/bpf/helper-sk-fullsock.c
deleted file mode 100644
index 9e66e94f57f..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sk-fullsock.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  void *ret, *sk;
-
-  ret = bpf_sk_fullsock (sk);
-}
-
-/* { dg-final { scan-assembler "call\t95" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-tcp.c b/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-tcp.c
deleted file mode 100644
index 9d48c4cecf7..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-tcp.c
+++ /dev/null
@@ -1,21 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  void *ret;
-  void *ctx, *tuple;
-  uint32_t tuple_size;
-  uint64_t netns, flags;
-
-  ret = bpf_sk_lookup_tcp (ctx,
-			   tuple,
-			   tuple_size,
-			   netns, flags);
-}
-
-/* { dg-final { scan-assembler "call\t84" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-upd.c b/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-upd.c
deleted file mode 100644
index f41fd327c83..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-upd.c
+++ /dev/null
@@ -1,21 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  void *ret;
-  void *ctx, *tuple;
-  uint32_t tuple_size;
-  uint64_t netns, flags;
-
-  ret = bpf_sk_lookup_udp (ctx,
-			   tuple,
-			   tuple_size,
-			   netns, flags);
-}
-
-/* { dg-final { scan-assembler "call\t85" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-hash.c b/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-hash.c
deleted file mode 100644
index f449b5b8254..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-hash.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb, *map, *key;
-  uint64_t flags;
-
-  ret = bpf_sk_redirect_hash (skb, map, key, flags);
-}
-
-/* { dg-final { scan-assembler "call\t72" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-map.c b/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-map.c
deleted file mode 100644
index 42aab8a954b..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-map.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx, *map;
-  uint32_t key;
-  uint64_t flags;
-
-  ret = bpf_sk_redirect_map (ctx, map, key, flags);
-}
-
-/* { dg-final { scan-assembler "call\t52" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-release.c b/gcc/testsuite/gcc.target/bpf/helper-sk-release.c
deleted file mode 100644
index b01412c751b..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sk-release.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *sock;
-
-  ret = bpf_sk_release (sock);
-}
-
-/* { dg-final { scan-assembler "call\t86" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-select-reuseport.c b/gcc/testsuite/gcc.target/bpf/helper-sk-select-reuseport.c
deleted file mode 100644
index b1a28020297..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sk-select-reuseport.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *reuse, *map, *key;
-  uint64_t flags;
-
-  ret = bpf_sk_select_reuseport (reuse, map,
-				 key, flags);
-}
-
-/* { dg-final { scan-assembler "call\t82" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-storage-delete.c b/gcc/testsuite/gcc.target/bpf/helper-sk-storage-delete.c
deleted file mode 100644
index ea36a3d6a1c..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sk-storage-delete.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *map, *sk;
-
-  ret = bpf_sk_storage_delete (map, sk);
-}
-
-/* { dg-final { scan-assembler "call\t108" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-storage-get.c b/gcc/testsuite/gcc.target/bpf/helper-sk-storage-get.c
deleted file mode 100644
index 1ea0e7b12f7..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sk-storage-get.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  void *ret;
-  void *map, *sk, *value;
-  uint64_t flags;
-
-  ret = bpf_sk_storage_get (map, sk, value, flags);
-}
-
-/* { dg-final { scan-assembler "call\t107" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-adjust-room.c b/gcc/testsuite/gcc.target/bpf/helper-skb-adjust-room.c
deleted file mode 100644
index 3bce73fa852..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-adjust-room.c
+++ /dev/null
@@ -1,19 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  int32_t len_diff;
-  uint32_t mode;
-  uint64_t flags;
-
-  ret = bpf_skb_adjust_room (skb, len_diff, mode, flags);
-}
-
-/* { dg-final { scan-assembler "call\t50" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/skb-ancestor-cgroup-id.c b/gcc/testsuite/gcc.target/bpf/helper-skb-ancestor-cgroup-id.c
similarity index 57%
rename from gcc/testsuite/gcc.target/bpf/skb-ancestor-cgroup-id.c
rename to gcc/testsuite/gcc.target/bpf/helper-skb-ancestor-cgroup-id.c
index 13ccf36b4d6..693f390b9bb 100644
--- a/gcc/testsuite/gcc.target/bpf/skb-ancestor-cgroup-id.c
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-ancestor-cgroup-id.c
@@ -1,8 +1,10 @@ 
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
+/* { dg-options "-std=gnu99 -O2" } */
 
 #include <stdint.h>
-#include <bpf-helpers.h>
+
+struct __sk_buff;
+static uint64_t (*bpf_skb_ancestor_cgroup_id)(struct __sk_buff *skb, int ancestor_level) = (void *) 83;
 
 void
 foo ()
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-cgroup-id.c b/gcc/testsuite/gcc.target/bpf/helper-skb-cgroup-id.c
deleted file mode 100644
index 5085c756b9c..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-cgroup-id.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  uint64_t ret;
-  void *skb;
-
-  ret = bpf_skb_cgroup_id (skb);
-}
-
-/* { dg-final { scan-assembler "call\t79" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-change-head.c b/gcc/testsuite/gcc.target/bpf/helper-skb-change-head.c
deleted file mode 100644
index 281104b6152..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-change-head.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint32_t len;
-  uint64_t flags;
-
-  ret = bpf_skb_change_head (skb, len, flags);
-}
-
-/* { dg-final { scan-assembler "call\t43" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-change-proto.c b/gcc/testsuite/gcc.target/bpf/helper-skb-change-proto.c
deleted file mode 100644
index a41d197fd52..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-change-proto.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  int16_t proto;
-  uint64_t flags;
-
-  ret = bpf_skb_change_proto (skb, proto, flags);
-}
-
-/* { dg-final { scan-assembler "call\t31" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-change-tail.c b/gcc/testsuite/gcc.target/bpf/helper-skb-change-tail.c
deleted file mode 100644
index 2bfc5979a92..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-change-tail.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint32_t len;
-  uint64_t flags;
-
-  ret = bpf_skb_change_tail (skb, len, flags);
-}
-
-/* { dg-final { scan-assembler "call\t38" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-change-type.c b/gcc/testsuite/gcc.target/bpf/helper-skb-change-type.c
deleted file mode 100644
index 46a94213fb3..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-change-type.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint32_t type;
-
-  ret = bpf_skb_change_type (skb, type);
-}
-
-/* { dg-final { scan-assembler "call\t32" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-ecn-set-ce.c b/gcc/testsuite/gcc.target/bpf/helper-skb-ecn-set-ce.c
deleted file mode 100644
index c028ec1d6bb..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-ecn-set-ce.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-
-  ret = bpf_skb_ecn_set_ce (skb);
-}
-
-/* { dg-final { scan-assembler "call\t97" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-key.c b/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-key.c
deleted file mode 100644
index aad847256ec..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-key.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb, *key;
-  uint32_t size;
-  uint64_t flags;
-
-  ret = bpf_skb_get_tunnel_key (skb, key, size, flags);
-}
-
-/* { dg-final { scan-assembler "call\t20" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-opt.c b/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-opt.c
deleted file mode 100644
index 0b39ad728a1..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-opt.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint8_t *opt;
-  uint32_t size;
-
-  ret = bpf_skb_get_tunnel_opt (skb, opt, size);
-}
-
-/* { dg-final { scan-assembler "call\t29" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-get-xfrm-state.c b/gcc/testsuite/gcc.target/bpf/helper-skb-get-xfrm-state.c
deleted file mode 100644
index de83d91849e..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-get-xfrm-state.c
+++ /dev/null
@@ -1,19 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb, *xfrm_state;
-  uint32_t index, size;
-  uint64_t flags;
-
-  ret = bpf_skb_get_xfrm_state (skb, index,
-				xfrm_state, size, flags);
-}
-
-/* { dg-final { scan-assembler "call\t66" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes-relative.c b/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes-relative.c
deleted file mode 100644
index cd8c2c2437e..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes-relative.c
+++ /dev/null
@@ -1,19 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb, *to;
-  uint32_t offset, len, start_header;
-
-  ret = bpf_skb_load_bytes_relative (skb, offset,
-				     to, len,
-				     start_header);
-}
-
-/* { dg-final { scan-assembler "call\t68" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes.c b/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes.c
deleted file mode 100644
index 1e4612a5c98..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb, *to;
-  uint32_t offset, len;
-
-  ret = bpf_skb_load_bytes (skb, offset, to, len);
-}
-
-/* { dg-final { scan-assembler "call\t26" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-pull-data.c b/gcc/testsuite/gcc.target/bpf/helper-skb-pull-data.c
deleted file mode 100644
index 579d8562e3d..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-pull-data.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint32_t len;
-
-  ret = bpf_skb_pull_data (skb, len);
-}
-
-/* { dg-final { scan-assembler "call\t39" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-key.c b/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-key.c
deleted file mode 100644
index 85754fdb88a..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-key.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb, *key;
-  uint32_t size;
-  uint64_t flags;
-
-  ret = bpf_skb_set_tunnel_key (skb, key, size, flags);
-}
-
-/* { dg-final { scan-assembler "call\t21" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-opt.c b/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-opt.c
deleted file mode 100644
index 591eb48d6ad..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-opt.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint8_t *opt;
-  uint32_t size;
-
-  ret = bpf_skb_set_tunnel_opt (skb, opt, size);
-}
-
-/* { dg-final { scan-assembler "call\t30" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-store-bytes.c b/gcc/testsuite/gcc.target/bpf/helper-skb-store-bytes.c
deleted file mode 100644
index 17f8e02e55c..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-store-bytes.c
+++ /dev/null
@@ -1,20 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  uint32_t offset;
-  void *from;
-  uint32_t len;
-  uint64_t flags;
-
-  ret = bpf_skb_store_bytes (skb, offset, from, len, flags);
-}
-
-/* { dg-final { scan-assembler "call\t9" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-under-cgroup.c b/gcc/testsuite/gcc.target/bpf/helper-skb-under-cgroup.c
deleted file mode 100644
index 72adfcd9f3f..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-under-cgroup.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb, *map;
-  uint32_t index;
-
-  ret = bpf_skb_under_cgroup (skb, map, index);
-}
-
-/* { dg-final { scan-assembler "call\t33" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-pop.c b/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-pop.c
deleted file mode 100644
index 4d5b347d6da..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-pop.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-
-  ret = bpf_skb_vlan_pop (skb);
-}
-
-/* { dg-final { scan-assembler "call\t19" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-push.c b/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-push.c
deleted file mode 100644
index 1a43bd42e07..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-push.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skb;
-  int16_t vlan_proto;
-  uint16_t vlan_tci;
-
-  ret = bpf_skb_vlan_push (skb, vlan_proto, vlan_tci);
-}
-
-/* { dg-final { scan-assembler "call\t18" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skc-lookup-tcp.c b/gcc/testsuite/gcc.target/bpf/helper-skc-lookup-tcp.c
deleted file mode 100644
index 8ed2d46c813..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-skc-lookup-tcp.c
+++ /dev/null
@@ -1,19 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  void *ret;
-  void *ctx, *tuple;
-  uint32_t tuple_size;
-  uint64_t netns, flags;
-
-  ret = bpf_skc_lookup_tcp (ctx, tuple,
-			    tuple_size, netns, flags);
-}
-
-/* { dg-final { scan-assembler "call\t99" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sock-hash-update.c b/gcc/testsuite/gcc.target/bpf/helper-sock-hash-update.c
deleted file mode 100644
index 81ff4dd7e8b..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sock-hash-update.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skops, *map, *key;
-  uint64_t flags;
-
-  ret = bpf_sock_hash_update (skops, map, key,
-					       flags);
-}
-
-/* { dg-final { scan-assembler "call\t70" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sock-map-update.c b/gcc/testsuite/gcc.target/bpf/helper-sock-map-update.c
deleted file mode 100644
index b263583be45..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sock-map-update.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *skops, *map, *key;
-  uint64_t flags;
-
-  ret = bpf_sock_map_update (skops, map, key, flags);
-}
-
-/* { dg-final { scan-assembler "call\t53" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sock-ops-cb-flags-set.c b/gcc/testsuite/gcc.target/bpf/helper-sock-ops-cb-flags-set.c
deleted file mode 100644
index 7a98fa9b92e..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sock-ops-cb-flags-set.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *bpf_sock;
-  int argval;
-
-  ret = bpf_sock_ops_cb_flags_set (bpf_sock, argval);
-}
-
-/* { dg-final { scan-assembler "call\t59" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-spin-lock.c b/gcc/testsuite/gcc.target/bpf/helper-spin-lock.c
deleted file mode 100644
index 8358e88fd9e..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-spin-lock.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  void *lock;
-
-  bpf_spin_lock (lock);
-}
-
-/* { dg-final { scan-assembler "call\t93" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-spin-unlock.c b/gcc/testsuite/gcc.target/bpf/helper-spin-unlock.c
deleted file mode 100644
index 400695f7aae..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-spin-unlock.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  void *lock;
-
-  bpf_spin_unlock (lock);
-}
-
-/* { dg-final { scan-assembler "call\t94" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-strtol.c b/gcc/testsuite/gcc.target/bpf/helper-strtol.c
deleted file mode 100644
index d98a0a7c565..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-strtol.c
+++ /dev/null
@@ -1,20 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <stddef.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *buf;
-  long res;
-  uint64_t flags;
-  size_t buf_len;
-
-  ret = bpf_strtol (buf, buf_len, flags, &res);
-}
-
-/* { dg-final { scan-assembler "call\t105" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-strtoul.c b/gcc/testsuite/gcc.target/bpf/helper-strtoul.c
deleted file mode 100644
index f68abf2f7d7..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-strtoul.c
+++ /dev/null
@@ -1,20 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <stddef.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *buf;
-  unsigned long res;
-  uint64_t flags;
-  size_t buf_len;
-
-  ret = bpf_strtoul (buf, buf_len, flags, &res);
-}
-
-/* { dg-final { scan-assembler "call\t106" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-current-value.c b/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-current-value.c
deleted file mode 100644
index a1f6529f356..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-current-value.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <stddef.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx, *buf;
-  size_t buf_len;
-
-  ret = bpf_sysctl_get_current_value (ctx, buf, buf_len);
-}
-
-/* { dg-final { scan-assembler "call\t102" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-name.c b/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-name.c
deleted file mode 100644
index ca9c42ba6a8..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-name.c
+++ /dev/null
@@ -1,19 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <stddef.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx, *buf;
-  size_t buf_len;
-  uint64_t flags;
-
-  ret = bpf_sysctl_get_name (ctx, buf, buf_len, flags);
-}
-
-/* { dg-final { scan-assembler "call\t101" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-new-value.c b/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-new-value.c
deleted file mode 100644
index d22b214d67b..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-new-value.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <stddef.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx, *buf;
-  size_t buf_len;
-
-  ret = bpf_sysctl_get_new_value (ctx, buf, buf_len);
-}
-
-/* { dg-final { scan-assembler "call\t103" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sysctl-set-new-value.c b/gcc/testsuite/gcc.target/bpf/helper-sysctl-set-new-value.c
deleted file mode 100644
index 78004c252a9..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-sysctl-set-new-value.c
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <stddef.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx, *buf;
-  size_t buf_len;
-
-  ret = bpf_sysctl_set_new_value (ctx, buf, buf_len);
-}
-
-/* { dg-final { scan-assembler "call\t104" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-tail-call.c b/gcc/testsuite/gcc.target/bpf/helper-tail-call.c
deleted file mode 100644
index 0f35b00a786..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-tail-call.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *ctx, *prog_array_map;
-  uint32_t index;
-
-  ret = bpf_tail_call (ctx, prog_array_map, index);
-}
-
-/* { dg-final { scan-assembler "call\t12" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-tcp-check-syncookie.c b/gcc/testsuite/gcc.target/bpf/helper-tcp-check-syncookie.c
deleted file mode 100644
index 06210bb2959..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-tcp-check-syncookie.c
+++ /dev/null
@@ -1,19 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *sk, *iph, *th;
-  uint32_t iph_len, th_len;
-
-  ret = bpf_tcp_check_syncookie (sk, iph,
-				 iph_len,
-				 th, th_len);
-}
-
-/* { dg-final { scan-assembler "call\t100" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-tcp-sock.c b/gcc/testsuite/gcc.target/bpf/helper-tcp-sock.c
deleted file mode 100644
index cd6d995f5bf..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-tcp-sock.c
+++ /dev/null
@@ -1,15 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  void *ret, *sk;
-
-  ret = bpf_tcp_sock (sk);
-}
-
-/* { dg-final { scan-assembler "call\t96" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-trace-printk.c b/gcc/testsuite/gcc.target/bpf/helper-trace-printk.c
deleted file mode 100644
index 135ae295d84..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-trace-printk.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <bpf-helpers.h>
-
-char *map () { return 0; }
-
-void
-foo ()
-{
-  int ret;
-
-  ret = bpf_trace_printk ("foo %d %d", sizeof ("foo %d %d"), 10, 20);
-}
-
-/* { dg-final { scan-assembler "call\t6" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-head.c b/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-head.c
deleted file mode 100644
index ac6fef43587..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-head.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *xdp_md;
-  int delta;
-
-  ret = bpf_xdp_adjust_head (xdp_md, delta);
-}
-
-/* { dg-final { scan-assembler "call\t44" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-meta.c b/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-meta.c
deleted file mode 100644
index 13793508116..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-meta.c
+++ /dev/null
@@ -1,17 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *xdp_md;
-  int delta;
-
-  ret = bpf_xdp_adjust_meta (xdp_md, delta);
-}
-
-/* { dg-final { scan-assembler "call\t54" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-tail.c b/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-tail.c
deleted file mode 100644
index db55168144b..00000000000
--- a/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-tail.c
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* { dg-do compile } */
-
-#include <stdint.h>
-#include <bpf-helpers.h>
-
-void
-foo ()
-{
-  int ret;
-  void *xdp_md;
-  int delta;
-
-  ret = bpf_xdp_adjust_tail (xdp_md, delta);
-}
-
-/* { dg-final { scan-assembler "call\t65" } } */