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

linld: fix memcpy32 (16 low mem case)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Oct 23 08:25:49 2018 +0200 (2018-10-23)
parents c2946aeb8b57
children d7919052f62f
line diff
     1.1 --- a/linld/stuff/src/pipehole.awk	Wed Oct 10 15:54:03 2018 +0200
     1.2 +++ b/linld/stuff/src/pipehole.awk	Tue Oct 23 08:25:49 2018 +0200
     1.3 @@ -65,7 +65,9 @@
     1.4  	}
     1.5  	s=$0
     1.6  	# These optimisation may break ZF or CF
     1.7 -	if (/^	add	sp,4/) { print "	pop	cx"; print "	pop	cx"; next }
     1.8 +	if (/^	sub	sp,2$/) { print "	push	ax"; next }
     1.9 +	if (/^	sub	sp,4$/) { print "	push	ax"; print "	push	ax"; next }
    1.10 +	if (/^	add	sp,4$/) { print "	pop	cx"; print "	pop	cx"; next }
    1.11  	if (/^	mov	d*word ptr .*,0$/ || /^	mov	dword ptr .*,large 0$/) {
    1.12  		sub(/mov/,"and",s); print s; next	# slower
    1.13  	}