[Patch] asm changes for 129ac3

Harald Hoyer (Harald.Hoyer@hot.spotline.de)
Sat, 21 Nov 1998 13:27:09 +0100


This is a multi-part message in MIME format.
--------------42485D2B29997401D2D2C048
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi,

nice to see that the asm changes are already done by you, Alan. BTW here are a
few more ....

Yours,
Harald

--
»»»» Harald Hoyer ««»» mailto:HarryH@Royal.Net ««»» http://hot.spotline.de ««««
···············································································
With your bare hands?!?

--------------42485D2B29997401D2D2C048 Content-Type: text/plain; charset=us-ascii; name="egcs.apm_patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="egcs.apm_patch"

diff -x Entries -x Tag -p -u --recursive linux/arch/i386/kernel/apm.c /usr/src/linux/arch/i386/kernel/apm.c --- linux/arch/i386/kernel/apm.c Fri Oct 9 11:56:01 1998 +++ /usr/src/linux/arch/i386/kernel/apm.c Thu Nov 19 11:49:50 1998 @@ -410,7 +410,7 @@ static inline u8 apm_bios_call(u32 eax_i : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx), "=S" (*esi) : "a" (eax_in), "b" (ebx_in), "c" (ecx_in) - : "ax", "bx", "cx", "dx", "si", "di", "bp", "memory", "cc"); + : "di", "bp", "memory", "cc"); APM_DO_RESTORE_SEGS; __restore_flags(flags); return *eax & 0xff; @@ -437,7 +437,7 @@ static inline u8 apm_bios_call_simple(u3 APM_DO_POP_SEGS : "=a" (*eax), "=b" (error) : "a" (eax_in), "b" (ebx_in), "c" (ecx_in) - : "ax", "bx", "cx", "dx", "si", "di", "bp", "memory", "cc"); + : "dx", "si", "di", "bp", "memory", "cc"); APM_DO_RESTORE_SEGS; __restore_flags(flags); return error; diff -x Entries -x Tag -p -u --recursive linux/include/asm-i386/system.h /usr/src/linux/include/asm-i386/system.h --- linux/include/asm-i386/system.h Mon Nov 9 06:40:52 1998 +++ /usr/src/linux/include/asm-i386/system.h Thu Nov 19 13:41:32 1998 @@ -35,30 +35,30 @@ extern void FASTCALL(__switch_to(struct "a" (prev), "d" (next)); \ } while (0) -#define _set_base(addr,base) \ -__asm__("movw %%dx,%0\n\t" \ +#define _set_base(addr,base) do { unsigned long __pr; \ +__asm__ __volatile__ ("movw %%dx,%1\n\t" \ "rorl $16,%%edx\n\t" \ - "movb %%dl,%1\n\t" \ - "movb %%dh,%2" \ - : /* no output */ \ + "movb %%dl,%2\n\t" \ + "movb %%dh,%3" \ + :"=dx" (__pr) \ :"m" (*((addr)+2)), \ "m" (*((addr)+4)), \ "m" (*((addr)+7)), \ - "d" (base) \ - :"dx") + "d" (base) \ + ); } while(0) -#define _set_limit(addr,limit) \ -__asm__("movw %%dx,%0\n\t" \ +#define _set_limit(addr,limit) do { unsigned long __lr; \ +__asm__ __volatile__ ("movw %%dx,%1\n\t" \ "rorl $16,%%edx\n\t" \ - "movb %1,%%dh\n\t" \ + "movb %2,%%dh\n\t" \ "andb $0xf0,%%dh\n\t" \ "orb %%dh,%%dl\n\t" \ - "movb %%dl,%1" \ - : /* no output */ \ + "movb %%dl,%2" \ + :"=dx" (__lr) \ :"m" (*(addr)), \ "m" (*((addr)+6)), \ "d" (limit) \ - :"dx") + ); } while(0) #define set_base(ldt,base) _set_base( ((char *)&(ldt)) , (base) ) #define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , ((limit)-1)>>12 ) diff -x Entries -x Tag -p -u --recursive linux/arch/i386/lib/checksum.c /usr/src/linux/arch/i386/lib/checksum.c --- linux/arch/i386/lib/checksum.c Tue Sep 29 14:45:07 1998 +++ /usr/src/linux/arch/i386/lib/checksum.c Thu Nov 19 13:13:34 1998 @@ -195,9 +195,9 @@ unsigned int csum_partial(const unsigned addl %%ebx,%%eax adcl $0,%%eax 80: " - : "=a"(sum) + : "=a"(sum), "=c"(len), "=S"(buf) : "0"(sum), "c"(len), "S"(buf) - : "bx", "dx", "cx", "si", "memory"); + : "bx", "dx", "memory"); return(sum); } @@ -373,7 +373,7 @@ unsigned int csum_partial_copy_generic ( int len, int sum, int *src_err_ptr, int *dst_err_ptr) { __asm__ __volatile__ (" - movl %4,%%ecx + movl %6,%%ecx movl %%ecx, %%edx movl %%ecx, %%ebx shrl $6, %%ecx @@ -409,25 +409,26 @@ ROUND (-16) ROUND(-12) ROUND(-8) ROUND( adcl $0, %%eax 7: .section .fixup, \"ax\" -6000: movl %7, (%%ebx) +#-EFAULT = -14 +6000: movl $-14, (%%ebx) # zero the complete destination (computing the rest is too much work) - movl %8,%%edi - movl %4,%%ecx + movl %9,%%edi + movl %6,%%ecx xorl %%eax,%%eax rep ; stosb jmp 7b -6001: movl %1, %%ebx +6001: movl %3, %%ebx jmp 6000b -6002: movl %2, %%ebx +6002: movl %4, %%ebx jmp 6000b .previous " - : "=a"(sum) + : "=a"(sum), "=S"(src), "=D" (dst) : "m"(src_err_ptr), "m"(dst_err_ptr), "0"(sum), "m"(len), "S"(src), "D" (dst), - "i" (-EFAULT), +/* "i" (-EFAULT),*/ "m" (dst) - : "bx", "cx", "si", "di", "dx", "memory" ); + : "bx", "cx", "dx", "memory" ); return(sum); }

--------------42485D2B29997401D2D2C048--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/