News for hackers. Stuff that matters.
Re:The road to Zettalinux by mhh__ on Friday September 23, 2022 @09:34AM (#32951736)
Systems for which pointers are not just integers have come and gone, sadly.

Many mainframes had function pointers which were more like a struct than a pointer.

Re:The road to Zettalinux by masklinn on Friday September 23, 2022 @09:38AM (#32951795)
Technically that’s still pretty common on the software side, that’s what tagged pointers are.

The ObjC/Swift runtime uses that for instance, the class pointer of an object also contains the refcount and a few flags.

Re:The road to Zettalinux by mhh__ on Friday September 23, 2022 @09:41AM (#32951835)
Pointer tagging is still spiritually an integer (i.e. mask off the bits you guarantee the tags are in via alignment) versus (say) the pointer being multiple addresses into different bits of different types of memory and tags insert other stuff here.
Re:The road to Zettalinux by masklinn on Friday September 23, 2022 @09:54AM (#32951993)
> Pointer tagging is still spiritually an integer

No, pointer tagging is spiritually a packed structure. That can be a simple union (as it is in ocaml IIRC) but it can be a lot more e.g. the objc “non-pointer isa” ended up with 5 flags (excluding raw isa discriminant) and two additional non-pointer members of 19 and 9 bits.

You mask things on and off to unpack the structure into component the system will accept. Nothing precludes using tagged pointers to discriminate between kinds and locations.

Re:The road to Zettalinux by apaprocki on Friday September 23, 2022 @09:49AM (#32951935)
Itanium function pointers worked like that, so it could have been the new normal if IA64 wasn’t so crazy on the whole.
Re:The road to Zettalinux by xxpor on Friday September 23, 2022 @11:58AM (#32953686)
A Raymond Chen post about the function pointer craziness: https://devblogs.microsoft.com/oldnewthing/20150731-00/?p=90...