wok diff linld/stuff/src/pipehole.awk @ rev 22180
linld: spare up to 30k more for zImage (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Nov 09 17:39:43 2019 +0100 (2019-11-09) |
parents | 65ea21135647 |
children | 08212b207b25 |
line diff
1.1 --- a/linld/stuff/src/pipehole.awk Sat Nov 09 13:26:32 2019 +0100 1.2 +++ b/linld/stuff/src/pipehole.awk Sat Nov 09 17:39:43 2019 +0100 1.3 @@ -162,53 +162,14 @@ 1.4 if (/_version_string,/) isload=0 1.5 if (/mov bx,ax/) next 1.6 } 1.7 - if (/topseg\(\)>>12/) isload=4 1.8 - if (isload == 4 && is386 == 0) { # LOAD.LST 1.9 - if (/push/ || /pop/) next 1.10 - if (/ax,cs/) { 1.11 - sub(/ax,cs/,"bx,cs") 1.12 + if (/_base_himem\+2/ && is386 == 0) isload=4 1.13 + if (isload == 4) { # LOAD.LST 1.14 + if (/_base_himem\+2/) next 1.15 + if (/_base_himem$/) { 1.16 + sub(/mov dx,/,"les dx,d") 1.17 } 1.18 - if (/dx,dx/) next 1.19 - sub(/ax,dx/,"ax,bx") 1.20 - if (/call/) { 1.21 - print " cmp ax,0fffh" 1.22 - print " jae @sys@ok" 1.23 - print " mov ax,0fffh" 1.24 - print "@sys@ok:" 1.25 - isload=400 1.26 - } 1.27 - } 1.28 - if (isload == 400) { 1.29 - if (/call/) { 1.30 - print " extrn N_LXLSH@4:near" 1.31 - sub(/N_LXLSH@/,"N_LXLSH@4") 1.32 - } 1.33 - sub(/pm_high,0/,"pm_high,dh") 1.34 - if (/_base_himem\+2/ || /pop/ || /push/) next 1.35 - if (/_base_himem$/) { 1.36 - sub(/mov dx,/,"les ax,d") 1.37 - isload++ 1.38 - } 1.39 - } 1.40 - if (isload == 401) { 1.41 sub(/,ax/,",es") 1.42 - sub(/,dx/,",ax") 1.43 - if (/load_image/) isload=0 1.44 - } 1.45 - if (isload == 4 && is386) { # LOAD.LST 1.46 - sub(/dx,cs/,"edx,cs") 1.47 - sub(/eax/,"edx") 1.48 - if (/shl/) { 1.49 - print " mov ax,0fffh" 1.50 - print " cmp dx,ax" 1.51 - print " jae @sys@ok" 1.52 - print " xchg ax,dx" 1.53 - print "@sys@ok:" 1.54 - } 1.55 - sub(/ax,9/,"dx,9") 1.56 - if (/,0$/) sub(/,0/,",dh") 1.57 - if (/movzx/) next 1.58 - if (/fallback = base_himem/) { isload=0 } 1.59 + if (/,dx/) isload=0 1.60 } 1.61 if (/void load_initrd\(\)/) isload=3 1.62 if (isload == 3) { # LOAD.LST