The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: ron@ronnatalie.com (Ron Natalie)
Subject: [TUHS] MacOS X is Unix (tm)
Date: Tue, 3 Jan 2017 13:32:46 -0500	[thread overview]
Message-ID: <001001d265ef$c832d790$589886b0$@ronnatalie.com> (raw)
In-Reply-To: <586be7b3.TVbwM5I7Y6v2DJC8%schily@schily.net>


> Microsoft still does and "True64" did use the ILP64 model. This allows
lazy written software to work even though it does not the right data types
for pointer arithmetic.
 
Well, there's a predisposition in C for "int" to be the standard word size
of the machine.    On designing for a 64-bit machine, one needs to think
long and hard about the integral sizes.
When we wrote the compilers for the Denelcor HEP, we had that problem.   The
thing had 64-bit words and a partial word mode for 16 and 32 bits.   It
didn't even have the concept of 8-bit math.
We decided that rather than arbitrarily sizing an int to 32, so we had the
char-short-int-long progression, we'd make it the word size.   This means we
had to introduce another keyword for the 32-bit type.
After dismissing "short long" or "long short" as a type, the suggestion was
"medium," but we settled for int32 (this was before the language standards
considered how to manage the system namespaces).

An amusing thing we found basing our code on 4.2 BSD was that there was a
really bad latent bug.     There was a kernel structure that looked like
this:

union  ptrs {
      int* p_int;
      short*  p_short;
      char* p_char;
      long* p_long;
};
   
The kernel would store one sort of pointer in one element and then retrieve
it from another.   This "conversion by union" didn't work on the HEP as the
word pointers had the partial word size encoded in the low order bits.
Reading out a short* where an int* was stored caused the processor to access
the wrong sized entity (though roughly in the proper location).    I had to
run all over the kernel changing those to a void* so that the generated code
could properly convert to the right pointer type.


Don't get me started on the inanity that states that "char" is the smallest
addressable integer.   Char should have been divorced from the integer
sizings and let be the native CHARACTER size alone.



  reply	other threads:[~2017-01-03 18:32 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.31.1483203495.3779.tuhs@minnie.tuhs.org>
2016-12-31 22:37 ` David
2016-12-31 23:00   ` Kurt H Maier
     [not found]   ` <CAH1jEzZ7bqmxtJLSnmd8-_MT4BrgnjgFA2+SvKBQAKou8bZzQw@mail.gmail.com>
     [not found]     ` <CAH1jEzZMJQAMeZSFFHy1qouDXnq3GqqRa_Fw25i+h9z2FBprHw@mail.gmail.com>
     [not found]       ` <CAH1jEzYJhRsWhf0BiViignp7_Z-HxNbP7=+ChVbmYErrDQXmsQ@mail.gmail.com>
     [not found]         ` <CAH1jEzbxDAtpMxCRu1hO2ot2K=Ted0HvpBSx67zOg-FcmqrpaQ@mail.gmail.com>
     [not found]           ` <CAH1jEzaBMMXdxD7xCaSMM4Ciu0Gg7NktQDeVyLEoHkfYoyerTw@mail.gmail.com>
     [not found]             ` <CAH1jEzZ6mTDqiGu9pkjg2g3S+Lz2sPVY9Y+16dKSf4dkp5j56Q@mail.gmail.com>
     [not found]               ` <CAH1jEzaMCWR2xYf-FbifnTj4gWJbCEDJBpCx3r3ErxCnEoXSPg@mail.gmail.com>
     [not found]                 ` <CAH1jEzZWkZ6J0NOifZK05gS+fdKiXQaUZDfvdh56Wm-gsbT4rQ@mail.gmail.com>
     [not found]                   ` <CAH1jEza+2i6jEU5wbxFZ-WUOcGi06zyj5g9Si7RAe5xiety42g@mail.gmail.com>
     [not found]                     ` <CAH1jEza7dHxPmhocSE_CkCPafBgaSS3uYF2g4E_J8gYYdRoVwA@mail.gmail.com>
     [not found]                       ` <CAH1jEzYFXowgA3f=GpJ4HBnAYsyUQLOiZ-uoxryMLZAy5BcsXQ@mail.gmail.com>
     [not found]                         ` <CAH1jEzYcZHkfmFYZRZkmapZxx6q-ZZDSQ-qCzVxDvLsQ0XL6Hg@mail.gmail.com>
     [not found]                           ` <CAH1jEzaqJAuKXOnSvaadoavuQKHf-dT-rtywpdCyFoaWR1k ydQ@mail.gmail.com>
     [not found]                           ` <CAH1jEzaqJAuKXOnSvaadoavuQKHf-dT-rtywpdCyFoaWR1kydQ@mail.gmail.com>
     [not found]                             ` <CAH1jEzbwsEZoADTzBxQQ=OArVc4CLCW8U3e3JmK_BaZzfRjc4A@mail.gmail.com>
     [not found]                               ` <CAH1jEzZ7EG_xYL51uog1ZdaZ1ZMuznS1OkUYYMa9bSJxkQxWrQ@mail.gmail.com>
     [not found]                                 ` <CAH1jEzaSJuRkGnVO970JuMnFeht7at2c-L44i1zZ-ejTMdr8Sg@mail.gmail.com>
     [not found]                                   ` <CAH1jEzZi2erJEz3fUajE5VxH+3XiWosxfr7ib_r1ZHbdqSFWNg@mail.gmail.com>
     [not found]                                     ` <CAH1jEzZmx_4JfdU+HseZzM+F=BvRgUU5brX6A+xkaFbosp8PLg@mail.gmail.com>
     [not found]                                       ` <CAH1jEzYjaNVccZtuu4znPPddhGK-DxFdeuV-higNK6dpc9gSqQ@mail.gmail.com>
     [not found]                                         ` <CAH1jEzarFb_S4EZ0SAqxTdQr1eD58_G3f3ae0Xtwrmg8VxZGAA@mail.gmail.com>
     [not found]                                           ` <CAH1jEzav7rijjpvDrogQKS5dJb09azgnogdGtSsqmPpTHFL7Hg@mail.gmail.com>
     [not found]                                             ` <CAH1jEza_oXr33-mjKV7aOVO2U4E953OpQ7dqMABVUp-uix4pJQ@mail.gmail.com>
     [not found]                                               ` <CAH1jEzZqs6H9zCyLL1eveAHfEq3SminYBGDyLYwNUxE-h9nDng@mail.gmail.com>
     [not found]                                                 ` <CAH1jEzb_28daq6EOV1GMg8g-OM_sevbf8_EVE7dprgaVvrMiqA@mail.gmail.com>
2017-01-01  0:43                                                   ` Nick Downing
2017-01-01 10:26                                                     ` Tim Bradshaw
2017-01-01 13:01                                                       ` Ron Natalie
     [not found]                                                         ` <95D6B274-6D3F-4610-873A-76F4707AE89B@tfe b.org>
2017-01-01 13:56                                                         ` Tim Bradshaw
2017-01-01 19:33                                                           ` David
2017-01-01 20:12                                                             ` Tim Bradshaw
2017-01-03 14:11                                                               ` David
2017-01-01 20:28                                                             ` Kurt H Maier
2017-01-01 20:38                                                               ` Larry McVoy
2017-01-03 13:17                                                                 ` Joerg Schilling
2017-01-03 15:52                                                                   ` [TUHS] ZFS (was: Re: MacOS X is Unix (tm)) Michael Kjörling
2017-01-03 16:41                                                                     ` Joerg Schilling
2017-01-03 18:20                                                                   ` [TUHS] MacOS X is Unix (tm) Larry McVoy
2017-01-06 12:56                                                                     ` Joerg Schilling
2017-01-02 10:06                                                         ` arnold
2017-01-02 11:34                                                           ` Ron Natalie
2017-01-02 12:24                                                             ` arnold
2017-01-02 16:42                                                             ` Chet Ramey
2017-01-01 13:28                                                     ` Michael Kjörling
2017-01-02 11:31   ` Joerg Schilling
2017-01-02 16:32     ` Nemo
2017-01-02 16:53       ` Joerg Schilling
2017-01-02 16:44     ` Chet Ramey
2017-01-02 16:49       ` Larry McVoy
2017-01-02 17:02         ` Joerg Schilling
2017-01-02 17:05         ` Chet Ramey
2017-01-02 17:32           ` Larry McVoy
2017-01-02 17:53             ` Chet Ramey
2017-01-02 17:37           ` Christian Neukirchen
2017-01-03 14:06     ` David
2017-01-03 14:33       ` Random832
2017-01-03 15:08         ` Joerg Schilling
2017-01-03 16:09           ` Derek Fawcus
2017-01-03 16:47             ` Joerg Schilling
2017-01-03 17:29           ` Random832
2017-01-03 17:51             ` Joerg Schilling
2017-01-03 14:49       ` Joerg Schilling
2017-01-03 17:39         ` David
2017-01-03 17:59           ` Derek Fawcus
2017-01-03 18:04           ` Joerg Schilling
2017-01-03 18:32             ` Ron Natalie [this message]
2017-01-03 18:33             ` Clem Cole
2017-01-03 18:35               ` Clem Cole
2017-01-03 18:45               ` Ron Natalie
2017-03-11  6:35                 ` jsteve
2017-03-11 15:36                   ` Derrik Walker v2.0
2017-03-11 16:33                   ` Paul Winalski
2017-01-03 22:31             ` Random832

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001001d265ef$c832d790$589886b0$@ronnatalie.com' \
    --to=ron@ronnatalie.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).