wok rev 19643

linld: fix cpuhaslm (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jan 21 12:01:33 2017 +0100 (2017-01-21)
parents d90896f9d59e
children e60b6baa3569
files linld/stuff/src/CRTLX.ASM
line diff
     1.1 --- a/linld/stuff/src/CRTLX.ASM	Sat Jan 21 09:21:18 2017 +0100
     1.2 +++ b/linld/stuff/src/CRTLX.ASM	Sat Jan 21 12:01:33 2017 +0100
     1.3 @@ -113,16 +113,18 @@
     1.4                  js     @@bad   		;it is a 86/186/286, not a 386+
     1.5                  p386
     1.6  		pushfd
     1.7 -		pop	ebx
     1.8 -		mov	ecx,ebx
     1.9 -		btc	ebx,21		; toggle CPUID feature bit 21
    1.10 -		push	ebx
    1.11 +		pop	dx
    1.12 +		pop	ax
    1.13 +		mov	bl,al
    1.14 +		xor	al,20h		; toggle CPUID feature bit 21
    1.15 +		push	ax
    1.16 +		push	dx
    1.17  		popfd
    1.18  		pushfd
    1.19 -		pop	ebx
    1.20 -		xor	ebx,ecx
    1.21 -		shr	ebx,1+21	; CPUID feature bit changed ?
    1.22 -		jnc	@@bad
    1.23 +		pop	dx
    1.24 +		pop	ax
    1.25 +		xor	al,bl		; clear C
    1.26 +		je	@@bad 		; CPUID feature bit changed ?
    1.27  		mov	eax,80000001h	; Extended Processor Info and Feature Bits
    1.28  		cpuid
    1.29  		shr	edx,1+29	; LM feature bit ?