1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00

Use int32_t/int16_t instead of int/short as sys/net/bpf_filter.c does.

This commit is contained in:
Jung-uk Kim 2008-08-13 19:52:00 +00:00
parent 55034c7d1d
commit 8c4d5bbc6f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=181700
2 changed files with 8 additions and 8 deletions

View File

@ -157,7 +157,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem)
case BPF_LD|BPF_W|BPF_ABS: case BPF_LD|BPF_W|BPF_ABS:
MOVid(ins->k, ECX); MOVid(ins->k, ECX);
MOVrd(ECX, ESI); MOVrd(ECX, ESI);
ADDib(sizeof(int), ECX); ADDib(sizeof(int32_t), ECX);
CMPrd(EDI, ECX); CMPrd(EDI, ECX);
JBEb(6); JBEb(6);
ZEROrd(EAX); ZEROrd(EAX);
@ -171,7 +171,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem)
ZEROrd(EAX); ZEROrd(EAX);
MOVid(ins->k, ECX); MOVid(ins->k, ECX);
MOVrd(ECX, ESI); MOVrd(ECX, ESI);
ADDib(sizeof(short), ECX); ADDib(sizeof(int16_t), ECX);
CMPrd(EDI, ECX); CMPrd(EDI, ECX);
JBEb(4); JBEb(4);
MOVrq3(R8, RBX); MOVrq3(R8, RBX);
@ -202,7 +202,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem)
MOVid(ins->k, ECX); MOVid(ins->k, ECX);
ADDrd(EDX, ECX); ADDrd(EDX, ECX);
MOVrd(ECX, ESI); MOVrd(ECX, ESI);
ADDib(sizeof(int), ECX); ADDib(sizeof(int32_t), ECX);
CMPrd(EDI, ECX); CMPrd(EDI, ECX);
JBEb(6); JBEb(6);
ZEROrd(EAX); ZEROrd(EAX);
@ -217,7 +217,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem)
MOVid(ins->k, ECX); MOVid(ins->k, ECX);
ADDrd(EDX, ECX); ADDrd(EDX, ECX);
MOVrd(ECX, ESI); MOVrd(ECX, ESI);
ADDib(sizeof(short), ECX); ADDib(sizeof(int16_t), ECX);
CMPrd(EDI, ECX); CMPrd(EDI, ECX);
JBEb(4); JBEb(4);
MOVrq3(R8, RBX); MOVrq3(R8, RBX);

View File

@ -164,7 +164,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem)
case BPF_LD|BPF_W|BPF_ABS: case BPF_LD|BPF_W|BPF_ABS:
MOVid(ins->k, ECX); MOVid(ins->k, ECX);
MOVrd(ECX, ESI); MOVrd(ECX, ESI);
ADDib(sizeof(int), ECX); ADDib(sizeof(int32_t), ECX);
CMPrd(EDI, ECX); CMPrd(EDI, ECX);
JBEb(7); JBEb(7);
ZEROrd(EAX); ZEROrd(EAX);
@ -180,7 +180,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem)
ZEROrd(EAX); ZEROrd(EAX);
MOVid(ins->k, ECX); MOVid(ins->k, ECX);
MOVrd(ECX, ESI); MOVrd(ECX, ESI);
ADDib(sizeof(short), ECX); ADDib(sizeof(int16_t), ECX);
CMPrd(EDI, ECX); CMPrd(EDI, ECX);
JBEb(5); JBEb(5);
POP(EBX); POP(EBX);
@ -215,7 +215,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem)
MOVid(ins->k, ECX); MOVid(ins->k, ECX);
ADDrd(EDX, ECX); ADDrd(EDX, ECX);
MOVrd(ECX, ESI); MOVrd(ECX, ESI);
ADDib(sizeof(int), ECX); ADDib(sizeof(int32_t), ECX);
CMPrd(EDI, ECX); CMPrd(EDI, ECX);
JBEb(7); JBEb(7);
ZEROrd(EAX); ZEROrd(EAX);
@ -232,7 +232,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem)
MOVid(ins->k, ECX); MOVid(ins->k, ECX);
ADDrd(EDX, ECX); ADDrd(EDX, ECX);
MOVrd(ECX, ESI); MOVrd(ECX, ESI);
ADDib(sizeof(short), ECX); ADDib(sizeof(int16_t), ECX);
CMPrd(EDI, ECX); CMPrd(EDI, ECX);
JBEb(5); JBEb(5);
POP(EBX); POP(EBX);