diff options
-rw-r--r-- | gencode.c | 15 | ||||
-rw-r--r-- | gencode.h | 4 |
2 files changed, 15 insertions, 4 deletions
@@ -8993,12 +8993,17 @@ gen_vlan(compiler_state_t *cstate, bpf_u_int32 vlan_num, int has_vlan_tag) /* * support for MPLS + * + * The label_num_arg dance is to avoid annoying whining by compilers that + * label_num might be clobbered by longjmp - yeah, it might, but *WHO CARES*? + * It's not *used* after setjmp returns. */ struct block * -gen_mpls(compiler_state_t *cstate, volatile bpf_u_int32 label_num, +gen_mpls(compiler_state_t *cstate, bpf_u_int32 label_num_arg, int has_label_num) { struct block *b0, *b1; + bpf_u_int32 label_num = label_num_arg; /* * Catch errors reported by us and routines below us, and return NULL @@ -9759,12 +9764,18 @@ gen_mtp2type_abbrev(compiler_state_t *cstate, int type) return b0; } +/* + * The jvalue_arg dance is to avoid annoying whining by compilers that + * jvalue might be clobbered by longjmp - yeah, it might, but *WHO CARES*? + * It's not *used* after setjmp returns. + */ struct block * gen_mtp3field_code(compiler_state_t *cstate, int mtp3field, - volatile bpf_u_int32 jvalue, bpf_u_int32 jtype, int reverse) + bpf_u_int32 jvalue_arg, bpf_u_int32 jtype, int reverse) { struct block *b0; bpf_u_int32 val1 , val2 , val3; + bpf_u_int32 jvalue = jvalue_arg; u_int newoff_sio; u_int newoff_opc; u_int newoff_dpc; @@ -325,7 +325,7 @@ struct block *gen_llc_s_subtype(compiler_state_t *, bpf_u_int32); struct block *gen_llc_u_subtype(compiler_state_t *, bpf_u_int32); struct block *gen_vlan(compiler_state_t *, bpf_u_int32, int); -struct block *gen_mpls(compiler_state_t *, volatile bpf_u_int32, int); +struct block *gen_mpls(compiler_state_t *, bpf_u_int32, int); struct block *gen_pppoed(compiler_state_t *); struct block *gen_pppoes(compiler_state_t *, bpf_u_int32, int); @@ -338,7 +338,7 @@ struct block *gen_atmtype_abbrev(compiler_state_t *, int type); struct block *gen_atmmulti_abbrev(compiler_state_t *, int type); struct block *gen_mtp2type_abbrev(compiler_state_t *, int type); -struct block *gen_mtp3field_code(compiler_state_t *, int, volatile bpf_u_int32, +struct block *gen_mtp3field_code(compiler_state_t *, int, bpf_u_int32, bpf_u_int32, int); struct block *gen_pf_ifname(compiler_state_t *, const char *); |