branch update for HEAD-2003021201
[reactos.git] / drivers / net / packet / win_bpf_filter_init.c
index 96e7e4c..51fb5d4 100644 (file)
@@ -135,6 +135,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(A),"=c"(tmp2): );
 #endif
                        continue;
 
@@ -154,6 +164,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(X),"=c"(tmp2): );
 #endif
                        continue;
 
@@ -172,6 +192,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(A),"=c"(tmp): );
 #endif
                        continue;
 
@@ -190,6 +220,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(X),"=c"(tmp): );
 #endif
                        continue;
                        
@@ -221,6 +261,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(A),"=c"(tmp2): );
 #endif
                        continue;
 
@@ -243,6 +293,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(A),"=c"(tmp): );
 #endif
                        continue;
 /* END LD NO PACKET INSTRUCTIONS */
@@ -279,6 +339,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(A),"=c"(tmp): );
 #endif
                        continue;
 
@@ -297,6 +367,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(X),"=c"(tmp): );
 #endif
                        continue;
 
@@ -315,6 +395,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(A),"=c"(tmp2): );
 #endif
                        continue;
 
@@ -333,6 +423,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(X),"=c"(tmp2): );
 #endif
                        continue;
 
@@ -354,6 +454,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(A),"=c"(tmp): );
 #endif
                        continue;
 
@@ -372,6 +482,16 @@ uint32 bpf_filter_init(register struct bpf_insn *pc, MEM_TYPE *mem_ex, TME_CORE
                                pop eax
                        }
 #else
+                       asm("push %%eax;"
+                               "push %%ebx;"
+                               "mov %1,%%ebx;"
+                               "xor %%eax, %%eax;"
+                               "mov (%%ebx), %%ax;"
+                               "bswap %%eax;"
+                               "mov %%eax, %0;"
+                               "pop %%ebx;"
+                               "pop %%eax;"
+                :"=a"(A),"=c"(tmp2): );
 #endif
                        continue;
 /* END STORE INSTRUCTIONS */