3 ms·
Like the Symbolics machines did, the RISC-V has tagged memory: http://www.lowrisc.org/downloads/lowRISC-memo-2014-001.pdf http://www.lowrisc.org/downloads/lowR
by cmrdporcupine 12y ago
Like the Symbolics machines did, the RISC-V has tagged memory:
http://www.lowrisc.org/downloads/lowRISC-memo-2014-001.pdf http://www.lowrisc.org/downloads/lowRISC-memo-2014-001.pdf
As I understand it its proposed use is for security reasons, for preventing hostile memory corruption. But I imagine it could also be used for the kind of type and GC purposes that tagging in the Lisp machines was used for?
- hga 12y agoLet me clarify that this is a proposal for a particular implementation of RISC-V, and per a post on the mailing list yesterday the first cut of the tagging extension will be released very soon. It's intended primarily for security, essentially to allow hacks to let our current C type code bases to run ... less insecurely. It was proposed to allow the 2 tag bits to be used for other things like type and GC tagging, which is why I'm personally interested in it.
- cmrdporcupine 12y agoThanks for the clarification. I'm very eager to see the lowRISC stuff come to fruition.
- leoc 12y agoApple's already using the ARMv8 tagged memory to speed up Objective C on the iPhone, right? https://www.mikeash.com/pyblog/friday-qa-2013-09-27-arm64-and-you.html https://www.mikeash.com/pyblog/friday-qa-2013-09-27-arm64-an...
- lispm 12y agoI can't see that there is any hardware support. It just makes clever use of the CPU. Also 'tagged pointers' is something slightly different than 'tagged data'. Many Lisp systems have been using both, for decades.
- pm215 12y agoThe hardware support is that the CPU ignores the top (tag) byte of the pointer when it's used in eg a load or store instruction, so you don't have to manually mask out the tag to use the value.
- hga 12y agoApple is using some of the bits in a normal 64 bit pointer for other purposes, something that's been done in production Lisps for a long time, no later than when the Vax appeared with its byte addressed pointers. E.g. a valid 32 bit pointer has the 2 LSB bits as zero, allowing for 3 other values and all sorts of tricks with them. By comparison, the CADR Lisp machine had a 32 bit word size, with 8 bits used for tags, and the remaining 24 bits used for immediate data or as a word addressed pointer. The lowRISC project proposes to add tag bits taken from other regions of memory that are fetched into a tag cache, and promoted as additional bits in the L2 and L1 caches and above. So starting with the L2 cache words will be internally 66 bits long.
- cmrdporcupine 12y agoI'm baffled why Apple's refcounting implementation doesn't do cycle collection. There are a few good algorithms for doing this for many years now. I implemented this one in C++ once: http://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon01Concurrent.pdf http://researcher.watson.ibm.com/researcher/files/us-bacon/B...