wok-6.x rev 20544
linld: typos
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Dec 01 12:11:23 2018 +0100 (2018-12-01) |
parents | 16d1d23aefee |
children | 6774699d4835 |
files | linld/stuff/src/pipehole.awk |
line diff
1.1 --- a/linld/stuff/src/pipehole.awk Sat Dec 01 11:07:58 2018 +0100 1.2 +++ b/linld/stuff/src/pipehole.awk Sat Dec 01 12:11:23 2018 +0100 1.3 @@ -14,7 +14,7 @@ 1.4 hold=3; split($2,regs,","); next 1.5 } 1.6 if (/^ movzx eax,ax$/) { hold=4; next } 1.7 - if (/^ cmp word ptr/ || /^ cmp [abcd]x,/) { 1.8 + if (/^ cmp word ptr/ || /^ cmp [bcd]x,/) { 1.9 split($0,regs,",") 1.10 if (isnum(regs[2]) && regs[2] != 0 && 1.11 (regs[2] % 256) == 0) { 1.12 @@ -70,7 +70,7 @@ 1.13 else if (hold == 5) { 1.14 hold=0 1.15 if ($1 == "jae" || $1 == "jb") { 1.16 - sub(/word ptr/,"byte ptr",s); sub(/x,/,"h,",s) 1.17 + sub(/word ptr/,"byte ptr",s); sub(/x,/,"h,",s) || 1.18 sub(/\],/,"+1],",s) || sub(/,/,"+1,",s) 1.19 s = s "/256" 1.20 } 1.21 @@ -143,10 +143,10 @@ 1.22 } 1.23 } 1.24 if (/^ add word ptr/ || /^ sub word ptr/ || 1.25 - /^ add [abcd]x,/ || /^ sub [abcd]x,/) { 1.26 + /^ add [bcd]x,/ || /^ sub [bcd]x,/) { 1.27 split($0,args,",") 1.28 if (isnum(args[2]) && (args[2] % 256 == 0)) { 1.29 - sub(/word ptr/,"byte ptr",s); sub(/x,/,"h,",s) 1.30 + sub(/word ptr/,"byte ptr",s); sub(/x,/,"h,",s) || 1.31 sub(/\],/,"+1],",s) || sub(/,/,"+1,",s) 1.32 print s "/256"; next 1.33 } 1.34 @@ -158,7 +158,7 @@ 1.35 if (isnum(args[2])) { 1.36 if (args[2] % 16777216 == 0) { 1.37 sub(/dword/,"byte",s); 1.38 - sub(/ e/,"",s); sub(/x,/,"h,",s) 1.39 + sub(/ e/,"",s); sub(/x,/,"h,",s) || 1.40 sub(/\],/,"+3],",s) || sub(/,/,"+3,",s) 1.41 print s "/16777216"; next 1.42 }