wok diff linld/stuff/src/pipehole.awk @ rev 23993

linld: hide -b=<base_himem> argument
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Dec 12 17:26:44 2020 +0000 (2020-12-12)
parents 3d19917d3a03
children e07718b42e73
line diff
     1.1 --- a/linld/stuff/src/pipehole.awk	Sat Dec 12 10:41:29 2020 +0000
     1.2 +++ b/linld/stuff/src/pipehole.awk	Sat Dec 12 17:26:44 2020 +0000
     1.3 @@ -38,13 +38,15 @@
     1.4  	if (/image\|initrd/) islinld=3
     1.5  	if (islinld==3) {
     1.6  		if (/bx,word ptr/) { print "; " $0; next }
     1.7 -		if (/short @1@282/) print "	mov	bx,word ptr [si]"
     1.8 -		if (/@fileexist\$qpxzc/) islinld=0
     1.9  	}
    1.10  	if (/fileexist\$qpxzc/) islinld=4
    1.11  	if (islinld==4) {
    1.12 -		if (/ax,-1/) print "	mov	bx,word ptr [si]"
    1.13 -		if (/ax,word ptr/) $0="	xchg	ax,bx"
    1.14 +		if (/ax,-1/) {
    1.15 +			print "	inc	ax"
    1.16 +			print "	mov	ax,word ptr [si]"
    1.17 +			next
    1.18 +		}
    1.19 +		if (/ax,word ptr/) next
    1.20  		if (/\[si\]$/) { islinld=0; print "; " $0; next }
    1.21  	}
    1.22  	if (/buf_cmdline\+1/) {
    1.23 @@ -54,6 +56,7 @@
    1.24  	}
    1.25  	if (islinld==5) {
    1.26  		if (/bx,offset DGROUP:buf_cmdline/) $0="	dec	bx"
    1.27 +		if (/ax,word ptr/) next
    1.28  		if (/call/) islinld=0
    1.29  	}
    1.30  	 } # file == "linld.cpp"