Assembly Mnemonics You Didn't Know About
-
Inspired by https://twitter.com/ppcinstructions
SRFZPCVZ - subtract register from zero permanently changing value of zero
LEAES - load effective address of egg salad
DIBZ - divide immediate by zero
JBO - switch processor to lojban mode
jo'au - change version of lojban parser
JEFF - jump if string equal to "Firefox"
JLIQBOR - jump if user is dumber than a box of rocks
-
VHJ - Jump. You might as well jump.
-
SMLSLD — I want a Small Salad
-
A couple from x86-64 ARS-NI (Advanced, but Rather Silly New Instructions)
-
TESTNFA - test if not Friday afternoon
-
FISTP - congratulate yourself on a job well done
-
LOOPNZ - loop around New Zealand
-
MOVNO - unconditional "don't move"
-
MBYMOV - randomly reorganize the department
-
YNOTXCHG - exchange in a devil-may-care fashion
-
CVE - execute the specified Intel vulnerability number
-
PORQUE - Manuel bitwise logical OR
-
NIKE - just do it
And, of course:
- WTFENTER
- WTFEXIT
Edit: bug fixes and speedy performance improvements
-
-
@Applied-Mediocrity said in Assembly Mnemonics You Didn't Know About:
TESTNFA - test if not Friday afternoon
You jest, but... https://wiki.asterisk.org/wiki/display/AST/Application_GotoIfTime
@Applied-Mediocrity said in Assembly Mnemonics You Didn't Know About:
And, of course:
WTFENTER
WTFEXITWTFFNF
-
TESTC - Sets flag if your coffee has gone cold while writing this code
JA - Jump anywhere; surprise me
PC - Disables all bus masters
-
@Cursorkeys said in Assembly Mnemonics You Didn't Know About:
PC - Disables all bus masters
It just renames them to “bus collaboration colleagues”.
-
JOCTRSFRGR - Jump over the counter and steal from the register
-
Obligatory:
HCF – Halt and Catch Fire
-
@heterodox said in Assembly Mnemonics You Didn't Know About:
Obligatory:
HCF – Halt and Catch FireNo, that one expands the processor to fill a volume of a hundred cubic feet.
-
@Applied-Mediocrity said in Assembly Mnemonics You Didn't Know About:
NIKE
Sacrifice everything and melt the processor.
-
@Applied-Mediocrity said in Assembly Mnemonics You Didn't Know About:
NIKE - just do it
That's a prefix that you can apply to certain instructions (like LOCK), right?
-
@ben_lubar said in Assembly Mnemonics You Didn't Know About:
JEFF - jump if string equal to "Firefox"
No, that can't possibly be right.
-
@mott555 said in Assembly Mnemonics You Didn't Know About:
@heterodox said in Assembly Mnemonics You Didn't Know About:
Obligatory:
HCF – Halt and Catch FireNo, that one expands the processor to fill a volume of a hundred cubic feet.
So, more like an explosion than a fire?
-
@xaade, @cvi
That is correct. For this purpose in our 10th generation Vapor Lake processors TIM has been replaced with scented paraffin wax.
-
@ben_lubar said in Assembly Mnemonics You Didn't Know About:
JEFF - jump if string equal to "Firefox"
Surely that's the instruction for telling code that it is no longer welcome here?
-
@dkf said in Assembly Mnemonics You Didn't Know About:
@ben_lubar said in Assembly Mnemonics You Didn't Know About:
JEFF - jump if string equal to "Firefox"
Surely that's the instruction for telling code that it is no longer welcome here?
JEFF - Deletes the contents of random registers. Reason: no longer welcome here.
May also kill or fork the active thread for no apparent reason.
-
JLPT - Randomly flip some less significant bits of the program counter register every few instructions for the next several seconds.
-
@Placeholder said in Assembly Mnemonics You Didn't Know About:
Randomly flip some less significant bits
Eh, if you're going to do it, do it big; flip the most significant bits. Because it's more significant!
-
@Applied-Mediocrity said in Assembly Mnemonics You Didn't Know About:
PORQUE
-
@HardwareGeek said in Assembly Mnemonics You Didn't Know About:
@Placeholder said in Assembly Mnemonics You Didn't Know About:
Randomly flip some less significant bits
Eh, if you're going to do it, do it big; flip the most significant bits. Because it's more significant!
Significance doesn't matter: it's how you use it!
-
FJCVTZS - Floating-point Javascript ConVerT to Signed fixed-point, rounding toward Zero.
Wouldn't it be hilarious if there was actually bare-metal support for a JS insanity?
Oh wait, there is.
-
Why does that instruction talk about fixed-point? If I read it correctly, it just converts the source floating point number to a 32-bit signed integer, rounding to zero. (FCVTZS already does that, but with a bit more options, including the possibility for actual fixed-point conversions.)
-
@anotherusername said in Assembly Mnemonics You Didn't Know About:
@ben_lubar said in Assembly Mnemonics You Didn't Know About:
JEFF - jump if string equal to "Firefox"
No, that can't possibly be right.
JEFF - if on a mobile processor, do something different
-
@pie_flavor said in Assembly Mnemonics You Didn't Know About:
Wouldn't it be hilarious if there was actually bare-metal support for a JS insanity?
So much for RISC.
-
SUBLEQ - subtract value 1 from value 2 and jump if less than or equal to zero.
Seriously, who needs anything else?
-
@cvi said in Assembly Mnemonics You Didn't Know About:
Why does that instruction talk about fixed-point?
It's used on platforms where there isn't much hardware for floating point, and where converting a true float into something that can be handled efficiently (some fixed point type, probably either s15.16 or s31.32; I'd need to look at the details to see which) is a big win. It's important for some embedded processors, and makes it much easier to efficiently execute javascript on them. Apparently there's at least one customer who really wanted that…
-
@dkf No, I get why you'd want fixed-point, but the instruction in question (FJCVTZS) just converts to a signed integer (32-bit):
Floating-point Javascript Convert to Signed fixed-point, rounding toward Zero. This instruction converts the double-precision floating-point value in the SIMD and FP source register to a 32-bit signed integer using the Round towards Zero rounding mode, and write the result to the general-purpose destination register. If the result is too large to be accomodated as a signed 32-bit integer, then the result is the integer modulo 232, as held in a 32-bit signed integer.
You need the general non-javascript version of the instruction to convert to fixed-point (and there you can select the format and also use a 64-bit destination).
-
TEST M
: Set condition register if any other process, anywhere in the network, even if it's not actually connected to the network, is writing to the M register. Otherwise, clear condition register.SWIZ
r1 r2 r3: If r1 or r2 are pointers or if any digit of r2 is greater than 4, fault. Otherwise, set each digit of r3 to the $(corresponding digit of r2)th digit of r1.
-
@TwelveBaud Like in Shenzhen IO, in Exapunks they are telling us again that the future is BCD.
-
@TwelveBaud said in Assembly Mnemonics You Didn't Know About:
SWIZ
r1 r2 r3: If r1 or r2 are pointers or if any digit of r2 is greater than 4, fault. Otherwise, set each digit of r3 to the $(corresponding digit of r2)th digit of r1.“Hey, there's some opcodes there (for
SWIZ
with indirect arguments) that can be repurposed to be a different instruction! That'd be great for generating a trap to kernel mode…”… which is exactly how far too many hardware designers work. Saving a bit here, chiselling a few gates there, and turning all software built on top into a festering horror. It sounds like an exaggeration, but I've seen it happen multiple times. (I'm still aggrieved that the hardware designers for our next-gen chip thought it was a good idea to have operating modes where memory accesses would sometimes just vanish entirely. Because… Fuck You No! Give us a fucking data abort perhaps, but never make a memory access just vanish as we'll for sure never hunt down those bugs! We don't care if it makes your hardware more complicated.)
-
@dkf The Exapunks ISA doesn't support alternate addressing modes; registers can hold either integers (-9999 through +9999, one zero, saturating arithmetic) or "keywords" (string-like symbols that cannot be expressed as literals), and for the purposes of this thread, I chose to interpret "keyword" as "pointer to memory that we cannot see that contains that symbol". Trying to use a register or pseudoregister that holds a keyword in an arithmetic context is a fatal error that terminates your EXA on the subsequent tick.
I completely agree with you regarding the illogical and potentially pathological work habits of hardware designers; I'm just providing context for my post.
-
@TwelveBaud IIRC, in that example,
r2
can be either an immediate value or a register reference, and those are different addressing modes in hardware speak?
-
@PleegWat Fair point. It's technically
SWIZ N/R N/R R
which translates as
SWIZ
imm1/r1 imm2/r2 r3
but
-
@dkf said in Assembly Mnemonics You Didn't Know About:
SMLSLD — I want a Small Salad
And the corresponding YJHTGTBS - You Just HAD To Get The Big Salad