Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch > #35776

Re: Setting architectural features in stone

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.c, comp.arch
Subject Re: Setting architectural features in stone
Date 2016-08-03 11:02 +0100
Organization A noiseless patient Spider
Message-ID <8737mmuq4s.fsf@bsb.me.uk> (permalink)
References (4 earlier) <cb73fb41-fa4c-445b-83f5-25c5edf4b224@googlegroups.com> <20160728165021.72543369@maxa-pc> <nnn452$548$1@dont-email.me> <nnrcnr$267$1@gioia.aioe.org> <2016Aug3.084214@mips.complang.tuwien.ac.at>

Cross-posted to 2 groups.

Show all headers | View raw


anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
<snip>
> Word-addressed machines still exist (with various bit widths), so the
> 8-bit character is not universal for C.  However, I am not aware of
> anything from after 1980 that is byte-addressed and has a non-8-bit
> byte; and AFAIK even the old 36-bit machines were not byte-addressed
> (although C implementations on such architectures may have simulated
> byte addressing in order to avoid 36-bit chars).
>
> Anyway, architectures seem to fall into two classes:
>
> byte addressed with 2^n bytes per word and 8-bit bytes
> word addressed, with arbitrary bits per word.
>
> If anybody knows exceptions, please name them.

I'll just add a note to say that it's not always clear if an
architecture is byte addressed or word addressed.  I worked on a machine
whose underlying hardware used word addresses but, because it was
microcoded, so the instruction set that was designed for C could have
byte addresses.  To keep compares simple, the low order-bit was used to
identify the byte (words were 16 bit), but to keep most accesses fast,
word addresses were used wherever possible.  The result was a systems
where some address conversions generated code.

This was a long time ago (the early 80s) so there was no standard C and
a very large amount of C code extant at the time made assumptions that
were not compatible with this design, so even simple Unix utilities that
could have been almost 100% portable needed a lot of work to get them to
run (sort was a nightmare).

Experience of odd machines and of pre-standard C gives one a different
perspective, I find.  My main worry about ignoring this perspective is
not that new code won't run on old machines (who cares?) but that new
architectures might come along where the pressure to design for speed,
or concurrency or security or some other as yet un-envisioned goal makes
today's safe assumptions unsafe.

-- 
Ben.

Back to comp.arch | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Setting architectural features in stone Noob <root@127.0.0.1> - 2016-08-01 11:18 +0200
  Re: Setting architectural features in stone Ivan Godard <ivan@millcomputing.com> - 2016-08-01 09:26 -0700
  Re: Setting architectural features in stone anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-08-01 15:48 +0000
  Re: Setting architectural features in stone Quadibloc <jsavard@ecn.ab.ca> - 2016-08-01 10:13 -0700
  Re: Setting architectural features in stone Walter Banks <walter@bytecraft.com> - 2016-08-02 20:09 -0400
    Re: Setting architectural features in stone Quadibloc <jsavard@ecn.ab.ca> - 2016-08-02 18:39 -0700
      Re: Setting architectural features in stone Quadibloc <jsavard@ecn.ab.ca> - 2016-08-03 00:52 -0700
        Re: Setting architectural features in stone Walter Banks <walter@bytecraft.com> - 2016-08-03 06:45 -0400
      Re: Setting architectural features in stone David Brown <david.brown@hesbynett.no> - 2016-08-03 15:02 +0200
    Re: Setting architectural features in stone Quadibloc <jsavard@ecn.ab.ca> - 2016-08-02 19:37 -0700
      Re: Setting architectural features in stone Noob <root@127.0.0.1> - 2016-08-03 10:52 +0200
        Re: Setting architectural features in stone Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-08-03 11:09 +0100
        Re: Setting architectural features in stone Keith Thompson <kst-u@mib.org> - 2016-08-03 08:51 -0700
        Re: Setting architectural features in stone Quadibloc <jsavard@ecn.ab.ca> - 2016-08-03 09:36 -0700
          Re: Setting architectural features in stone George Neuner <gneuner2@comcast.net> - 2016-08-03 20:30 -0400
          Re: Setting architectural features in stone Noob <root@127.0.0.1> - 2016-08-04 13:06 +0200
            Re: Setting architectural features in stone Bruce Hoult <bruce.hoult@gmail.com> - 2016-08-04 06:39 -0700
              Re: Setting architectural features in stone nmm@wheeler.UUCP (Nick Maclaren) - 2016-08-04 17:40 +0000
      Re: Setting architectural features in stone nmm@wheeler.UUCP (Nick Maclaren) - 2016-08-03 09:40 +0000
        Re: Setting architectural features in stone Quadibloc <jsavard@ecn.ab.ca> - 2016-08-03 09:50 -0700
          Re: Setting architectural features in stone Quadibloc <jsavard@ecn.ab.ca> - 2016-08-03 10:14 -0700
            Re: Setting architectural features in stone Quadibloc <jsavard@ecn.ab.ca> - 2016-08-04 06:11 -0700
              Re: Setting architectural features in stone Quadibloc <jsavard@ecn.ab.ca> - 2016-08-04 06:14 -0700
      Re: Setting architectural features in stone Walter Banks <walter@bytecraft.com> - 2016-08-03 07:03 -0400
        Re: Setting architectural features in stone already5chosen@yahoo.com - 2016-08-03 04:12 -0700
          Re: Setting architectural features in stone already5chosen@yahoo.com - 2016-08-03 04:26 -0700
            Re: Setting architectural features in stone Walter Banks <walter@bytecraft.com> - 2016-08-03 07:50 -0400
          Re: Setting architectural features in stone Walter Banks <walter@bytecraft.com> - 2016-08-03 07:35 -0400
    Re: Setting architectural features in stone anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-08-03 06:42 +0000
      Re: Setting architectural features in stone Quadibloc <jsavard@ecn.ab.ca> - 2016-08-03 00:03 -0700
        Re: Setting architectural features in stone anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-08-03 08:30 +0000
      Re: Setting architectural features in stone Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-08-03 11:02 +0100
        Re: Setting architectural features in stone Ivan Godard <ivan@millcomputing.com> - 2016-08-03 03:15 -0700
        Re: Setting architectural features in stone anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-08-03 11:53 +0000
          Re: Setting architectural features in stone Quadibloc <jsavard@ecn.ab.ca> - 2016-08-03 18:03 -0700
            Re: Setting architectural features in stone Bruce Hoult <bruce.hoult@gmail.com> - 2016-08-04 01:54 -0700
            Re: Setting architectural features in stone anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-08-04 09:28 +0000
      Re: Setting architectural features in stone timcaffrey@aol.com - 2016-08-04 09:48 -0700
        Re: Setting architectural features in stone Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2016-08-04 10:04 -0700

csiph-web