Комментарии:
Look like the last one is really useful for regexp
ОтветитьI've been absolutely humbled.
Ответитьwow PEXT might actually be useful in my work... wth :D
ОтветитьI love the reference to The Doors, I totally forgot that Mr Mojo Risin was an anagram of Jim Morrison’s name.
ОтветитьAll these instructions are just crazy, so specialised it's not funny. I think they kind of ruined X86 adding all this bloat, all it seemed to do is make generation after generation of processor obsolete because someone got smart and found a use for these meaning you needed new hardware all the time. I hope they don't ruin ARM in the same way.
This all makes we want to play retro with 8 bit chips, where signed numbers are the limits of head scratching.
Appreciate the tour. Did quite a lot of Assembly coding in my earlier years, and quickly grew to love it - it's a lot of fun when you get up and running, but you need to keep so much more information in your brain / at your finger tips compared to higher level languages.
ОтветитьShould've added some horror music. This shit is scary man
ОтветитьHow have i ended up watching this? I know literally nothing about ASM, and i am confident i would have understood just as much if this was delivered in Klingon. Yet i am watching it.
ОтветитьCMPXCHG is very useful! It's called test and set or compare and swap in other instruction sets. Just used it today actually... or at least the gcc wrapper for it __sync_val_compare_and_swap.
ОтветитьHow in gods name would you even start creating a compiler that actually uses these
ОтветитьC64's 6510 or Amigas 68000 Instructions was much more simple ...
ОтветитьJust wanted to say hi, it's nice to be surrounded by like-minded nerds.
ОтветитьPCMPxSTRx seems the operation that I use to choose my breakfast!
ОтветитьI was hoping for example use cases for each of these. None of them is “crazy” if you know the use cases. These are essential for huge efficiency gains for some of these functions.
ОтветитьCISC is wild
ОтветитьCalling the x86 implementation of the most fundamental operation in parallel programming crazy does not inspire confidence in your ability to determine what is crazy...
ОтветитьI've used MIPS excessively and never looked at X86 much. This feels like when you were playing yugioh in 1999 and you were summoning and setting 1 card every turn and then you get teleported to 2023 where people play their entire deck in one turn and have cards with effects that are 7 paragraphs
ОтветитьThanks for your sharing
Ответитьlove .asm for dos. there were things in dos like batch files that were great, and even linux not so simple
Ответитьthese instructions sound great for things i would never use. i would have used the true random number thing. i used to take the fractional seconds and then do a bunch of scrambling with some data. a real random number generator could be taken from an arbitrary photo file.
Ответить#1 is like an assembler within an assembler
ОтветитьWas hoping for a string instruction. Wasn't disappointed
ОтветитьЯ не понял, почему это выпало в рекомендации. Впрочем я вообще мало что понял. Но спасибо. Вдохновленный голос рассказчика заряжает энергией, чтобы завтра по́йти сидеть планктоном в офис <3
ОтветитьHoly crap, MPSADBW would be amazing for doing block matching for stereo vision depth and disparity calculations. You take the value of a bunch of grouped pixels from one camera frame and scrub it horizontally across the x axis of a frame from the other camera to find the closest match i.e. the minimum. Its like this instruction was tailor made for it. Great video btw
ОтветитьPfft... VAX computed POLYNOMIALS 40 years ago. It also had instructions which mapped directly to COBOL statements.
ОтветитьThe sarcasm in your voice, lmao ! I like PEXT but it sounded ridiculous nevertheless, lol.
ОтветитьLast time I benchmarked (like 10 years ago) the LOCK BTS instruction was faster for mutexes than LOCK CMPXCHG; and it's stupid anyway to waste a whole byte on a mutex, when a single bit suffices.
ОтветитьThe funny thing about PEXT is that it directly corresponds to the joke programming language INTERCAL's "select" operator. A joke operator made in 1972 has become a real, useful instruction for CPUs.
ОтветитьWow, it's basically a whole standard library down there.
Ответитьperhaps we get lucky and x86 is abandoned and replaced by risc-v or arm somewhen in future^^ it's ridiculous what the CPUs are still carrying burdens. Btw, I'm a bit sad that the "punpck" instructions (from which I have my nick) were too simple for this list 😅 But afaik they have been cleaning up a bit like getting rid of A20 gate and real-mode if I'm not mistaken.
Ответитьreal
Ответитьvfmaddsub132ps xmm0, xmm1, xmmword ptr cs:[edi+esi*4+8068860h] is a valid x86 instruction
ОтветитьWow that carryless multiplication instruction took me straight back to my Information & Coding Theory class.
ОтветитьCrazy? The last one is more like crazy usefull and powerfull.
ОтветитьThays crazy 😧
Ответитьthis is why i prefer RISC
ОтветитьPEXT seems like a very useful operation if you pack or unpack binary data.
Ответитьconfusion between x86 en xmms or sse...
x86=8bits instructions
x286=16bits instructions
x386=32bits instruction / protected mode
x686=complete and lastest 32bits
x86_64 (sometime amd64) = 64 bits instruction
XMMS, SSE3 etc= extended instructions not part of x86 formly
Feels like I'm collecting slideshows at a slenderman game, half expecting him to pop up at some point. Nice style and vid.
ОтветитьI first learned about CMPXCHG in contemporary reviews of the 486 that questioned the level of architectural improvement over the 386. Some reviewers thought the instruction was bizarre and was representative of a lackluster architectural improvement. Granted, it wasn't used much in the main lifecycle of the product, but the Linux kernel ended up requiring it, which is why 386 support was eventually dropped. Linux is possibly dropping 486 support (can't tell if they went through with it) for a similar reason: they want to require the presence of CMPXCHG8B, introduced with the original Pentium.
Fun fact, it was problems with CMPXCHG8B that resulted in the Pentium F00F bug. The FDIV math bug is more famous, but the F00F bug would lock the processor rather than give slightly imprecise floating point results.
Actualy though what were they thinking 💀
ОтветитьHow “micro” is this microcode lmao
This is really cool stuff. I mean, it’s really difficult to explain how far ISAs have moved in twenty years.
C can still do it but how much farther can we abstract mid level languages from how powerful machine code has become?
Udbgwr and udbgrd are also crazy!
ОтветитьAnd this explains why I like RISC processors.
ОтветитьAh yes. Mostly useless instructions but sometimes a lifesaver. A long time ago I had to parse a file of road lat/longs, billions of them. The straightforward C code to do this took days. In a fit of energy, I rewrote the code to use the advanced string instructions and got like a 10,000 times speedup. Then we were limited by the disk speed.
ОтветитьPCLMULQDQ can be used for acceleration of CRCs. There are single-cycle CRC32 and CRC32C instructions now too (common on other archs too: arm, sparc, risc-v).
ОтветитьTechnically you are wrong when saying "this instruction does this in only 1 clock cycle" as when decoded by the cpu in micro ops, it might take more than 1 cycle to actually execute
ОтветитьHolly... Why is this comment section full of hypercompetent people like I just going through uni and reading some of these comments makes me really understand that we are standing on the shoulders of giants
ОтветитьX86 assembler syntax is odd compared to another CPUs like Motorola or ARM. The register names are strange like eax, edx ...
Ответить