This patch is a little cleanup that removes trailing whitespaces from
the bpf backend source files.
(cherry pick of commit
e87c540fe43e29663140ed67b98ee437c25696bb)
2020-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
gcc/
* config/bpf/bpf.md: Remove trailing whitespaces.
* config/bpf/constraints.md: Likewise.
* config/bpf/predicates.md: Likewise.
gcc/testsuite/
* gcc.target/bpf/diag-funargs-2.c: Remove trailing whitespaces.
* gcc.target/bpf/skb-ancestor-cgroup-id.c: Likewise.
* gcc.target/bpf/helper-xdp-adjust-meta.c: Likewise.
* gcc.target/bpf/helper-xdp-adjust-head.c: Likewise.
* gcc.target/bpf/helper-tcp-check-syncookie.c: Likewise.
* gcc.target/bpf/helper-sock-ops-cb-flags-set.c
* gcc.target/bpf/helper-sysctl-set-new-value.c: Likewise.
* gcc.target/bpf/helper-sysctl-get-new-value.c: Likewise.
* gcc.target/bpf/helper-sysctl-get-name.c: Likewise.
* gcc.target/bpf/helper-sysctl-get-current-value.c: Likewise.
* gcc.target/bpf/helper-strtoul.c: Likewise.
* gcc.target/bpf/helper-strtol.c: Likewise.
* gcc.target/bpf/helper-sock-map-update.c: Likewise.
* gcc.target/bpf/helper-sk-storage-get.c: Likewise.
* gcc.target/bpf/helper-sk-storage-delete.c: Likewise.
* gcc.target/bpf/helper-sk-select-reuseport.c: Likewise.
* gcc.target/bpf/helper-sk-release.c: Likewise.
* gcc.target/bpf/helper-sk-redirect-map.c: Likewise.
* gcc.target/bpf/helper-sk-lookup-upd.c: Likewise.
* gcc.target/bpf/helper-sk-lookup-tcp.c: Likewise.
* gcc.target/bpf/helper-skb-change-head.c: Likewise.
* gcc.target/bpf/helper-skb-cgroup-id.c: Likewise.
* gcc.target/bpf/helper-skb-adjust-room.c: Likewise.
* gcc.target/bpf/helper-set-hash.c: Likewise.
* gcc.target/bpf/helper-setsockopt.c: Likewise.
* gcc.target/bpf/helper-redirect-map.c: Likewise.
* gcc.target/bpf/helper-rc-repeat.c: Likewise.
* gcc.target/bpf/helper-rc-keydown.c: Likewise.
* gcc.target/bpf/helper-probe-read-str.c: Likewise.
* gcc.target/bpf/helper-perf-prog-read-value.c: Likewise.
* gcc.target/bpf/helper-perf-event-read-value.c: Likewise.
* gcc.target/bpf/helper-override-return.c: Likewise.
* gcc.target/bpf/helper-msg-redirect-map.c: Likewise.
* gcc.target/bpf/helper-msg-pull-data.c: Likewise.
* gcc.target/bpf/helper-msg-cork-bytes.c: Likewise.
* gcc.target/bpf/helper-msg-apply-bytes.c: Likewise.
* gcc.target/bpf/helper-lwt-seg6-store-bytes.c: Likewise.
* gcc.target/bpf/helper-lwt-seg6-adjust-srh.c: Likewise.
* gcc.target/bpf/helper-lwt-seg6-action.c: Likewise.
* gcc.target/bpf/helper-lwt-push-encap.c: Likewise.
* gcc.target/bpf/helper-get-socket-uid.c: Likewise.
* gcc.target/bpf/helper-get-socket-cookie.c: Likewise.
* gcc.target/bpf/helper-get-local-storage.c: Likewise.
* gcc.target/bpf/helper-get-current-cgroup-id.c: Likewise.
* gcc.target/bpf/helper-getsockopt.c: Likewise.
* gcc.target/bpf/diag-funargs-3.c: Likewise.
{
if (!register_operand(operands[0], <MM:MODE>mode)
&& !register_operand(operands[1], <MM:MODE>mode))
- operands[1] = force_reg (<MM:MODE>mode, operands[1]);
+ operands[1] = force_reg (<MM:MODE>mode, operands[1]);
}")
(define_insn "*mov<MM:mode>"
(define_constraint "S"
"A constant call address."
(match_code "const,symbol_ref,label_ref,const_int"))
-
(define_predicate "register_compare_operator"
(match_code "eq,ne,geu,gtu,ge,gt"))
-
jorl (je, 1, 2, 3); /* { dg-error "too many function arguments" } */
return 2L /1;
}
-
jorl (je, 1, 2, 3, 4); /* { dg-error "too many function arguments" } */
return 2L /1;
}
-
foo ()
{
uint64_t ret;
-
+
ret = bpf_get_current_cgroup_id ();
}
{
void *ret, *map;
uint64_t flags;
-
+
ret = bpf_get_local_storage (map, flags);
}
{
uint64_t ret;
void *skb;
-
+
ret = bpf_get_socket_cookie (skb);
}
{
uint32_t ret;
void *skb;
-
+
ret = bpf_get_socket_uid (skb);
}
void *bpf_socket;
int level, optname, optlen;
char *optval;
-
+
ret = bpf_getsockopt (bpf_socket, level,
optname, optval, optlen);
}
int ret;
void *skb, *hdr;
uint32_t type, len;
-
+
ret = bpf_lwt_push_encap (skb, type, hdr, len);
}
int ret;
void *skb, *param;
uint32_t action, param_len;
-
+
ret = bpf_lwt_seg6_action (skb, action,
param, param_len);
}
int ret;
void *skb;
uint32_t offset, delta;
-
- ret = bpf_lwt_seg6_adjust_srh (skb, offset,
- delta);
+
+ ret = bpf_lwt_seg6_adjust_srh (skb, offset, delta);
}
/* { dg-final { scan-assembler "call\t75" } } */
int ret;
void *skb, *from;
uint32_t offset, len;
-
+
ret = bpf_lwt_seg6_store_bytes (skb, offset, from, len);
}
int ret;
void *msg;
uint32_t bytes;
-
+
ret = bpf_msg_apply_bytes (msg, bytes);
}
int ret;
void *msg;
uint32_t bytes;
-
+
ret = bpf_msg_cork_bytes (msg, bytes);
}
int ret;
void *msg;
int len;
-
+
ret = bpf_msg_pull_data (msg, len);
}
void *msg, *map;
uint64_t key;
uint64_t flags;
-
- ret = bpf_msg_redirect_map (msg, map, key,
- flags);
+
+ ret = bpf_msg_redirect_map (msg, map, key, flags);
}
/* { dg-final { scan-assembler "call\t60" } } */
int ret;
void *regs;
uint64_t rc;
-
+
ret = bpf_override_return (regs, rc);
}
void *map, *buf;
uint64_t flags;
uint64_t buf_size;
-
+
ret = bpf_perf_event_read_value (map, flags, buf, buf_size);
}
int ret;
void *ctx, *buf;
uint64_t buf_size;
-
+
ret = bpf_perf_prog_read_value (ctx, buf, buf_size);
}
int size;
void *dst;
const void *unsafe_ptr;
-
+
ret = bpf_probe_read_str (dst, size, unsafe_ptr);
}
void *ctx;
uint32_t protocol, toggle;
uint64_t scancode;
-
- ret = bpf_rc_keydown (ctx, protocol,
- scancode, toggle);
+
+ ret = bpf_rc_keydown (ctx, protocol, scancode, toggle);
}
/* { dg-final { scan-assembler "call\t78" } } */
{
int ret;
void *ctx;
-
+
ret = bpf_rc_repeat (ctx);
}
void *map;
uint32_t key;
uint64_t flags;
-
+
ret = bpf_redirect_map (map, key, flags);
}
uint32_t ret;
void *skb;
uint32_t hash;
-
+
ret = bpf_set_hash (skb, hash);
}
int optname;
void *optval;
int optlen;
-
+
ret = bpf_setsockopt (bpf_socket, level, optname, optval, optlen);
}
void *ctx, *tuple;
uint32_t tuple_size;
uint64_t netns, flags;
-
+
ret = bpf_sk_lookup_tcp (ctx,
tuple,
tuple_size,
void *ctx, *tuple;
uint32_t tuple_size;
uint64_t netns, flags;
-
+
ret = bpf_sk_lookup_udp (ctx,
- tuple,
- tuple_size,
- netns, flags);
+ tuple,
+ tuple_size,
+ netns, flags);
}
/* { dg-final { scan-assembler "call\t85" } } */
void *ctx, *map;
uint32_t key;
uint64_t flags;
-
+
ret = bpf_sk_redirect_map (ctx, map, key, flags);
}
{
int ret;
void *sock;
-
+
ret = bpf_sk_release (sock);
}
int ret;
void *reuse, *map, *key;
uint64_t flags;
-
+
ret = bpf_sk_select_reuseport (reuse, map,
- key, flags);
+ key, flags);
}
/* { dg-final { scan-assembler "call\t82" } } */
{
int ret;
void *map, *sk;
-
+
ret = bpf_sk_storage_delete (map, sk);
}
void *ret;
void *map, *sk, *value;
uint64_t flags;
-
+
ret = bpf_sk_storage_get (map, sk, value, flags);
}
int32_t len_diff;
uint32_t mode;
uint64_t flags;
-
+
ret = bpf_skb_adjust_room (skb, len_diff, mode, flags);
}
{
uint64_t ret;
void *skb;
-
+
ret = bpf_skb_cgroup_id (skb);
}
void *skb;
uint32_t len;
uint64_t flags;
-
+
ret = bpf_skb_change_head (skb, len, flags);
}
int ret;
void *skops, *map, *key;
uint64_t flags;
-
- ret = bpf_sock_map_update (skops, map, key,
- flags);
+
+ ret = bpf_sock_map_update (skops, map, key, flags);
}
/* { dg-final { scan-assembler "call\t53" } } */
int ret;
void *bpf_sock;
int argval;
-
- ret = bpf_sock_ops_cb_flags_set (bpf_sock,
- argval);
+
+ ret = bpf_sock_ops_cb_flags_set (bpf_sock, argval);
}
/* { dg-final { scan-assembler "call\t59" } } */
long res;
uint64_t flags;
size_t buf_len;
-
+
ret = bpf_strtol (buf, buf_len, flags, &res);
}
unsigned long res;
uint64_t flags;
size_t buf_len;
-
+
ret = bpf_strtoul (buf, buf_len, flags, &res);
}
int ret;
void *ctx, *buf;
size_t buf_len;
-
+
ret = bpf_sysctl_get_current_value (ctx, buf, buf_len);
}
void *ctx, *buf;
size_t buf_len;
uint64_t flags;
-
+
ret = bpf_sysctl_get_name (ctx, buf, buf_len, flags);
}
int ret;
void *ctx, *buf;
size_t buf_len;
-
+
ret = bpf_sysctl_get_new_value (ctx, buf, buf_len);
}
int ret;
void *ctx, *buf;
size_t buf_len;
-
+
ret = bpf_sysctl_set_new_value (ctx, buf, buf_len);
}
int ret;
void *sk, *iph, *th;
uint32_t iph_len, th_len;
-
+
ret = bpf_tcp_check_syncookie (sk, iph,
iph_len,
th, th_len);
int ret;
void *xdp_md;
int delta;
-
+
ret = bpf_xdp_adjust_head (xdp_md, delta);
}
int ret;
void *xdp_md;
int delta;
-
+
ret = bpf_xdp_adjust_meta (xdp_md, delta);
}
int ret;
void *skb;
int ancestor_level;
-
- ret = bpf_skb_ancestor_cgroup_id (skb,
- ancestor_level);
+
+ ret = bpf_skb_ancestor_cgroup_id (skb, ancestor_level);
}
/* { dg-final { scan-assembler "call\t83" } } */