From 8c4d5bbc6fcaf55d2a604434d86ddb655aaa343e Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Wed, 13 Aug 2008 19:52:00 +0000 Subject: [PATCH] Use int32_t/int16_t instead of int/short as sys/net/bpf_filter.c does. --- sys/amd64/amd64/bpf_jit_machdep.c | 8 ++++---- sys/i386/i386/bpf_jit_machdep.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/amd64/amd64/bpf_jit_machdep.c b/sys/amd64/amd64/bpf_jit_machdep.c index eb8e92489425..62436b938aa0 100644 --- a/sys/amd64/amd64/bpf_jit_machdep.c +++ b/sys/amd64/amd64/bpf_jit_machdep.c @@ -157,7 +157,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) case BPF_LD|BPF_W|BPF_ABS: MOVid(ins->k, ECX); MOVrd(ECX, ESI); - ADDib(sizeof(int), ECX); + ADDib(sizeof(int32_t), ECX); CMPrd(EDI, ECX); JBEb(6); ZEROrd(EAX); @@ -171,7 +171,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) ZEROrd(EAX); MOVid(ins->k, ECX); MOVrd(ECX, ESI); - ADDib(sizeof(short), ECX); + ADDib(sizeof(int16_t), ECX); CMPrd(EDI, ECX); JBEb(4); MOVrq3(R8, RBX); @@ -202,7 +202,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) MOVid(ins->k, ECX); ADDrd(EDX, ECX); MOVrd(ECX, ESI); - ADDib(sizeof(int), ECX); + ADDib(sizeof(int32_t), ECX); CMPrd(EDI, ECX); JBEb(6); ZEROrd(EAX); @@ -217,7 +217,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) MOVid(ins->k, ECX); ADDrd(EDX, ECX); MOVrd(ECX, ESI); - ADDib(sizeof(short), ECX); + ADDib(sizeof(int16_t), ECX); CMPrd(EDI, ECX); JBEb(4); MOVrq3(R8, RBX); diff --git a/sys/i386/i386/bpf_jit_machdep.c b/sys/i386/i386/bpf_jit_machdep.c index b5b966b89ef7..d8d9e5150988 100644 --- a/sys/i386/i386/bpf_jit_machdep.c +++ b/sys/i386/i386/bpf_jit_machdep.c @@ -164,7 +164,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) case BPF_LD|BPF_W|BPF_ABS: MOVid(ins->k, ECX); MOVrd(ECX, ESI); - ADDib(sizeof(int), ECX); + ADDib(sizeof(int32_t), ECX); CMPrd(EDI, ECX); JBEb(7); ZEROrd(EAX); @@ -180,7 +180,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) ZEROrd(EAX); MOVid(ins->k, ECX); MOVrd(ECX, ESI); - ADDib(sizeof(short), ECX); + ADDib(sizeof(int16_t), ECX); CMPrd(EDI, ECX); JBEb(5); POP(EBX); @@ -215,7 +215,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) MOVid(ins->k, ECX); ADDrd(EDX, ECX); MOVrd(ECX, ESI); - ADDib(sizeof(int), ECX); + ADDib(sizeof(int32_t), ECX); CMPrd(EDI, ECX); JBEb(7); ZEROrd(EAX); @@ -232,7 +232,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) MOVid(ins->k, ECX); ADDrd(EDX, ECX); MOVrd(ECX, ESI); - ADDib(sizeof(short), ECX); + ADDib(sizeof(int16_t), ECX); CMPrd(EDI, ECX); JBEb(5); POP(EBX);