Deutsch   English   Français   Italiano  
<2025Mar3.174417@mips.complang.tuwien.ac.at>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Why VAX Was the Ultimate CISC and Not RISC
Date: Mon, 03 Mar 2025 16:44:17 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 53
Message-ID: <2025Mar3.174417@mips.complang.tuwien.ac.at>
References: <vpufbv$4qc5$1@dont-email.me> <2025Mar1.125817@mips.complang.tuwien.ac.at> <vpvrn5$2hq0$1@gal.iecc.com> <2025Mar1.232526@mips.complang.tuwien.ac.at> <vq2dfr$2skk$1@gal.iecc.com> <2025Mar2.234011@mips.complang.tuwien.ac.at> <5pkg9l-kipt.ln1@msc27.me.uk>
Injection-Date: Mon, 03 Mar 2025 18:21:08 +0100 (CET)
Injection-Info: dont-email.me; posting-host="02abba070423f036a0c54aba275aea87";
	logging-data="1489792"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/2REZt2fvEP4WIQffHacf5"
Cancel-Lock: sha1:saHihIjr4BDtN/bgQWjJ0n8LVQA=
X-newsreader: xrn 10.11
Bytes: 3811

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>