News for hackers. Stuff that matters.
Re:RISC-V asm instruction name madness by zozbot234 on Monday March 14, 2022 @07:22AM (#30671028)
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.
Re:RISC-V asm instruction name madness by mananaysiempre on Monday March 14, 2022 @08:27AM (#30671576)
Not 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.
Re:RISC-V asm instruction name madness by int_19h on Monday March 14, 2022 @10:04AM (#30672580)
VM 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.
Re:RISC-V asm instruction name madness by zozbot234 on Monday March 14, 2022 @10:22AM (#30672777)
> 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.)

Re:RISC-V asm instruction name madness by int_19h on Monday March 14, 2022 @01:57PM (#30675678)
I 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

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.

Re:RISC-V asm instruction name madness by LeFantome on Monday March 14, 2022 @03:20PM (#30676922)
What 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 ).