freebsd-ports/chinese/big5con/files/patch-src-vc.c
Vanilla I. Shu e9b46b3623 - fix build error on 5.x
PR:		ports/81107
Submitted by:	chinsan <chinsan@mail2000dotcom.tw>
2005-05-16 16:06:29 +00:00

42 lines
1.1 KiB
C

--- src/vc.c.orig Mon May 16 13:33:11 2005
+++ src/vc.c Mon May 16 13:33:11 2005
@@ -60,28 +60,23 @@
inline void
blatch(void *head, int n)
{
-
- __asm__ volatile ("\t clc\n"
- "1:\n"
- "\t andb %%bl, (%%eax)\n"
- "\t incl %%eax\n"
- "\t loop 1b\n"
- : "=bl" (head), "=c"(n)
- : "eax"((long)head), "0"(0x7F), "1"(n));
+ char *tmp = (char *)head;
+ do {
+ *tmp &= 0x7f;
+ tmp++;
+ } while( --n );
}
static
inline void
llatch(void *head, int n)
{
-
- __asm__ volatile ("\t clc\n"
- "1:\n"
- "\t andl %%ebx, (%%eax)\n"
- "\t addl $4, %%eax\n"
- "\t loop 1b\n"
- : "=ebx" (head), "=c"(n)
- : "eax"((long)head), "0"(0x7F7F7F7F), "1"(n >> 2));
+ int *tmp = (int *)head;
+ n /= 4;
+ do {
+ *tmp &= 0x7f7f7f7f;
+ tmp++;
+ } while( --n );
}
static inline u_int