7 ms·
Interestingly, VM instruction sets (JVM, CLR, WASM etc.) tend to have the opposite problem in that the chosen names are pointlessly long, even though the insn s
by zozbot234 5y ago
Interestingly, VM instruction sets (JVM, CLR, WASM etc.) tend to have the opposite problem in that the chosen names are pointlessly long, even though the insn sets are so small that more concise mnemonics are definitely possible.
- mananaysiempre 5y agoNot only VMs — SSE/AVX on x86 has been getting more and more ridiculous over the last decade (PCLMULHQLQDQ anyone?), although it isn’t clear that the names are at fault and not simply the haphazard instruction set.
- int_19h 5y agoVM instruction sets are generally not written by people, but they're occasionally read by people (who might have to do so for debugging). And terse mnemonics are not good for readability.
- zozbot234 5y ago> And terse mnemonics are not good for readability. I disagree there, though it would be nice to see some actual research on these issues. I for one see pointlessly long mnemonics as kind of a worst case for surveyability, maybe even worse than pretty-printed English-like phrases as seen in BASIC or COBOL. (Of course, seemingly "long" mnemonics often result from orthogonality in the insn set, e.g. as in PCLMULHQLQDQ mentioned in a sibling comment. In that case, having a "long" mnemonic is indeed better than compacting it and losing track of its internal structure.)
- int_19h 5y agoI dunno; e.g. IL doesn't look pointlessly long to me, and it's certainly nowhere near COBOL level of verbosity: https://en.wikipedia.org/wiki/List_of_CIL_instructions https://en.wikipedia.org/wiki/List_of_CIL_instructions Mostly it uses well-established terse mnemonics - e.g. for branching or arithmetic - but stuff related to CLI object model and other unusual things are spelled out more fully.
- LeFantome 5y agoWhat are the pointlessly long names in the CIL ( Common Intermediate Language - CLR assembly )? Most of them are ADD, MUL, DUP, BGT, CALL, LDC.I4, and the like. There are a few localloc, tailcall, volatile, and such but you don’t use them much. Things like LDC.I4 ( load 32 bit integer ) have companions like LDC.I8 and LDC.R8 that add a lot of symmetry and clarity without adding too much bulk ( in my view ).