From 50c9fad9cec8f853690a0dec8025b928e7315bbf Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Tue, 6 Dec 2005 20:11:07 +0000 Subject: [PATCH] Fix ZERO_EDX() macro from the previous commit. It was emitting `xor %ecx, %ecx', not `xor %edx, %edx'. --- sys/amd64/amd64/bpf_jit_machdep.h | 2 +- sys/i386/i386/bpf_jit_machdep.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/bpf_jit_machdep.h b/sys/amd64/amd64/bpf_jit_machdep.h index dab247724130..b6a12f114da9 100644 --- a/sys/amd64/amd64/bpf_jit_machdep.h +++ b/sys/amd64/amd64/bpf_jit_machdep.h @@ -431,7 +431,7 @@ typedef void (*emit_func)(bpf_bin_stream *stream, u_int value, u_int n); /* xor edx,edx */ #define ZERO_EDX() do { \ emitm(&stream, 0x31, 1); \ - emitm(&stream, 0xc9, 1); \ + emitm(&stream, 0xd2, 1); \ } while (0) #endif /* _BPF_JIT_MACHDEP_H_ */ diff --git a/sys/i386/i386/bpf_jit_machdep.h b/sys/i386/i386/bpf_jit_machdep.h index 42d34d4c1243..d0d4222ba5f1 100644 --- a/sys/i386/i386/bpf_jit_machdep.h +++ b/sys/i386/i386/bpf_jit_machdep.h @@ -398,7 +398,7 @@ typedef void (*emit_func)(bpf_bin_stream *stream, u_int value, u_int n); /* xor edx,edx */ #define ZERO_EDX() do { \ emitm(&stream, 0x31, 1); \ - emitm(&stream, 0xc9, 1); \ + emitm(&stream, 0xd2, 1); \ } while (0) #endif /* _BPF_JIT_MACHDEP_H_ */