Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311099
b: refs/heads/master
c: 2bea29b
h: refs/heads/master
i:
  311097: b1de43f
  311095: 99954fa
v: v3
  • Loading branch information
Mircea Gherzan authored and Russell King committed Jun 14, 2012
1 parent c9996c0 commit 4ec38c5
Show file tree
Hide file tree
Showing 3 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: 2307574a50dcb0f9c13e541ca3a196f7554af977
refs/heads/master: 2bea29b774ccb4bf32c7b299c677fccc5a1d8443
5 changes: 5 additions & 0 deletions trunk/arch/arm/net/bpf_jit_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,11 @@ static int build_body(struct jit_ctx *ctx)
update_on_xread(ctx);
emit(ARM_MOV_R(r_A, r_X), ctx);
break;
case BPF_S_ANC_ALU_XOR_X:
/* A ^= X */
update_on_xread(ctx);
emit(ARM_EOR_R(r_A, r_A, r_X), ctx);
break;
case BPF_S_ANC_PROTOCOL:
/* A = ntohs(skb->protocol) */
ctx->seen |= SEEN_SKB;
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/arm/net/bpf_jit_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
#define ARM_INST_CMP_R 0x01500000
#define ARM_INST_CMP_I 0x03500000

#define ARM_INST_EOR_R 0x00200000

#define ARM_INST_LDRB_I 0x05d00000
#define ARM_INST_LDRB_R 0x07d00000
#define ARM_INST_LDRH_I 0x01d000b0
Expand Down Expand Up @@ -132,6 +134,8 @@
#define ARM_CMP_R(rn, rm) _AL3_R(ARM_INST_CMP, 0, rn, rm)
#define ARM_CMP_I(rn, imm) _AL3_I(ARM_INST_CMP, 0, rn, imm)

#define ARM_EOR_R(rd, rn, rm) _AL3_R(ARM_INST_EOR, rd, rn, rm)

#define ARM_LDR_I(rt, rn, off) (ARM_INST_LDR_I | (rt) << 12 | (rn) << 16 \
| (off))
#define ARM_LDRB_I(rt, rn, off) (ARM_INST_LDRB_I | (rt) << 12 | (rn) << 16 \
Expand Down

0 comments on commit 4ec38c5

Please sign in to comment.