Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328097
b: refs/heads/master
c: 82c93fc
h: refs/heads/master
i:
  328095: 8a16a48
v: v3
  • Loading branch information
Daniel Borkmann authored and David S. Miller committed Sep 24, 2012
1 parent 8509c05 commit f60b286
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9e49e88958feb41ec701fa34b44723dabadbc28c
refs/heads/master: 82c93fcc2e1737fede2752520f1bf8f4de6304d8
9 changes: 9 additions & 0 deletions trunk/arch/x86/net/bpf_jit_comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,18 @@ void bpf_jit_compile(struct sk_filter *fp)
EMIT1_off32(0x0d, K); /* or imm32,%eax */
break;
case BPF_S_ANC_ALU_XOR_X: /* A ^= X; */
case BPF_S_ALU_XOR_X:
seen |= SEEN_XREG;
EMIT2(0x31, 0xd8); /* xor %ebx,%eax */
break;
case BPF_S_ALU_XOR_K: /* A ^= K; */
if (K == 0)
break;
if (is_imm8(K))
EMIT3(0x83, 0xf0, K); /* xor imm8,%eax */
else
EMIT1_off32(0x35, K); /* xor imm32,%eax */
break;
case BPF_S_ALU_LSH_X: /* A <<= X; */
seen |= SEEN_XREG;
EMIT4(0x89, 0xd9, 0xd3, 0xe0); /* mov %ebx,%ecx; shl %cl,%eax */
Expand Down

0 comments on commit f60b286

Please sign in to comment.