Sujet : Re: Why VAX Was the Ultimate CISC and Not RISC
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.archDate : 03. Mar 2025, 17:44:17
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2025Mar3.174417@mips.complang.tuwien.ac.at>
References : 1 2 3 4 5 6 7
User-Agent : xrn 10.11
MarkC <
usenet@em-ess-see-twenty-seven.me.uk> writes:
NetBSD still has a VAX port, so the sizes of pre-built packages from
there might be informative.
Thanks. The NetBSD pkgsrc is not limited to NetBSD, and there is a
wide variety of prebuilt stuff there. I took those that sound like
architecture names (and probably belong to NetBSD): aarch64 alpha
amd64 earmv7hf i386 m68k mips64eb mipsel powerpc sparc sparc64 vax
Unfortunately, they do not seem to port to RISC-V in any form yet, and
their earmv7hf port uses ARM A32, not T32. So the NetBSD competition
is performed without entries for those two instruction set encodings
that showed the smallest code sizes on Debian. Anyway, here are the
results:
bash grep xz
710838 42236 m68k
748354 159304 40930 vax
829077 176836 42840 amd64
855400 164188 aarch64
877284 186924 48032 sparc
882847 187203 49866 i386
898532 179844 earmv7hf
962128 205776 54704 powerpc
1004864 192256 53632 sparc64
1025136 51160 mips64eb
1147664 232688 63456 alpha
1172692 mipsel
I did not find packages for everything on all architectures. In
particular, I did not find packages for gzip on vax, so I used xz
instead.
So VAX is indeed a leading architecture in terms of code size, at
least if ARM T32 and RISC-V C is not in play.
Here are the scripts I used:
for i in aarch64 alpha amd64 earmv7hf i386 m68k mips64eb mipsel powerpc sparc sparc64 vax; do mkdir -p $i/unpacked; (cd $i; for j in bash-5.2.37.tgz grep-3.11.tgz xz-5.6.2.tgz; do wget
https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$i/10.1/All/$j; done); done
This did not get everything, because some packages are in other
version directories or have other version "numbers", so I manually
searched for and downloaded some of the packages. Next time I should
leave some of that to wget, see
<
https://superuser.com/questions/1424700/wget-download-all-files-starting-with-a-specified-name>.
for i in aarch64 alpha amd64 earmv7hf m68k mips64eb mipsel powerpc sparc sparc64 vax; do echo $i; mkdir -p $i/unpacked; (cd $i; for j in *.tgz; do (cd unpacked; if gzip -t ../$j; then tar xfz ../$j 2>/dev/null; else tar xfJ ../$j 2>/dev/null; fi); done); done
for i in *; do (cd $i/unpacked/bin; for j in bash ggrep xz; do if test -f $j; then objdump -h $j|awk --non-decimal-data '/[.]text/ {printf("%8d ","0x"$3)}'; else echo -n " "; fi; done); echo $i; done|sort -n
- anton
-- 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.' Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>