head	1.10;
access;
symbols
	netbsd-11-0-RC4:1.10
	netbsd-11-0-RC3:1.10
	netbsd-11-0-RC2:1.10
	netbsd-11-0-RC1:1.10
	perseant-exfatfs-base-20250801:1.10
	netbsd-11:1.10.0.126
	netbsd-11-base:1.10
	netbsd-10-1-RELEASE:1.10
	perseant-exfatfs-base-20240630:1.10
	perseant-exfatfs:1.10.0.124
	perseant-exfatfs-base:1.10
	netbsd-8-3-RELEASE:1.10
	netbsd-9-4-RELEASE:1.10
	netbsd-10-0-RELEASE:1.10
	netbsd-10-0-RC6:1.10
	netbsd-10-0-RC5:1.10
	netbsd-10-0-RC4:1.10
	netbsd-10-0-RC3:1.10
	netbsd-10-0-RC2:1.10
	thorpej-ifq:1.10.0.122
	thorpej-ifq-base:1.10
	thorpej-altq-separation:1.10.0.120
	thorpej-altq-separation-base:1.10
	netbsd-10-0-RC1:1.10
	netbsd-10:1.10.0.118
	netbsd-10-base:1.10
	bouyer-sunxi-drm:1.10.0.116
	bouyer-sunxi-drm-base:1.10
	netbsd-9-3-RELEASE:1.10
	thorpej-i2c-spi-conf2:1.10.0.114
	thorpej-i2c-spi-conf2-base:1.10
	thorpej-futex2:1.10.0.112
	thorpej-futex2-base:1.10
	thorpej-cfargs2:1.10.0.110
	thorpej-cfargs2-base:1.10
	cjep_sun2x-base1:1.10
	cjep_sun2x:1.10.0.108
	cjep_sun2x-base:1.10
	cjep_staticlib_x-base1:1.10
	netbsd-9-2-RELEASE:1.10
	cjep_staticlib_x:1.10.0.106
	cjep_staticlib_x-base:1.10
	thorpej-i2c-spi-conf:1.10.0.104
	thorpej-i2c-spi-conf-base:1.10
	thorpej-cfargs:1.10.0.102
	thorpej-cfargs-base:1.10
	thorpej-futex:1.10.0.100
	thorpej-futex-base:1.10
	netbsd-9-1-RELEASE:1.10
	bouyer-xenpvh-base2:1.10
	phil-wifi-20200421:1.10
	bouyer-xenpvh-base1:1.10
	phil-wifi-20200411:1.10
	bouyer-xenpvh:1.10.0.98
	bouyer-xenpvh-base:1.10
	is-mlppp:1.10.0.96
	is-mlppp-base:1.10
	phil-wifi-20200406:1.10
	netbsd-8-2-RELEASE:1.10
	ad-namecache-base3:1.10
	netbsd-9-0-RELEASE:1.10
	netbsd-9-0-RC2:1.10
	ad-namecache-base2:1.10
	ad-namecache-base1:1.10
	ad-namecache:1.10.0.94
	ad-namecache-base:1.10
	netbsd-9-0-RC1:1.10
	phil-wifi-20191119:1.10
	netbsd-9:1.10.0.92
	netbsd-9-base:1.10
	phil-wifi-20190609:1.10
	netbsd-8-1-RELEASE:1.10
	netbsd-8-1-RC1:1.10
	isaki-audio2:1.10.0.90
	isaki-audio2-base:1.10
	pgoyette-compat-merge-20190127:1.10
	pgoyette-compat-20190127:1.10
	pgoyette-compat-20190118:1.10
	pgoyette-compat-1226:1.10
	pgoyette-compat-1126:1.10
	pgoyette-compat-1020:1.10
	pgoyette-compat-0930:1.10
	pgoyette-compat-0906:1.10
	netbsd-7-2-RELEASE:1.10
	pgoyette-compat-0728:1.10
	netbsd-8-0-RELEASE:1.10
	phil-wifi:1.10.0.88
	phil-wifi-base:1.10
	pgoyette-compat-0625:1.10
	netbsd-8-0-RC2:1.10
	pgoyette-compat-0521:1.10
	pgoyette-compat-0502:1.10
	pgoyette-compat-0422:1.10
	netbsd-8-0-RC1:1.10
	pgoyette-compat-0415:1.10
	pgoyette-compat-0407:1.10
	pgoyette-compat-0330:1.10
	pgoyette-compat-0322:1.10
	pgoyette-compat-0315:1.10
	netbsd-7-1-2-RELEASE:1.10
	pgoyette-compat:1.10.0.86
	pgoyette-compat-base:1.10
	netbsd-7-1-1-RELEASE:1.10
	tls-maxphys-base-20171202:1.10
	matt-nb8-mediatek:1.10.0.84
	matt-nb8-mediatek-base:1.10
	nick-nhusb-base-20170825:1.10
	perseant-stdc-iso10646:1.10.0.82
	perseant-stdc-iso10646-base:1.10
	netbsd-8:1.10.0.80
	netbsd-8-base:1.10
	prg-localcount2-base3:1.10
	prg-localcount2-base2:1.10
	prg-localcount2-base1:1.10
	prg-localcount2:1.10.0.78
	prg-localcount2-base:1.10
	pgoyette-localcount-20170426:1.10
	bouyer-socketcan-base1:1.10
	jdolecek-ncq:1.10.0.76
	jdolecek-ncq-base:1.10
	pgoyette-localcount-20170320:1.10
	netbsd-7-1:1.10.0.74
	netbsd-7-1-RELEASE:1.10
	netbsd-7-1-RC2:1.10
	nick-nhusb-base-20170204:1.10
	netbsd-7-nhusb-base-20170116:1.10
	bouyer-socketcan:1.10.0.72
	bouyer-socketcan-base:1.10
	pgoyette-localcount-20170107:1.10
	netbsd-7-1-RC1:1.10
	nick-nhusb-base-20161204:1.10
	pgoyette-localcount-20161104:1.10
	netbsd-7-0-2-RELEASE:1.10
	nick-nhusb-base-20161004:1.10
	localcount-20160914:1.10
	netbsd-7-nhusb:1.10.0.70
	netbsd-7-nhusb-base:1.10
	pgoyette-localcount-20160806:1.10
	pgoyette-localcount-20160726:1.10
	pgoyette-localcount:1.10.0.68
	pgoyette-localcount-base:1.10
	nick-nhusb-base-20160907:1.10
	nick-nhusb-base-20160529:1.10
	netbsd-7-0-1-RELEASE:1.10
	nick-nhusb-base-20160422:1.10
	nick-nhusb-base-20160319:1.10
	nick-nhusb-base-20151226:1.10
	netbsd-7-0:1.10.0.66
	netbsd-7-0-RELEASE:1.10
	nick-nhusb-base-20150921:1.10
	netbsd-7-0-RC3:1.10
	netbsd-7-0-RC2:1.10
	netbsd-7-0-RC1:1.10
	nick-nhusb-base-20150606:1.10
	nick-nhusb-base-20150406:1.10
	nick-nhusb:1.10.0.64
	nick-nhusb-base:1.10
	netbsd-5-2-3-RELEASE:1.10
	netbsd-5-1-5-RELEASE:1.10
	netbsd-6-0-6-RELEASE:1.10
	netbsd-6-1-5-RELEASE:1.10
	netbsd-7:1.10.0.62
	netbsd-7-base:1.10
	yamt-pagecache-base9:1.10
	yamt-pagecache-tag8:1.10
	netbsd-6-1-4-RELEASE:1.10
	netbsd-6-0-5-RELEASE:1.10
	tls-earlyentropy:1.10.0.60
	tls-earlyentropy-base:1.10
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.10
	riastradh-drm2-base3:1.10
	netbsd-6-1-3-RELEASE:1.10
	netbsd-6-0-4-RELEASE:1.10
	netbsd-5-2-2-RELEASE:1.10
	netbsd-5-1-4-RELEASE:1.10
	netbsd-6-1-2-RELEASE:1.10
	netbsd-6-0-3-RELEASE:1.10
	netbsd-5-2-1-RELEASE:1.10
	netbsd-5-1-3-RELEASE:1.10
	rmind-smpnet-nbase:1.10
	netbsd-6-1-1-RELEASE:1.10
	riastradh-drm2-base2:1.10
	riastradh-drm2-base1:1.10
	riastradh-drm2:1.10.0.58
	riastradh-drm2-base:1.10
	rmind-smpnet:1.10.0.50
	rmind-smpnet-base:1.10
	netbsd-6-1:1.10.0.56
	netbsd-6-0-2-RELEASE:1.10
	netbsd-6-1-RELEASE:1.10
	khorben-n900:1.10.0.54
	netbsd-6-1-RC4:1.10
	netbsd-6-1-RC3:1.10
	agc-symver:1.10.0.52
	agc-symver-base:1.10
	netbsd-6-1-RC2:1.10
	netbsd-6-1-RC1:1.10
	yamt-pagecache-base8:1.10
	netbsd-5-2:1.10.0.48
	netbsd-6-0-1-RELEASE:1.10
	yamt-pagecache-base7:1.10
	netbsd-5-2-RELEASE:1.10
	netbsd-5-2-RC1:1.10
	matt-nb6-plus-nbase:1.10
	yamt-pagecache-base6:1.10
	netbsd-6-0:1.10.0.46
	netbsd-6-0-RELEASE:1.10
	netbsd-6-0-RC2:1.10
	tls-maxphys:1.10.0.44
	tls-maxphys-base:1.10
	matt-nb6-plus:1.10.0.42
	matt-nb6-plus-base:1.10
	netbsd-6-0-RC1:1.10
	jmcneill-usbmp-base10:1.10
	yamt-pagecache-base5:1.10
	jmcneill-usbmp-base9:1.10
	yamt-pagecache-base4:1.10
	jmcneill-usbmp-base8:1.10
	jmcneill-usbmp-base7:1.10
	jmcneill-usbmp-base6:1.10
	jmcneill-usbmp-base5:1.10
	jmcneill-usbmp-base4:1.10
	jmcneill-usbmp-base3:1.10
	jmcneill-usbmp-pre-base2:1.10
	jmcneill-usbmp-base2:1.10
	netbsd-6:1.10.0.40
	netbsd-6-base:1.10
	netbsd-5-1-2-RELEASE:1.10
	netbsd-5-1-1-RELEASE:1.10
	jmcneill-usbmp:1.10.0.38
	jmcneill-usbmp-base:1.10
	jmcneill-audiomp3:1.10.0.36
	jmcneill-audiomp3-base:1.10
	yamt-pagecache-base3:1.10
	yamt-pagecache-base2:1.10
	yamt-pagecache:1.10.0.34
	yamt-pagecache-base:1.10
	rmind-uvmplock-nbase:1.10
	cherry-xenmp:1.10.0.32
	cherry-xenmp-base:1.10
	jym-xensuspend-nbase:1.10
	uebayasi-xip-base7:1.10
	bouyer-quota2-nbase:1.10
	bouyer-quota2:1.10.0.30
	bouyer-quota2-base:1.10
	jruoho-x86intr:1.10.0.28
	jruoho-x86intr-base:1.10
	matt-mips64-premerge-20101231:1.10
	matt-nb5-mips64-premerge-20101231:1.10
	matt-nb5-pq3:1.10.0.26
	matt-nb5-pq3-base:1.10
	netbsd-5-1:1.10.0.24
	uebayasi-xip-base6:1.10
	uebayasi-xip-base5:1.10
	netbsd-5-1-RELEASE:1.10
	uebayasi-xip-base4:1.10
	uebayasi-xip-base3:1.10
	yamt-nfs-mp-base11:1.10
	netbsd-5-1-RC4:1.10
	matt-nb5-mips64-k15:1.10
	uebayasi-xip-base2:1.10
	yamt-nfs-mp-base10:1.10
	netbsd-5-1-RC3:1.10
	netbsd-5-1-RC2:1.10
	uebayasi-xip-base1:1.10
	netbsd-5-1-RC1:1.10
	rmind-uvmplock:1.10.0.22
	rmind-uvmplock-base:1.10
	yamt-nfs-mp-base9:1.10
	uebayasi-xip:1.10.0.20
	uebayasi-xip-base:1.10
	netbsd-5-0-2-RELEASE:1.10
	matt-nb5-mips64-premerge-20091211:1.10
	matt-premerge-20091211:1.10
	yamt-nfs-mp-base8:1.10
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.10
	matt-nb4-mips64-k7-u2a-k9b:1.10
	matt-nb5-mips64-u1-k1-k5:1.10
	yamt-nfs-mp-base7:1.10
	matt-nb5-mips64:1.10.0.18
	netbsd-5-0-1-RELEASE:1.10
	jymxensuspend-base:1.10
	yamt-nfs-mp-base6:1.10
	yamt-nfs-mp-base5:1.10
	yamt-nfs-mp-base4:1.10
	yamt-nfs-mp-base3:1.10
	nick-hppapmap-base4:1.10
	nick-hppapmap-base3:1.10
	netbsd-5-0:1.10.0.16
	netbsd-5-0-RELEASE:1.10
	netbsd-5-0-RC4:1.10
	netbsd-5-0-RC3:1.10
	nick-hppapmap-base2:1.10
	netbsd-5-0-RC2:1.10
	jym-xensuspend:1.10.0.14
	jym-xensuspend-base:1.10
	netbsd-5-0-RC1:1.10
	haad-dm-base2:1.10
	haad-nbase2:1.10
	ad-audiomp2:1.10.0.12
	ad-audiomp2-base:1.10
	netbsd-5:1.10.0.10
	netbsd-5-base:1.10
	nick-hppapmap:1.10.0.8
	nick-hppapmap-base:1.10
	matt-mips64-base2:1.10
	haad-dm-base1:1.10
	wrstuden-revivesa-base-4:1.10
	netbsd-4-0-1-RELEASE:1.8
	wrstuden-revivesa-base-3:1.10
	wrstuden-revivesa-base-2:1.10
	wrstuden-fixsa-newbase:1.8
	nick-csl-alignment-base5:1.8
	haad-dm:1.10.0.6
	haad-dm-base:1.10
	wrstuden-revivesa-base-1:1.10
	simonb-wapbl-nbase:1.10
	yamt-pf42-base4:1.10
	simonb-wapbl:1.10.0.4
	simonb-wapbl-base:1.10
	yamt-pf42-base3:1.10
	hpcarm-cleanup-nbase:1.10
	yamt-pf42-baseX:1.9
	yamt-pf42-base2:1.10
	yamt-nfs-mp-base2:1.10
	wrstuden-revivesa:1.10.0.2
	wrstuden-revivesa-base:1.10
	yamt-nfs-mp:1.9.0.4
	yamt-nfs-mp-base:1.9
	yamt-pf42:1.9.0.2
	yamt-pf42-base:1.9
	ad-socklock-base1:1.8
	yamt-lazymbuf-base15:1.8
	yamt-lazymbuf-base14:1.8
	keiichi-mipv6-nbase:1.8
	mjf-devfs2:1.8.0.58
	mjf-devfs2-base:1.10
	nick-net80211-sync:1.8.0.56
	nick-net80211-sync-base:1.8
	keiichi-mipv6:1.8.0.54
	keiichi-mipv6-base:1.8
	bouyer-xeni386-merge1:1.8
	matt-armv6-prevmlocking:1.8
	wrstuden-fixsa-base-1:1.8
	vmlocking2-base3:1.8
	netbsd-4-0:1.8.0.52
	netbsd-4-0-RELEASE:1.8
	bouyer-xeni386-nbase:1.8
	yamt-kmem-base3:1.8
	cube-autoconf:1.8.0.50
	cube-autoconf-base:1.8
	yamt-kmem-base2:1.8
	bouyer-xeni386:1.8.0.48
	bouyer-xeni386-base:1.8
	yamt-kmem:1.8.0.46
	yamt-kmem-base:1.8
	vmlocking2-base2:1.8
	reinoud-bufcleanup-nbase:1.8
	vmlocking2:1.8.0.44
	vmlocking2-base1:1.8
	netbsd-4-0-RC5:1.8
	matt-nb4-arm:1.8.0.42
	matt-nb4-arm-base:1.8
	matt-armv6-nbase:1.8
	jmcneill-base:1.8
	netbsd-4-0-RC4:1.8
	mjf-devfs:1.8.0.40
	mjf-devfs-base:1.8
	bouyer-xenamd64-base2:1.8
	vmlocking-nbase:1.8
	yamt-x86pmap-base4:1.8
	bouyer-xenamd64:1.8.0.38
	bouyer-xenamd64-base:1.8
	netbsd-4-0-RC3:1.8
	yamt-x86pmap-base3:1.8
	yamt-x86pmap-base2:1.8
	netbsd-4-0-RC2:1.8
	yamt-x86pmap:1.8.0.36
	yamt-x86pmap-base:1.8
	netbsd-4-0-RC1:1.8
	matt-armv6:1.8.0.34
	matt-armv6-base:1.8
	jmcneill-pm:1.8.0.32
	jmcneill-pm-base:1.8
	hpcarm-cleanup:1.8.0.30
	hpcarm-cleanup-base:1.8
	nick-csl-alignment:1.8.0.28
	nick-csl-alignment-base:1.8
	matt-mips64:1.8.0.26
	matt-mips64-base:1.8
	netbsd-3-1-1-RELEASE:1.6
	netbsd-3-0-3-RELEASE:1.6
	yamt-idlelwp-base8:1.8
	wrstuden-fixsa:1.8.0.24
	wrstuden-fixsa-base:1.8
	ppcoea-renovation:1.8.0.22
	ppcoea-renovation-base:1.8
	thorpej-atomic:1.8.0.20
	thorpej-atomic-base:1.8
	reinoud-bufcleanup:1.8.0.18
	reinoud-bufcleanup-base:1.8
	mjf-ufs-trans:1.8.0.16
	mjf-ufs-trans-base:1.8
	vmlocking:1.8.0.14
	vmlocking-base:1.8
	ad-audiomp:1.8.0.12
	ad-audiomp-base:1.8
	yamt-idlelwp:1.8.0.10
	post-newlock2-merge:1.8
	newlock2-nbase:1.8
	yamt-splraiseipl-base5:1.8
	yamt-splraiseipl-base4:1.8
	yamt-splraiseipl-base3:1.8
	abandoned-netbsd-4-base:1.8
	abandoned-netbsd-4:1.8.0.2
	netbsd-3-1:1.6.0.68
	netbsd-3-1-RELEASE:1.6
	netbsd-3-0-2-RELEASE:1.6
	yamt-splraiseipl-base2:1.8
	netbsd-3-1-RC4:1.6
	yamt-splraiseipl:1.8.0.6
	yamt-splraiseipl-base:1.8
	netbsd-3-1-RC3:1.6
	yamt-pdpolicy-base9:1.8
	newlock2:1.8.0.4
	newlock2-base:1.8
	yamt-pdpolicy-base8:1.8
	netbsd-3-1-RC2:1.6
	netbsd-3-1-RC1:1.6
	yamt-pdpolicy-base7:1.8
	netbsd-4:1.8.0.8
	netbsd-4-base:1.8
	yamt-pdpolicy-base6:1.8
	chap-midi-nbase:1.7
	netbsd-3-0-1-RELEASE:1.6
	gdamore-uart:1.6.0.66
	gdamore-uart-base:1.6
	simonb-timcounters-final:1.6
	yamt-pdpolicy-base5:1.6
	chap-midi:1.6.0.64
	chap-midi-base:1.7
	yamt-pdpolicy-base4:1.6
	yamt-pdpolicy-base3:1.6
	peter-altq-base:1.6
	peter-altq:1.6.0.62
	yamt-pdpolicy-base2:1.6
	elad-kernelauth-base:1.6
	elad-kernelauth:1.6.0.60
	yamt-pdpolicy:1.6.0.58
	yamt-pdpolicy-base:1.6
	yamt-uio_vmspace-base5:1.6
	simonb-timecounters:1.6.0.56
	simonb-timecounters-base:1.6
	rpaulo-netinet-merge-pcb:1.6.0.54
	rpaulo-netinet-merge-pcb-base:1.8
	yamt-uio_vmspace:1.6.0.52
	netbsd-3-0:1.6.0.50
	netbsd-3-0-RELEASE:1.6
	netbsd-3-0-RC6:1.6
	yamt-readahead-base3:1.6
	netbsd-3-0-RC5:1.6
	netbsd-3-0-RC4:1.6
	netbsd-3-0-RC3:1.6
	yamt-readahead-base2:1.6
	netbsd-3-0-RC2:1.6
	yamt-readahead-pervnode:1.6
	yamt-readahead-perfile:1.6
	yamt-readahead:1.6.0.48
	yamt-readahead-base:1.6
	netbsd-3-0-RC1:1.6
	yamt-vop-base3:1.6
	netbsd-2-0-3-RELEASE:1.6
	netbsd-2-1:1.6.0.46
	yamt-vop-base2:1.6
	thorpej-vnode-attr:1.6.0.44
	thorpej-vnode-attr-base:1.6
	netbsd-2-1-RELEASE:1.6
	yamt-vop:1.6.0.42
	yamt-vop-base:1.6
	netbsd-2-1-RC6:1.6
	netbsd-2-1-RC5:1.6
	netbsd-2-1-RC4:1.6
	netbsd-2-1-RC3:1.6
	netbsd-2-1-RC2:1.6
	netbsd-2-1-RC1:1.6
	yamt-lazymbuf:1.6.0.40
	yamt-km-base4:1.6
	netbsd-2-0-2-RELEASE:1.6
	yamt-km-base3:1.6
	netbsd-3:1.6.0.38
	netbsd-3-base:1.6
	yamt-km-base2:1.6
	yamt-km:1.6.0.34
	yamt-km-base:1.6
	kent-audio2:1.6.0.32
	kent-audio2-base:1.6
	netbsd-2-0-1-RELEASE:1.6
	kent-audio1-beforemerge:1.6
	netbsd-2:1.6.0.30
	netbsd-2-base:1.6
	kent-audio1:1.6.0.28
	kent-audio1-base:1.6
	netbsd-2-0-RELEASE:1.6
	netbsd-2-0-RC5:1.6
	netbsd-2-0-RC4:1.6
	netbsd-2-0-RC3:1.6
	netbsd-2-0-RC2:1.6
	netbsd-2-0-RC1:1.6
	netbsd-2-0:1.6.0.26
	netbsd-2-0-base:1.6
	netbsd-1-6-PATCH002-RELEASE:1.6
	netbsd-1-6-PATCH002:1.6
	netbsd-1-6-PATCH002-RC4:1.6
	netbsd-1-6-PATCH002-RC3:1.6
	netbsd-1-6-PATCH002-RC2:1.6
	netbsd-1-6-PATCH002-RC1:1.6
	ktrace-lwp:1.6.0.24
	ktrace-lwp-base:1.6
	netbsd-1-6-PATCH001:1.6
	netbsd-1-6-PATCH001-RELEASE:1.6
	netbsd-1-6-PATCH001-RC3:1.6
	netbsd-1-6-PATCH001-RC2:1.6
	netbsd-1-6-PATCH001-RC1:1.6
	nathanw_sa_end:1.6
	nathanw_sa_before_merge:1.6
	fvdl_fs64_base:1.6
	gmcgarry_ctxsw:1.6.0.22
	gmcgarry_ctxsw_base:1.6
	gmcgarry_ucred:1.6.0.20
	gmcgarry_ucred_base:1.6
	nathanw_sa_base:1.6
	kqueue-aftermerge:1.6
	kqueue-beforemerge:1.6
	netbsd-1-6-RELEASE:1.6
	netbsd-1-6-RC3:1.6
	netbsd-1-6-RC2:1.6
	netbsd-1-6-RC1:1.6
	netbsd-1-6:1.6.0.18
	netbsd-1-6-base:1.6
	gehenna-devsw:1.6.0.16
	gehenna-devsw-base:1.6
	netbsd-1-5-PATCH003:1.5
	eeh-devprop:1.6.0.14
	eeh-devprop-base:1.6
	newlock:1.6.0.12
	newlock-base:1.6
	ifpoll-base:1.6
	nathanw_sa:1.6.0.8
	thorpej-mips-cache:1.6.0.6
	thorpej-mips-cache-base:1.6
	thorpej-devvp-base3:1.6
	thorpej-devvp-base2:1.6
	post-chs-ubcperf:1.6
	pre-chs-ubcperf:1.6
	thorpej-devvp:1.6.0.2
	thorpej-devvp-base:1.6
	netbsd-1-5-PATCH002:1.5
	kqueue:1.6.0.4
	kqueue-base:1.6
	netbsd-1-5-PATCH001:1.5
	thorpej_scsipi_beforemerge:1.6
	thorpej_scsipi_nbase:1.6
	netbsd-1-5-RELEASE:1.5
	netbsd-1-5-BETA2:1.5
	netbsd-1-5-BETA:1.5
	netbsd-1-4-PATCH003:1.5
	netbsd-1-5-ALPHA2:1.5
	netbsd-1-5:1.5.0.22
	netbsd-1-5-base:1.5
	minoura-xpg4dl:1.5.0.20
	minoura-xpg4dl-base:1.5
	netbsd-1-4-PATCH002:1.5
	chs-ubc2-newbase:1.5
	wrstuden-devbsize-19991221:1.5
	wrstuden-devbsize:1.5.0.18
	wrstuden-devbsize-base:1.5
	kame_141_19991130:1.5
	comdex-fall-1999:1.5.0.16
	comdex-fall-1999-base:1.5
	fvdl-softdep:1.5.0.14
	fvdl-softdep-base:1.5
	thorpej_scsipi:1.5.0.12
	thorpej_scsipi_base:1.6
	netbsd-1-4-PATCH001:1.5
	kame_14_19990705:1.5
	kame_14_19990628:1.5
	kame:1.5.0.10
	chs-ubc2:1.5.0.8
	chs-ubc2-base:1.5
	netbsd-1-4-RELEASE:1.5
	netbsd-1-4:1.5.0.6
	netbsd-1-4-base:1.5
	netbsd-1-3-PATCH003:1.3
	netbsd-1-3-PATCH003-CANDIDATE2:1.3
	kenh-if-detach:1.5.0.4
	kenh-if-detach-base:1.5
	netbsd-1-3-PATCH003-CANDIDATE1:1.3
	netbsd-1-3-PATCH003-CANDIDATE0:1.3
	chs-ubc:1.5.0.2
	chs-ubc-base:1.5
	eeh-paddr_t:1.3.0.20
	eeh-paddr_t-base:1.3
	netbsd-1-3-PATCH002:1.3
	netbsd-1-3-PATCH001:1.3
	netbsd-1-3-RELEASE:1.3
	netbsd-1-3-BETA:1.3
	netbsd-1-3:1.3.0.18
	netbsd-1-3-base:1.3
	thorpej-signal:1.3.0.16
	thorpej-signal-base:1.3
	marc-pcmcia:1.3.0.14
	marc-pcmcia-bp:1.3
	marc-pcmcia-base:1.3
	bouyer-scsipi:1.3.0.12
	is-newarp-before-merge:1.3
	is-newarp:1.3.0.10
	is-newarp-base:1.3
	netbsd-1-2-PATCH001:1.3
	mrg-vm-swap:1.3.0.8
	thorpej-setroot:1.3.0.4
	netbsd-1-2-RELEASE:1.3
	netbsd-1-2-BETA:1.3
	netbsd-1-2:1.3.0.6
	netbsd-1-2-base:1.3
	netbsd-1-1-PATCH001:1.3
	netbsd-1-1-RELEASE:1.3
	netbsd-1-1:1.3.0.2
	netbsd-1-1-base:1.3
	netbsd-1-0-PATCH06:1.2
	netbsd-1-0-PATCH05:1.2
	netbsd-1-0-PATCH04:1.2
	netbsd-1-0-PATCH03:1.2
	netbsd-1-0-PATCH02:1.2
	netbsd-1-0-PATCH1:1.2
	netbsd-1-0-PATCH0:1.2
	netbsd-1-0-RELEASE:1.2
	netbsd-1-0:1.2.0.2
	netbsd-1-0-base:1.2;
locks; strict;
comment	@# @;


1.10
date	2008.04.28.20.23.26;	author martin;	state Exp;
branches;
next	1.9;

1.9
date	2008.03.28.22.27.33;	author apb;	state Exp;
branches
	1.9.2.1
	1.9.4.1;
next	1.8;

1.8
date	2006.06.24.03.28.42;	author tsutsui;	state Exp;
branches
	1.8.58.1;
next	1.7;

1.7
date	2006.06.18.05.21.21;	author gdamore;	state Exp;
branches;
next	1.6;

1.6
date	2000.12.06.21.31.05;	author is;	state Exp;
branches
	1.6.40.1
	1.6.54.1
	1.6.58.1
	1.6.64.1
	1.6.66.1;
next	1.5;

1.5
date	98.08.15.03.51.31;	author mycroft;	state Exp;
branches
	1.5.12.1;
next	1.4;

1.4
date	98.08.15.03.02.40;	author mycroft;	state Exp;
branches;
next	1.3;

1.3
date	94.10.26.07.48.49;	author cgd;	state Exp;
branches;
next	1.2;

1.2
date	94.07.07.01.51.18;	author mycroft;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	94.07.05.17.57.04;	author mycroft;	state Exp;
branches;
next	;

1.9.2.1
date	2008.05.18.12.32.20;	author yamt;	state Exp;
branches;
next	;

1.9.4.1
date	2008.05.16.02.22.43;	author yamt;	state Exp;
branches;
next	;

1.8.58.1
date	2008.04.03.12.42.20;	author mjf;	state Exp;
branches;
next	1.8.58.2;

1.8.58.2
date	2008.06.02.13.22.21;	author mjf;	state Exp;
branches;
next	;

1.6.40.1
date	2006.06.21.14.53.01;	author yamt;	state Exp;
branches;
next	1.6.40.2;

1.6.40.2
date	2006.12.30.20.46.24;	author yamt;	state Exp;
branches;
next	;

1.6.54.1
date	2006.09.09.02.40.59;	author rpaulo;	state Exp;
branches;
next	;

1.6.58.1
date	2006.06.26.12.44.54;	author yamt;	state Exp;
branches;
next	;

1.6.64.1
date	2006.06.19.03.44.26;	author chap;	state Exp;
branches;
next	;

1.6.66.1
date	2006.06.18.05.17.54;	author gdamore;	state Exp;
branches;
next	1.6.66.2;

1.6.66.2
date	2006.06.24.03.29.24;	author tsutsui;	state Exp;
branches;
next	;

1.5.12.1
date	2000.12.08.09.28.16;	author bouyer;	state Exp;
branches;
next	;

1.2.2.1
date	94.07.07.01.51.18;	author mycroft;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	94.07.07.01.51.19;	author mycroft;	state Exp;
branches;
next	;


desc
@@


1.10
log
@Remove clause 3 and 4 from TNF licenses
@
text
@#!/bin/sh
#	$NetBSD: asm2gas,v 1.9 2008/03/28 22:27:33 apb Exp $

#
# Copyright (c) 1998,2008 The NetBSD Foundation, Inc.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
# by Charles M. Hannum.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#

# This ugly script converts assembler code from Motorola's format to a
# form that gas (MIT syntax) can digest.

: ${SED:=sed}	# Which sed to use
P='%'		# Prefix for register names, may be '%' or ''

cat "$1" | "${SED}" -e '
  # format canonicalization

  # leave "#include" alone; change "#" and "*" comment lines to use "|".
  /^\#include/{p;d;}
  /^\#/{s//|#/;p;d;}
  /^\*/{s//|/;p;d;}
  /[ 	]IDNT[ 	]/{s/^/|/;p;d;}
  s/;/|/
  /[ 	]equ[ 	]/{
    s/\([A-Za-z_][A-Za-z0-9_]*\)[ 	]*equ[ 	]*/\1,/
    s/[ 	][ 	]*\(.*\)$/		|\1/
    s/		||/		|/
    s/^/	.set	/
    p;d
  }
  s/^\([A-Za-z_][A-Za-z0-9_]*\)[ 	][ 	]*/\1:	/
  s/^\([A-Za-z_][A-Za-z0-9_]*\)$/\1:/
  /^[A-Za-z_][A-Za-z0-9_]*:/{
    h
    s/:.*$/:/
    p
    g
    s/^.*:[ 	]*/	/
    /^	$/d
  }
  /^[ 	][ 	]*\([.a-zA-Z][.a-zA-Z0-9]*\)/{
    h
    s///
    s/^[ 	][ 	]*//
    s/[ 	][ 	]*\(.*\)$/		|\1/
    s/		||/		|/
    x
    s/^[ 	][ 	]*//
    s/[ 	][ 	]*.*$/	/
    y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
    s/^/	/
    G
    s/\n//
  }
' | "${SED}" -e '
  # operator conversion

  s/^	section	7/	.text/
  s/^	section	8/	.text/
  s/^	section	15/	.data/
  /^	include/{s/include[ 	]/.include "/;s/\.h[ 	]*$/.defs"/;p;d;}
  s/^	xref/|	xref/
  s/^	end/|	end/
  s/^	xdef/	.global/

  s/^	dc\.l/	.long/
  s/^	dc\.w/	.short/
  s/^	dc\.b/	.byte/

  /^	[aceg-z]/{
    /^	add[aiqx]*\.[bwl]	/{s/\.//;p;d;}
    /^	andi*\.[bwl]	/{s/\.//;p;d;}
    /^	as[lr]\.[bwl]	/{s/\.//;p;d;}
    /^	clr\.[bwl]	/{s/\.//;p;d;}
    /^	cmp[i2]*\.[bwl]	/{s/\.//;p;d;}
    /^	eori*\.[bwl]	/{s/\.//;p;d;}
    /^	lea\.l	/{s/\..//;p;d;}
    /^	ls[lr]\.[bwl]	/{s/\.//;p;d;}
    /^	move[acmqs]*\.[bwl]	/{s/\.//;p;d;}
    /^	mul[su]\.[wl]	/{s/\.//;p;d;}
    /^	neg\.[bwl]	/{s/\.//;p;d;}
    /^	ori*\.[bwl]	/{s/\.//;p;d;}
    /^	ro[lrx]*\.[bwl]	/{s/\.//;p;d;}
    /^	sub[aiqx]*\.[bwl]	/{s/\.//;p;d;}
    /^	swap\.w	/{s/\..//;p;d;}
    /^	s\([a-tv-z][a-z]*\)\.b	/{s/\..//;p;d;}
    /^	tst\.[bwl]	/{s/\.//;p;d;}
    p;d
  }

  /^	bchg\.[bl]	/{s/\..//;p;d;}
  /^	bclr\.[bl]	/{s/\..//;p;d;}
  /^	bset\.[bl]	/{s/\..//;p;d;}
  /^	btst\.[bl]	/{s/\..//;p;d;}
  /^	div[sul]*\.[wl]	/{s/\.//;p;d;}
  /^	fabs\.[sdx]	/{s/\.//;p;d;}
  /^	fadd\.[sdxbwl]	/{s/\.//;p;d;}
  /^	fcmp\.[sdxbwl]	/{s/\.//;p;d;}
  /^	fdiv\.[sdx]	/{s/\.//;p;d;}
  /^	fmove[mx]*\.[sdxbwl]	/{s/\.//;p;d;}
  /^	fmul\.[sdx]	/{s/\.//;p;d;}
  /^	fneg\.[sdx]	/{s/\.//;p;d;}
  /^	fsqrt\.[sdx]	/{s/\.//;p;d;}
  /^	fsub\.[sdxbwl]	/{s/\.//;p;d;}
  /^	ftst\.[sdx]	/{s/\.//;p;d;}

  /^	b[a-eg-z][a-z]*\.b	/{s/\.b/s/;p;d;}
  /^	b[a-eg-z][a-z]*\.w	/{s/\.w//;p;d;}
  /^	b[a-eg-z][a-z]*\.l	/{s/\.l/l/;p;d;}
  /^	db[a-z][a-z]*\.w	/{s/\.w//;p;d;}
  /^	fb[a-eg-z][a-z]*\.w	/{s/\.w//;p;d;}
  /^	fb[a-eg-z][a-z]*\.l	/{s/\.l/l/;p;d;}
' | "${SED}" -e '
  # operand conversion

  # register names "FPIAR" -> "%FPI", etc., possibly without the "%"
  s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1'"$P"'FPI\2/g
  s/\([^_a-zA-Z0-9]\)FPIAR$/\1'"$P"'FPI/g
  s/\([^_a-zA-Z0-9]\)fpiar\([^_a-zA-Z0-9]\)/\1'"$P"'fpi\2/g
  s/\([^_a-zA-Z0-9]\)fpiar$/\1'"$P"'fpi/g
  s/\([^_a-zA-Z0-9]\)FPCR\([^_a-zA-Z0-9]\)/\1'"$P"'FPCR\2/g
  s/\([^_a-zA-Z0-9]\)FPCR$/\1'"$P"'FPCR/g
  s/\([^_a-zA-Z0-9]\)fpcr\([^_a-zA-Z0-9]\)/\1'"$P"'fpcr\2/g
  s/\([^_a-zA-Z0-9]\)fpcr$/\1'"$P"'fpcr/g
  s/\([^_a-zA-Z0-9]\)FPSR\([^_a-zA-Z0-9]\)/\1'"$P"'FPSR\2/g
  s/\([^_a-zA-Z0-9]\)FPSR$/\1'"$P"'FPSR/g
  s/\([^_a-zA-Z0-9]\)fpsr\([^_a-zA-Z0-9]\)/\1'"$P"'fpsr\2/g
  s/\([^_a-zA-Z0-9]\)fpsr$/\1'"$P"'fpsr/g

  # Hexadecimal numbers
  s/\$\([0-9a-fA-F]\)/0x\1/g
  s/#:/#:0x/g

  # Insert "%" before more register names (only if $P = "%").
  # Some of the rules are repeated because of overlap between trailing
  # context in one match and leading context in another match; otherwise
  # only half the register names in "d4{d3:4},d0" would be converted.
  s/\([^[:alnum:]_%]\)\([dDaA][0-7]\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\([fF][pP][0-7]\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\(sp\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\(pc\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g

  s/\([^[:alnum:]_%]\)\([dDaA][0-7]\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\([fF][pP][0-7]\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\(sp\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\(pc\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g

  s/\([^[:alnum:]_%]\)\([dDaA][0-7]\)$/\1'"$P"'\2/g
  s/\([^[:alnum:]_%]\)\([dDaA][0-7]\)$/\1'"$P"'\2/g
  s/\([^[:alnum:]_%]\)\([fF][pP][0-7]\)$/\1'"$P"'\2/g
  s/\([^[:alnum:]_%]\)\(sp\)$/\1'"$P"'\2/g

  s/\(,\)\([dDaA][0-7]\)/\1'"$P"'\2/g
  s/\(,\)\([fF][pP][0-7]\)/\1'"$P"'\2/g

  # "-(%sp)" -> "%sp@@-", etc. (possibly without the "%")
  s/-(\('"$P"'[sSpPaA][pPcC0-7]\))/\1@@-/g
  # "(%sp)+" -> "%sp@@+", etc. (possibly without the "%")
  s/(\('"$P"'[sSpPaA][pPcC0-7]\))+/\1@@+/g
  # "foo(%sp,...)" -> "%sp@@(foo,...)", etc. (possibly without the "%")
  s/\([-+A-Za-z0-9_]*\)(\('"$P"'[sSpPaA][pPcC0-7]\)\([),]\)/\2@@(\1\3/g

  # ".w" -> ":w"; ".w*nn" -> ":w:nn"; "*nn" -> ":l:nn"; etc.
  s/\.\([bBwWlL])\)/:\1/g
  s/\.\([bBwWlL]\)\*\([0-9][0-9]*)\)/:\1:\2/g
  s/\*\([0-9][0-9]*\))/:l:\1)/g
  # "{nn:mm}" -> "{#nn:#mm}"
  s/{\([0-9][0-9]*\):\([0-9][0-9]*\)}/{#\1:#\2}/g
  # "{%d0:nn}" -> "{%d0:#nn}", etc. (possibly without the "%")
  s/{\('"$P"'[dD][0-7]\):\([0-9][0-9]*\)}/{\1:#\2}/g

  # Remove empty "()" or "(0)" after "@@"
  s/@@(0*)/@@/g
  # Remove leading "," or trailing ":" in parentheses
  s/(,/(/g;s/:)/)/g

  # make up for a gas bug
  /^	fmovemx	/{
	s/	\('"$P"'[fF][pP][0-7]\),/	\1-\1,/
	s/,\('"$P"'[fF][pP][0-7]\)	/,\1-\1	/
	s/,\('"$P"'[fF][pP][0-7]\)$/,\1-\1/
  }
' | "${SED}" -e '
  # Floating point literal conversion

  s/:0x41dfffffffc00000/0r2147483647.0/g
  s/:0xc1e0000000000000/0r-2147483648.0/g
  s/:0x41dfffffffe00000/0r2147483647.5/g
  s/:0xc1e0000000100000/0r-2147483648.5/g
  s/:0x46fffe00/0r32767.0/g
  s/:0xc7000000/0r-32768.0/g
  s/:0x46ffff00/0r32767.5/g
  s/:0xc7000080/0r-32768.5/g
  s/:0x42fe0000/0r127.0/g
  s/:0xc3000000/0r-128.0/g
  s/:0x42ff0000/0r127.5/g
  s/:0xc3008000/0r-128.5/g
  s/:0x3F800000/0r1.0/g
  s/:0x00000000/0r0.0/g
  s/:0xBF800000/0r-1.0/g
  s/:0x3F000000/0r0.5/g
  s/:0x3E800000/0r0.25/g
  s/:0x42B8AA3B/0r92.332481384277343750/g
  s/:0xBC317218/0r-0.0108304247260093688964843750/g
  s/:0x3AB60B70/0r0.001388890668749809265136718750/g
  s/:0x3C088895/0r0.0083333449438214302062988281250/g
  s/:0x42B8AA3B/0r92.332481384277343750/g
  s/:0x3950097B/0r0.0001983995753107592463493347167968750/g
  s/:0x3AB60B6A/0r0.001388889970257878303527832031250/g
  s/:0x2F30CAA8/0r1.60791047143504783889511600136756896972656250e-10/g
  s/:0x310F8290/0r2.0883454965314740547910332679748535156250e-09/g
  s/:0x32D73220/0r2.5052088403754169121384620666503906250e-08/g
  s/:0x3493F281/0r2.755732850800995947793126106262207031250e-07/g
  s/:0x40000000/0r2.0/g
  s/:0x42800000/0r6.40e+01/g
  s/:0x3C800000/0r1.56250e-02/g
  s/fadds	#:0x00800000,'"$P"'[fF][pP]0/	.long	0xf23c4422,0x00800000/
  s/fsubs	#:0x00800000,'"$P"'[fF][pP]0/	.long	0xf23c4428,0x00800000/
  s/fsubs	#:0x00800000,'"$P"'[fF][pP]1/	.long	0xf23c44a8,0x00800000/
  s/fmoves	#:0x80000000,'"$P"'[fF][pP]0/	.long	0xf23c4400,0x80000000/
  s/fmoves		#:0x00000000,'"$P"'[fF][pP]0/	.long	0xf23c4400,0x00000000/

'
@


1.9
log
@Synchronise the two asm2gas scripts in sys/arch/m68k/060sp and
sys/arch/m68k/fpsp:

* The fpsp/asm2gas sed script previously hardcoded the fact that
  registers needed a '%' prefix, and the 060sp/asm2gas sed scrip
  previously did not have rules related to inserting '%' before register
  names.  Now, both scripts have the same rules, but the rules are
  parapeterised to use "$P", which is set to '' or '%' as appropriate.

* Some other minor changes to the sed scripts.

The new asm2gas scripts have been verified to produce identical output
to the old asm2gas scripts, for all inputs in 060sp/dist/*.sa and
fpsp/*.sa, except for some differences inside comments.

Thanks to Izumi Tsutsui for suggesting that these scripts should be
synchronised.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.8 2006/06/24 03:28:42 tsutsui Exp $
a18 7
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#        This product includes software developed by the NetBSD
#        Foundation, Inc. and its contributors.
# 4. Neither the name of The NetBSD Foundation nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
@


1.9.2.1
log
@sync with head.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.9 2008/03/28 22:27:33 apb Exp $
d19 7
@


1.9.4.1
log
@sync with head.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.9 2008/03/28 22:27:33 apb Exp $
d19 7
@


1.8
log
@Pass sed command path to asm2gas via environment
rather than arg. ok'ed by gdamore.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.7 2006/06/18 05:21:21 gdamore Exp $
d5 1
a5 1
# Copyright (c) 1998 The NetBSD Foundation, Inc.
d43 4
a46 2
: ${SED:=sed}
cat $1 | ${SED} -e '
d49 4
a53 1
  /^\*/{s//|/;p;d;}
d86 1
a86 1
' | ${SED} -e '
d144 1
a144 1
' | ${SED} -e '
d147 13
a159 12
  s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1%FPI\2/g
  s/\([^_a-zA-Z0-9]\)FPIAR$/\1%FPI/g
  s/\([^_a-zA-Z0-9]\)fpiar\([^_a-zA-Z0-9]\)/\1%fpi\2/g
  s/\([^_a-zA-Z0-9]\)fpiar$/\1%fpi/g
  s/\([^_a-zA-Z0-9]\)FPCR\([^_a-zA-Z0-9]\)/\1%FPCR\2/g
  s/\([^_a-zA-Z0-9]\)FPCR$/\1%FPCR/g
  s/\([^_a-zA-Z0-9]\)fpcr\([^_a-zA-Z0-9]\)/\1%fpcr\2/g
  s/\([^_a-zA-Z0-9]\)fpcr$/\1%fpcr/g
  s/\([^_a-zA-Z0-9]\)FPSR\([^_a-zA-Z0-9]\)/\1%FPSR\2/g
  s/\([^_a-zA-Z0-9]\)FPSR$/\1%FPSR/g
  s/\([^_a-zA-Z0-9]\)fpsr\([^_a-zA-Z0-9]\)/\1%fpsr\2/g
  s/\([^_a-zA-Z0-9]\)fpsr$/\1%fpsr/g
d161 2
a162 1
  s/\$/0x/g
d165 28
a192 15
  s/\([^[:alnum:]_]\)\([dDaA][0-7]\)\([^[:alnum:]_]\)/\1%\2\3/g
  s/\([^[:alnum:]_]\)\([fF][pP][0-7]\)\([^[:alnum:]_]\)/\1%\2\3/g
  s/\([^[:alnum:]_]\)\(sp\)\([^[:alnum:]_]\)/\1%\2\3/g
  s/\([^[:alnum:]_]\)\(pc\)\([^[:alnum:]_]\)/\1%\2\3/g

  s/\([^[:alnum:]_]\)\([dDaA][0-7]\)$/\1%\2/g
  s/\([^[:alnum:]_]\)\([fF][pP][0-7]\)$/\1%\2/g
  s/\([^[:alnum:]_]\)\(sp\)$/\1%\2/g

  s/\(,\)\([dDaA][0-7]\)/\1%\2/g
  s/\(,\)\([fF][pP][0-7]\)/\1%\2/g

  s/-(\(%[sSpPaA][pPcC0-7]\))/\1@@-/g
  s/(\(%[sSpPaA][pPcC0-7]\))+/\1@@+/g
  s/\([-+A-Za-z0-9_]*\)(\(%[sSpPaA][pPcC0-7]\)\([),]\)/\2@@(\1\3/g
d194 1
d198 1
d200 2
a201 9
  s/{\(%[dD][0-7]\):\([0-9][0-9]*\)}/{\1:#\2}/g
  s/{\([dD][0-7]\):\([0-9][0-9]*\)}/{%\1:#\2}/g
  s/{\([dD][0-7]\):\(%[dD][0-9]*\)}/{%\1:\2}/g

  s/\(-\)\([dDaA][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g
  s/\(-\)\([fF][pP][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g

  s/\(\/\)\([dDaA][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g
  s/\(\/\)\([fF][pP][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g
d203 1
d205 1
d210 3
a212 3
	s/	\(%[fF][pP][0-7]\),/	\1-\1,/
	s/,\(%[fF][pP][0-7]\)	/,\1-\1	/
	s/,\(%[fF][pP][0-7]\)$/,\1-\1/
d214 1
a214 1
' | ${SED} -e '
d248 5
a252 5
  s/fadds	#:0x00800000,%[fF][pP]0/	.long	0xf23c4422,0x00800000/
  s/fsubs	#:0x00800000,%[fF][pP]0/	.long	0xf23c4428,0x00800000/
  s/fsubs	#:0x00800000,%[fF][pP]1/	.long	0xf23c44a8,0x00800000/
  s/fmoves	#:0x80000000,%[fF][pP]0/	.long	0xf23c4400,0x80000000/
  s/fmoves		#:0x00000000,%[fF][pP]0/	.long	0xf23c4400,0x00000000/
@


1.8.58.1
log
@Sync with HEAD.
@
text
@d2 1
a2 1
#	$NetBSD$
d5 1
a5 1
# Copyright (c) 1998,2008 The NetBSD Foundation, Inc.
d43 2
a44 4
: ${SED:=sed}	# Which sed to use
P='%'		# Prefix for register names, may be '%' or ''

cat "$1" | "${SED}" -e '
d47 1
a47 3
  # leave "#include" alone; change "#" and "*" comment lines to use "|".
  /^\#include/{p;d;}
  /^\#/{s//|#/;p;d;}
a48 1
  /[ 	]IDNT[ 	]/{s/^/|/;p;d;}
d81 1
a81 1
' | "${SED}" -e '
d139 1
a139 1
' | "${SED}" -e '
d142 12
a153 13
  # register names "FPIAR" -> "%FPI", etc., possibly without the "%"
  s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1'"$P"'FPI\2/g
  s/\([^_a-zA-Z0-9]\)FPIAR$/\1'"$P"'FPI/g
  s/\([^_a-zA-Z0-9]\)fpiar\([^_a-zA-Z0-9]\)/\1'"$P"'fpi\2/g
  s/\([^_a-zA-Z0-9]\)fpiar$/\1'"$P"'fpi/g
  s/\([^_a-zA-Z0-9]\)FPCR\([^_a-zA-Z0-9]\)/\1'"$P"'FPCR\2/g
  s/\([^_a-zA-Z0-9]\)FPCR$/\1'"$P"'FPCR/g
  s/\([^_a-zA-Z0-9]\)fpcr\([^_a-zA-Z0-9]\)/\1'"$P"'fpcr\2/g
  s/\([^_a-zA-Z0-9]\)fpcr$/\1'"$P"'fpcr/g
  s/\([^_a-zA-Z0-9]\)FPSR\([^_a-zA-Z0-9]\)/\1'"$P"'FPSR\2/g
  s/\([^_a-zA-Z0-9]\)FPSR$/\1'"$P"'FPSR/g
  s/\([^_a-zA-Z0-9]\)fpsr\([^_a-zA-Z0-9]\)/\1'"$P"'fpsr\2/g
  s/\([^_a-zA-Z0-9]\)fpsr$/\1'"$P"'fpsr/g
d155 1
a155 2
  # Hexadecimal numbers
  s/\$\([0-9a-fA-F]\)/0x\1/g
d158 15
a172 28
  # Insert "%" before more register names (only if $P = "%").
  # Some of the rules are repeated because of overlap between trailing
  # context in one match and leading context in another match; otherwise
  # only half the register names in "d4{d3:4},d0" would be converted.
  s/\([^[:alnum:]_%]\)\([dDaA][0-7]\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\([fF][pP][0-7]\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\(sp\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\(pc\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g

  s/\([^[:alnum:]_%]\)\([dDaA][0-7]\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\([fF][pP][0-7]\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\(sp\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g
  s/\([^[:alnum:]_%]\)\(pc\)\([^[:alnum:]_]\)/\1'"$P"'\2\3/g

  s/\([^[:alnum:]_%]\)\([dDaA][0-7]\)$/\1'"$P"'\2/g
  s/\([^[:alnum:]_%]\)\([dDaA][0-7]\)$/\1'"$P"'\2/g
  s/\([^[:alnum:]_%]\)\([fF][pP][0-7]\)$/\1'"$P"'\2/g
  s/\([^[:alnum:]_%]\)\(sp\)$/\1'"$P"'\2/g

  s/\(,\)\([dDaA][0-7]\)/\1'"$P"'\2/g
  s/\(,\)\([fF][pP][0-7]\)/\1'"$P"'\2/g

  # "-(%sp)" -> "%sp@@-", etc. (possibly without the "%")
  s/-(\('"$P"'[sSpPaA][pPcC0-7]\))/\1@@-/g
  # "(%sp)+" -> "%sp@@+", etc. (possibly without the "%")
  s/(\('"$P"'[sSpPaA][pPcC0-7]\))+/\1@@+/g
  # "foo(%sp,...)" -> "%sp@@(foo,...)", etc. (possibly without the "%")
  s/\([-+A-Za-z0-9_]*\)(\('"$P"'[sSpPaA][pPcC0-7]\)\([),]\)/\2@@(\1\3/g
a173 1
  # ".w" -> ":w"; ".w*nn" -> ":w:nn"; "*nn" -> ":l:nn"; etc.
a176 1
  # "{nn:mm}" -> "{#nn:#mm}"
d178 9
a186 2
  # "{%d0:nn}" -> "{%d0:#nn}", etc. (possibly without the "%")
  s/{\('"$P"'[dD][0-7]\):\([0-9][0-9]*\)}/{\1:#\2}/g
a187 1
  # Remove empty "()" or "(0)" after "@@"
a188 1
  # Remove leading "," or trailing ":" in parentheses
d193 3
a195 3
	s/	\('"$P"'[fF][pP][0-7]\),/	\1-\1,/
	s/,\('"$P"'[fF][pP][0-7]\)	/,\1-\1	/
	s/,\('"$P"'[fF][pP][0-7]\)$/,\1-\1/
d197 1
a197 1
' | "${SED}" -e '
d231 5
a235 5
  s/fadds	#:0x00800000,'"$P"'[fF][pP]0/	.long	0xf23c4422,0x00800000/
  s/fsubs	#:0x00800000,'"$P"'[fF][pP]0/	.long	0xf23c4428,0x00800000/
  s/fsubs	#:0x00800000,'"$P"'[fF][pP]1/	.long	0xf23c44a8,0x00800000/
  s/fmoves	#:0x80000000,'"$P"'[fF][pP]0/	.long	0xf23c4400,0x80000000/
  s/fmoves		#:0x00000000,'"$P"'[fF][pP]0/	.long	0xf23c4400,0x00000000/
@


1.8.58.2
log
@Sync with HEAD.
@
text
@d19 7
@


1.7
log
@Use TOOL_SED for asm2gas, which makes it possible to cross-compile this
on Solaris 10.  (Solaris 10's sed doesn't like the comment lines, and
also complains about too many commands in the input.)
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.6.66.1 2006/06/18 05:17:54 gdamore Exp $
d43 2
a44 2
SED=$1
cat $2 | ${SED} -e '
@


1.6
log
@Make this new-GAS ready. Code by Steve Woodford.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.5 1998/08/15 03:51:31 mycroft Exp $
d43 2
a44 1
cat $1 | sed -e '
d81 1
a81 1
' | sed -e '
d139 1
a139 1
' | sed -e '
d197 1
a197 1
' | sed -e '
@


1.6.54.1
log
@sync with head
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.8 2006/06/24 03:28:42 tsutsui Exp $
d43 1
a43 2
: ${SED:=sed}
cat $1 | ${SED} -e '
d80 1
a80 1
' | ${SED} -e '
d138 1
a138 1
' | ${SED} -e '
d196 1
a196 1
' | ${SED} -e '
@


1.6.58.1
log
@sync with head.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.6 2000/12/06 21:31:05 is Exp $
d43 1
a43 2
: ${SED:=sed}
cat $1 | ${SED} -e '
d80 1
a80 1
' | ${SED} -e '
d138 1
a138 1
' | ${SED} -e '
d196 1
a196 1
' | ${SED} -e '
@


1.6.40.1
log
@sync with head.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.6 2000/12/06 21:31:05 is Exp $
d43 1
a43 2
SED=$1
cat $2 | ${SED} -e '
d80 1
a80 1
' | ${SED} -e '
d138 1
a138 1
' | ${SED} -e '
d196 1
a196 1
' | ${SED} -e '
@


1.6.40.2
log
@sync with head.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.6.40.1 2006/06/21 14:53:01 yamt Exp $
d43 2
a44 2
: ${SED:=sed}
cat $1 | ${SED} -e '
@


1.6.64.1
log
@Sync with head.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.7 2006/06/18 05:21:21 gdamore Exp $
d43 1
a43 2
SED=$1
cat $2 | ${SED} -e '
d80 1
a80 1
' | ${SED} -e '
d138 1
a138 1
' | ${SED} -e '
d196 1
a196 1
' | ${SED} -e '
@


1.6.66.1
log
@Use TOOL_SED for asm2gas, which makes it possible to cross-compile this
on Solaris 10.  (Solaris 10's sed doesn't like the comment lines, and
also complains about too many commands in the input.)
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.6 2000/12/06 21:31:05 is Exp $
d43 1
a43 2
SED=$1
cat $2 | ${SED} -e '
d80 1
a80 1
' | ${SED} -e '
d138 1
a138 1
' | ${SED} -e '
d196 1
a196 1
' | ${SED} -e '
@


1.6.66.2
log
@Pass sed command path to asm2gas via environment
rather than arg. ok'ed by gdamore.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.6.66.1 2006/06/18 05:17:54 gdamore Exp $
d43 2
a44 2
: ${SED:=sed}
cat $1 | ${SED} -e '
@


1.5
log
@Assign copyrights to TNF.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.4 1998/08/15 03:02:40 mycroft Exp $
d141 12
a152 6
  s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1FPI\2/g
  s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1FPI\2/g
  s/\([^_a-zA-Z0-9]\)FPIAR$/\1FPI/g
  s/\([^_a-zA-Z0-9]\)fpiar\([^_a-zA-Z0-9]\)/\1fpi\2/g
  s/\([^_a-zA-Z0-9]\)fpiar\([^_a-zA-Z0-9]\)/\1fpi\2/g
  s/\([^_a-zA-Z0-9]\)fpiar$/\1fpi/g
d157 15
a171 3
  s/-(\([sSpPaA][pPcC0-7]\))/\1@@-/g
  s/(\([sSpPaA][pPcC0-7]\))+/\1@@+/g
  s/\([-+A-Za-z0-9_]*\)(\([sSpPaA][pPcC0-7]\)\([),]\)/\2@@(\1\3/g
d177 9
a185 1
  s/{\([dD][0-7]\):\([0-9][0-9]*\)}/{\1:#\2}/g
d192 3
a194 3
	s/	\([fF][pP][0-7]\),/	\1-\1,/
	s/,\([fF][pP][0-7]\)	/,\1-\1	/
	s/,\([fF][pP][0-7]\)$/,\1-\1/
d196 40
@


1.5.12.1
log
@Sync with HEAD.
@
text
@d2 1
a2 1
#	$NetBSD$
d141 6
a146 12
  s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1%FPI\2/g
  s/\([^_a-zA-Z0-9]\)FPIAR$/\1%FPI/g
  s/\([^_a-zA-Z0-9]\)fpiar\([^_a-zA-Z0-9]\)/\1%fpi\2/g
  s/\([^_a-zA-Z0-9]\)fpiar$/\1%fpi/g
  s/\([^_a-zA-Z0-9]\)FPCR\([^_a-zA-Z0-9]\)/\1%FPCR\2/g
  s/\([^_a-zA-Z0-9]\)FPCR$/\1%FPCR/g
  s/\([^_a-zA-Z0-9]\)fpcr\([^_a-zA-Z0-9]\)/\1%fpcr\2/g
  s/\([^_a-zA-Z0-9]\)fpcr$/\1%fpcr/g
  s/\([^_a-zA-Z0-9]\)FPSR\([^_a-zA-Z0-9]\)/\1%FPSR\2/g
  s/\([^_a-zA-Z0-9]\)FPSR$/\1%FPSR/g
  s/\([^_a-zA-Z0-9]\)fpsr\([^_a-zA-Z0-9]\)/\1%fpsr\2/g
  s/\([^_a-zA-Z0-9]\)fpsr$/\1%fpsr/g
d151 3
a153 15
  s/\([^[:alnum:]_]\)\([dDaA][0-7]\)\([^[:alnum:]_]\)/\1%\2\3/g
  s/\([^[:alnum:]_]\)\([fF][pP][0-7]\)\([^[:alnum:]_]\)/\1%\2\3/g
  s/\([^[:alnum:]_]\)\(sp\)\([^[:alnum:]_]\)/\1%\2\3/g
  s/\([^[:alnum:]_]\)\(pc\)\([^[:alnum:]_]\)/\1%\2\3/g

  s/\([^[:alnum:]_]\)\([dDaA][0-7]\)$/\1%\2/g
  s/\([^[:alnum:]_]\)\([fF][pP][0-7]\)$/\1%\2/g
  s/\([^[:alnum:]_]\)\(sp\)$/\1%\2/g

  s/\(,\)\([dDaA][0-7]\)/\1%\2/g
  s/\(,\)\([fF][pP][0-7]\)/\1%\2/g

  s/-(\(%[sSpPaA][pPcC0-7]\))/\1@@-/g
  s/(\(%[sSpPaA][pPcC0-7]\))+/\1@@+/g
  s/\([-+A-Za-z0-9_]*\)(\(%[sSpPaA][pPcC0-7]\)\([),]\)/\2@@(\1\3/g
d159 1
a159 9
  s/{\(%[dD][0-7]\):\([0-9][0-9]*\)}/{\1:#\2}/g
  s/{\([dD][0-7]\):\([0-9][0-9]*\)}/{%\1:#\2}/g
  s/{\([dD][0-7]\):\(%[dD][0-9]*\)}/{%\1:\2}/g

  s/\(-\)\([dDaA][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g
  s/\(-\)\([fF][pP][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g

  s/\(\/\)\([dDaA][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g
  s/\(\/\)\([fF][pP][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g
d166 3
a168 3
	s/	\(%[fF][pP][0-7]\),/	\1-\1,/
	s/,\(%[fF][pP][0-7]\)	/,\1-\1	/
	s/,\(%[fF][pP][0-7]\)$/,\1-\1/
a169 40
' | sed -e '
  # Floating point literal conversion

  s/:0x41dfffffffc00000/0r2147483647.0/g
  s/:0xc1e0000000000000/0r-2147483648.0/g
  s/:0x41dfffffffe00000/0r2147483647.5/g
  s/:0xc1e0000000100000/0r-2147483648.5/g
  s/:0x46fffe00/0r32767.0/g
  s/:0xc7000000/0r-32768.0/g
  s/:0x46ffff00/0r32767.5/g
  s/:0xc7000080/0r-32768.5/g
  s/:0x42fe0000/0r127.0/g
  s/:0xc3000000/0r-128.0/g
  s/:0x42ff0000/0r127.5/g
  s/:0xc3008000/0r-128.5/g
  s/:0x3F800000/0r1.0/g
  s/:0x00000000/0r0.0/g
  s/:0xBF800000/0r-1.0/g
  s/:0x3F000000/0r0.5/g
  s/:0x3E800000/0r0.25/g
  s/:0x42B8AA3B/0r92.332481384277343750/g
  s/:0xBC317218/0r-0.0108304247260093688964843750/g
  s/:0x3AB60B70/0r0.001388890668749809265136718750/g
  s/:0x3C088895/0r0.0083333449438214302062988281250/g
  s/:0x42B8AA3B/0r92.332481384277343750/g
  s/:0x3950097B/0r0.0001983995753107592463493347167968750/g
  s/:0x3AB60B6A/0r0.001388889970257878303527832031250/g
  s/:0x2F30CAA8/0r1.60791047143504783889511600136756896972656250e-10/g
  s/:0x310F8290/0r2.0883454965314740547910332679748535156250e-09/g
  s/:0x32D73220/0r2.5052088403754169121384620666503906250e-08/g
  s/:0x3493F281/0r2.755732850800995947793126106262207031250e-07/g
  s/:0x40000000/0r2.0/g
  s/:0x42800000/0r6.40e+01/g
  s/:0x3C800000/0r1.56250e-02/g
  s/fadds	#:0x00800000,%[fF][pP]0/	.long	0xf23c4422,0x00800000/
  s/fsubs	#:0x00800000,%[fF][pP]0/	.long	0xf23c4428,0x00800000/
  s/fsubs	#:0x00800000,%[fF][pP]1/	.long	0xf23c44a8,0x00800000/
  s/fmoves	#:0x80000000,%[fF][pP]0/	.long	0xf23c4400,0x80000000/
  s/fmoves		#:0x00000000,%[fF][pP]0/	.long	0xf23c4400,0x00000000/

@


1.4
log
@Make copyright notices with my name consistent.
@
text
@d2 1
a2 1
#	$NetBSD: asm2gas,v 1.3 1994/10/26 07:48:49 cgd Exp $
d5 5
a9 1
# Copyright (c) 1994 Charles M. Hannum.  All rights reserved.
d21 5
a25 3
#	This product includes software developed by Charles M. Hannum.
# 4. The name of the author may not be used to endorse or promote products
#    derived from this software without specific prior written permission.
d27 11
a37 10
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@


1.3
log
@new RCS ID format.
@
text
@d2 1
a2 1
#	$NetBSD$
d5 1
a5 1
# Copyright (c) 1994 Charles Hannum.  All rights reserved.
d17 1
a17 1
#	This product includes software developed by Charles Hannum.
@


1.2
log
@Simplify, speed it up, and do the right thing for floating point constants.
@
text
@d2 1
a30 2
#
#	$Id: asm2gas,v 1.1 1994/07/05 17:57:04 mycroft Exp $
@


1.2.2.1
log
@file asm2gas was added on branch netbsd-1-0 on 1994-07-07 01:51:19 +0000
@
text
@d1 164
@


1.2.2.2
log
@Simplify, speed it up, and do the right thing for floating point constants.
@
text
@a0 164
#!/bin/sh

#
# Copyright (c) 1994 Charles Hannum.  All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#	This product includes software developed by Charles Hannum.
# 4. The name of the author may not be used to endorse or promote products
#    derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#	$Id: asm2gas,v 1.2 1994/07/07 01:51:18 mycroft Exp $
#

# This ugly script converts assembler code from Motorola's format to a
# form that gas (MIT syntax) can digest.

cat $1 | sed -e '
  # format canonicalization

  /[ 	]IDNT[ 	]/{s/^/|/;p;d;}
  /^\*/{s//|/;p;d;}
  s/;/|/
  /[ 	]equ[ 	]/{
    s/\([A-Za-z_][A-Za-z0-9_]*\)[ 	]*equ[ 	]*/\1,/
    s/[ 	][ 	]*\(.*\)$/		|\1/
    s/		||/		|/
    s/^/	.set	/
    p;d
  }
  s/^\([A-Za-z_][A-Za-z0-9_]*\)[ 	][ 	]*/\1:	/
  s/^\([A-Za-z_][A-Za-z0-9_]*\)$/\1:/
  /^[A-Za-z_][A-Za-z0-9_]*:/{
    h
    s/:.*$/:/
    p
    g
    s/^.*:[ 	]*/	/
    /^	$/d
  }
  /^[ 	][ 	]*\([.a-zA-Z][.a-zA-Z0-9]*\)/{
    h
    s///
    s/^[ 	][ 	]*//
    s/[ 	][ 	]*\(.*\)$/		|\1/
    s/		||/		|/
    x
    s/^[ 	][ 	]*//
    s/[ 	][ 	]*.*$/	/
    y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
    s/^/	/
    G
    s/\n//
  }
' | sed -e '
  # operator conversion

  s/^	section	7/	.text/
  s/^	section	8/	.text/
  s/^	section	15/	.data/
  /^	include/{s/include[ 	]/.include "/;s/\.h[ 	]*$/.defs"/;p;d;}
  s/^	xref/|	xref/
  s/^	end/|	end/
  s/^	xdef/	.global/

  s/^	dc\.l/	.long/
  s/^	dc\.w/	.short/
  s/^	dc\.b/	.byte/

  /^	[aceg-z]/{
    /^	add[aiqx]*\.[bwl]	/{s/\.//;p;d;}
    /^	andi*\.[bwl]	/{s/\.//;p;d;}
    /^	as[lr]\.[bwl]	/{s/\.//;p;d;}
    /^	clr\.[bwl]	/{s/\.//;p;d;}
    /^	cmp[i2]*\.[bwl]	/{s/\.//;p;d;}
    /^	eori*\.[bwl]	/{s/\.//;p;d;}
    /^	lea\.l	/{s/\..//;p;d;}
    /^	ls[lr]\.[bwl]	/{s/\.//;p;d;}
    /^	move[acmqs]*\.[bwl]	/{s/\.//;p;d;}
    /^	mul[su]\.[wl]	/{s/\.//;p;d;}
    /^	neg\.[bwl]	/{s/\.//;p;d;}
    /^	ori*\.[bwl]	/{s/\.//;p;d;}
    /^	ro[lrx]*\.[bwl]	/{s/\.//;p;d;}
    /^	sub[aiqx]*\.[bwl]	/{s/\.//;p;d;}
    /^	swap\.w	/{s/\..//;p;d;}
    /^	s\([a-tv-z][a-z]*\)\.b	/{s/\..//;p;d;}
    /^	tst\.[bwl]	/{s/\.//;p;d;}
    p;d
  }

  /^	bchg\.[bl]	/{s/\..//;p;d;}
  /^	bclr\.[bl]	/{s/\..//;p;d;}
  /^	bset\.[bl]	/{s/\..//;p;d;}
  /^	btst\.[bl]	/{s/\..//;p;d;}
  /^	div[sul]*\.[wl]	/{s/\.//;p;d;}
  /^	fabs\.[sdx]	/{s/\.//;p;d;}
  /^	fadd\.[sdxbwl]	/{s/\.//;p;d;}
  /^	fcmp\.[sdxbwl]	/{s/\.//;p;d;}
  /^	fdiv\.[sdx]	/{s/\.//;p;d;}
  /^	fmove[mx]*\.[sdxbwl]	/{s/\.//;p;d;}
  /^	fmul\.[sdx]	/{s/\.//;p;d;}
  /^	fneg\.[sdx]	/{s/\.//;p;d;}
  /^	fsqrt\.[sdx]	/{s/\.//;p;d;}
  /^	fsub\.[sdxbwl]	/{s/\.//;p;d;}
  /^	ftst\.[sdx]	/{s/\.//;p;d;}

  /^	b[a-eg-z][a-z]*\.b	/{s/\.b/s/;p;d;}
  /^	b[a-eg-z][a-z]*\.w	/{s/\.w//;p;d;}
  /^	b[a-eg-z][a-z]*\.l	/{s/\.l/l/;p;d;}
  /^	db[a-z][a-z]*\.w	/{s/\.w//;p;d;}
  /^	fb[a-eg-z][a-z]*\.w	/{s/\.w//;p;d;}
  /^	fb[a-eg-z][a-z]*\.l	/{s/\.l/l/;p;d;}
' | sed -e '
  # operand conversion

  s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1FPI\2/g
  s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1FPI\2/g
  s/\([^_a-zA-Z0-9]\)FPIAR$/\1FPI/g
  s/\([^_a-zA-Z0-9]\)fpiar\([^_a-zA-Z0-9]\)/\1fpi\2/g
  s/\([^_a-zA-Z0-9]\)fpiar\([^_a-zA-Z0-9]\)/\1fpi\2/g
  s/\([^_a-zA-Z0-9]\)fpiar$/\1fpi/g

  s/\$/0x/g
  s/#:/#:0x/g

  s/-(\([sSpPaA][pPcC0-7]\))/\1@@-/g
  s/(\([sSpPaA][pPcC0-7]\))+/\1@@+/g
  s/\([-+A-Za-z0-9_]*\)(\([sSpPaA][pPcC0-7]\)\([),]\)/\2@@(\1\3/g

  s/\.\([bBwWlL])\)/:\1/g
  s/\.\([bBwWlL]\)\*\([0-9][0-9]*)\)/:\1:\2/g
  s/\*\([0-9][0-9]*\))/:l:\1)/g
  s/{\([0-9][0-9]*\):\([0-9][0-9]*\)}/{#\1:#\2}/g
  s/{\([dD][0-7]\):\([0-9][0-9]*\)}/{\1:#\2}/g

  s/@@(0*)/@@/g
  s/(,/(/g;s/:)/)/g

  # make up for a gas bug
  /^	fmovemx	/{
	s/	\([fF][pP][0-7]\),/	\1-\1,/
	s/,\([fF][pP][0-7]\)	/,\1-\1	/
	s/,\([fF][pP][0-7]\)$/,\1-\1/
  }
'
@


1.1
log
@Port to NetBSD, with some bug fixes and minor performance tweaks.
@
text
@d31 1
a31 1
#	$Id: asm2gas,v 1.1 1994/07/05 17:20:56 mycroft Exp $
d38 2
d41 1
a41 1
  /^\*/{p;d;}
d60 1
a60 1
  /^[ 	][ 	]*[.a-zA-Z][.a-zA-Z0-9]*/{
d62 2
a63 1
    s/[ 	]*[.a-zA-Z][.a-zA-Z0-9]*[ 	]*//
d67 1
a67 1
    s/^[ 	]*\([.a-zA-Z][.a-zA-Z0-9]*\)/\1/
d75 57
a131 6
  s/^\*/|/
  s/\$/0x/g
  s/#:/#0x/g
  s/	dc\.l/	.long/
  s/	dc\.w/	.short/
  s/	dc\.b/	.byte/
d133 5
a137 18
  s/\([^_a-zA-Z0-9]\)A\([0-7]\)\([^_a-zA-Z0-9:.]\)/\1a\2\3/g
  s/\([^_a-zA-Z0-9]\)A\([0-7]\)\([^_a-zA-Z0-9:.]\)/\1a\2\3/g
  s/\([^_a-zA-Z0-9]\)A\([0-7]\)$/\1a\2/g
  s/\([^_a-zA-Z0-9]\)D\([0-7]\)\([^_a-zA-Z0-9]\)/\1d\2\3/g
  s/\([^_a-zA-Z0-9]\)D\([0-7]\)\([^_a-zA-Z0-9]\)/\1d\2\3/g
  s/\([^_a-zA-Z0-9]\)D\([0-7]\)$/\1d\2/g
  s/\([^_a-zA-Z0-9]\)FP\([0-7]\)\([^_a-zA-Z0-9]\)/\1fp\2\3/g
  s/\([^_a-zA-Z0-9]\)FP\([0-7]\)\([^_a-zA-Z0-9]\)/\1fp\2\3/g
  s/\([^_a-zA-Z0-9]\)FP\([0-7]\)$/\1fp\2/g
  s/\([^_a-zA-Z0-9]\)FPCR\([^_a-zA-Z0-9]\)/\1fpcr\2/g
  s/\([^_a-zA-Z0-9]\)FPCR\([^_a-zA-Z0-9]\)/\1fpcr\2/g
  s/\([^_a-zA-Z0-9]\)FPCR$/\1fpcr/g
  s/\([^_a-zA-Z0-9]\)FPSR\([^_a-zA-Z0-9]\)/\1fpsr\2/g
  s/\([^_a-zA-Z0-9]\)FPSR\([^_a-zA-Z0-9]\)/\1fpsr\2/g
  s/\([^_a-zA-Z0-9]\)FPSR$/\1fpsr/g
  s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1fpi\2/g
  s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1fpi\2/g
  s/\([^_a-zA-Z0-9]\)FPIAR$/\1fpi/g
d141 7
a147 18
  s/\([^_a-zA-Z0-9]\)a7\([^_a-zA-Z0-9:.]\)/\1sp\2/g
  s/\([^_a-zA-Z0-9]\)a7\([^_a-zA-Z0-9:.]\)/\1sp\2/g
  s/\([^_a-zA-Z0-9]\)a7$/\1sp/g
' | sed -e '
  s/-(\(a.\))/\1@@-/g
  s/(\(a.\))+/\1@@+/g
  s/\([-+A-Za-z0-9_]*\)(\(a.\))/\2@@(\1)/g
  s/\([-+A-Za-z0-9_]*\)(\(a.\),\([ad].[^)]*\))/\2@@(\1,\3)/g

  s/-(sp)/sp@@-/g
  s/(sp)+/sp@@+/g
  s/\([-+A-Za-z0-9_]*\)(sp)/sp@@(\1)/g
  s/\([-+A-Za-z0-9_]*\)(sp,\([ad].[^)]*\))/sp@@(\1,\2)/g

  s/-(pc)/pc@@-/g
  s/(pc)+/pc@@+/g
  s/\([-+A-Za-z0-9_]*\)(pc)/pc@@(\1)/g
  s/\([-+A-Za-z0-9_]*\)(pc,\([ad].[^)]*\))/pc@@(\1,\2)/g
d153 1
a153 1
  s/{\(d[0-7]\):\([0-9][0-9]*\)}/{\1:#\2}/g
d155 1
a155 1
  s/@@()/@@/g;s/@@(0)/@@/g
a157 54
  s/^	section	7/	.text/
  s/^	section	8/	.text/
  s/^	section	15/	.data/
  /^	include/{s/include[ 	]/.include "/;s/\.h[ 	]*$/.defs"/;p;d;}
  s/^	xref/|	xref/
  s/^	end/|	end/
  s/^	xdef/	.global/

  s/^	lea\.l	/	lea	/
  s/^	swap\.w	/	swap	/
  s/^	adda\.l	/	addal	/
  s/^	suba\.l	/	subal	/
  s/^	movea\.l	/	moveal	/
  s/^	btst\.[bl]	/	btst	/
  s/^	bclr\.[bl]	/	bclr	/
  s/^	bset\.[bl]	/	bset	/
  s/^	bchg\.[bl]	/	bchg	/
  s/^	clr\.\([lbw]\)	/	clr\1	/
  s/^	tst\.\([lbw]\)	/	tst\1	/
  s/^	neg\.\([lbw]\)	/	neg\1	/
  s/^	or\(i*\)\.\([lbw]\)	/	or\1\2	/
  s/^	eor\(i*\)\.\([lbw]\)	/	eor\1\2	/
  s/^	and\(i*\)\.\([lbw]\)	/	and\1\2	/
  s/^	mul\([su]\)\.\([lw]\)	/	mul\1\2	/
  s/^	div\([sul]*\)\.\([lw]\)	/	div\1\2	/
  s/^	cmp\([i2]*\)\.\([lbw]\)	/	cmp\1\2	/
  s/^	ro\([xlr]*\)\.\([lbw]\)	/	ro\1\2	/
  s/^	\([al]\)s\([lr]\)\.\([lbw]\)	/	\1s\2\3	/
  s/^	add\([xiq]*\)\.\([lbw]\)	/	add\1\2	/
  s/^	sub\([xiq]*\)\.\([lbw]\)	/	sub\1\2	/
  s/^	move\([scmq]*\)\.\([lbw]\)	/	move\1\2	/
  s/^	fabs\.\([sdx]\)	/	fabs\1	/
  s/^	fneg\.\([sdx]\)	/	fneg\1	/
  s/^	ftst\.\([sdx]\)	/	ftst\1	/
  s/^	fmul\.\([sdx]\)	/	fmul\1	/
  s/^	fdiv\.\([sdx]\)	/	fdiv\1	/
  s/^	fsqrt\.\([sdx]\)	/	fsqrt\1	/
  s/^	fadd\.\([sdxbwl]\)	/	fadd\1	/
  s/^	fsub\.\([sdxbwl]\)	/	fsub\1	/
  s/^	fcmp\.\([sdxbwl]\)	/	fcmp\1	/
  s/^	fmove\([mx]*\)\.\([sdxbwl]\)	/	fmove\1\2	/

  # fix an odd instruction
  s/^	bhs\.w	/	bcc	/

  # set and branch instructions; questionable
  s/^	s\([a-z][a-z]*\)\.b	/	s\1	/
  s/^	db\([a-z][a-z]*\)\.w	/	db\1	/
  s/^	b\([a-eg-z][a-z]*\)\.b	/	b\1s	/
  s/^	b\([a-eg-z][a-z]*\)\.w	/	b\1	/
  s/^	b\([a-eg-z][a-z]*\)\.l	/	b\1l	/
  s/^	fb\([a-eg-z][a-z]*\)\.w	/	fb\1	/
  s/^	fb\([a-eg-z][a-z]*\)\.l	/	fb\1l	/

d160 3
a162 3
	s/	fp\([0-7]\),/	fp\1-fp\1,/
	s/,fp\([0-7]\)	/,fp\1-fp\1	/
	s/,fp\([0-7]\)$/,fp\1-fp\1/
@
