8 ms·
x86 prefixes and escape opcodes flowchart
- debugnik 8mo agoThis site redirects to HN when it notices HN in the referrer.
- chimpontherun 8mo agoopen in new tab
- yellowapple 8mo agoThat doesn't seem to clear the referrer, at least on Firefox. Gotta go a step further and outright copy/paste the URL into an already-created tab.
- high_na_euv 8mo agoOpen in private works
- therein 8mo agoWow, I didn't even notice because I have extensions that strip the referrer header. Excellent.
- st_goliath 8mo agoIf you have JavaScript enabled, that is. JWZ at least does the redirect on the server side. The following is pulled in from `https://soc.me/assets/js/turnBack.js https://soc.me/assets/js/turnBack.js`: const undesirables = [ "news.ycombinator.com/", // "reddit.com/", // disable temporaily "lobste.rs/" ] ; if (undesirables.find(site => document.referrer.includes(site))) { window.location.replace(document.referrer); } I wonder why Reddit is "temporarily not undesirable".
- mechazawa 8mo agoWhy are they undesirable though
- self_awareness 8mo agoGit history doesn't explain it unfortunately https://github.com/soc/soc.me/blame/main/assets/js/turnBack.js https://github.com/soc/soc.me/blame/main/assets/js/turnBack.... Although, when we inspect author's profile on lobste.rs, we'll see that he's banned: https://lobste.rs/~soc https://lobste.rs/~soc [Banned 4 years ago by pushcx: Troll.] Maybe he's banned from HN as well. And this 'undesirables' is a method of taking some kind of revenge.
- colejohnson66 8mo agoLast comment was just over 5 years ago. https://news.ycombinator.com/user?id=soc https://news.ycombinator.com/user?id=soc
- self_awareness 8mo agoAuthor has said that development is moved to codeberg, but github version was good enough for the "turnBack.js" analysis.
- self_awareness 8mo agoUh, before I wrote my sibling comment I read 'comment' as 'commit' and because of it I somehow assumed it was a github link... not sure how that happened. Anyway, the user named 'soc' on HN has "listbite" in the description. I saw this profile, but I think it's not the same guy. But also I wasn't sure so I didn't paste the link to HN at all.
- trashb 8mo agoThis is an interesting way to prevent the hug of death. I wonder what the author's reasoning is, also would it really be effective?
- debugnik 8mo agoI doubt it, the redirect is client-side, I got a flash of the page before the redirect.
- philjackson 8mo agoIf anything, it's going to at least double its traffic this way when people click again assuming they hit back somehow.
- bArray 8mo agoCopy the URL and manually paste it into a new tab, no referrer then.
- koito17 8mo agoThe fact sites do evil things with these headers is why I configure Firefox with network.http.referer.XOriginTrimmingPolicy set to 2. It "breaks" sites, but often in good ways (such as the site in TFA).
- mghackerlady 8mo agoReferrer links are a dumb idea. Why the hell do you want to know where I'm coming from other than to track me
- Nzen 8mo agoFor targeting advertising expendatures at the site level. If most of my traffic, as revealed by referrer links, comes from social-media-platform-foo and only a little from social-media-platform-bar, then I am likely to spend more on ads from foo than from bar. I'll grant that it is a noisy measure, but doesn't need to be about tracking a particular individual.
- mghackerlady 8mo agoBusinesses survived just fine before this. Do personalised ads earn more money? Maybe. But they're invasive and if the governments bowed down to the people instead of corporations they'd be just as illegal as stalking a potential customer to harass them when they're most likely to see you
- SilentM68 8mo agoGot same issue with Edge, but works with Firefox :)
- nhubbard 8mo agoI thought I was losing my mind for a second. What a strange script to run...
- dagenix 8mo agohttps://archive.ph/ZMsnQ https://archive.ph/ZMsnQ
- korrectional 8mo agocaptcha farm?
- ycombinatrix 8mo agoNo captcha for me, though I do often have captcha problems with the site.
- tucnak 8mo agoI respect the disobedience.
- snvzz 8mo agoThis is in no small part why x86 code density is awful despite variable size encoding.
- themafia 8mo agoAwful compared to what? I've seen benchmarks that go both ways in terms of a "winner" but in terms of overall variance there seems to be very little. There are some cases where ARM64 or RISCV do better and there are some cases where x86_64 does better. I can't see code density being a relevant factor when picking one ISA over another. We've got good compilers now anyways.. outside of power consumption.. the ISA wars are dead.
- deleted 8mo ago[deleted]
- bell-cot 8mo agoTechnically, code density still matters - because both L1 cache memory and L1 instruction fetch misses are very expensive. But as you point out, code density gets far less attention in tech circles these days. And higher-level decision makers rightfully focus on higher-level system performance metrics.
- whobre 8mo agoCompared to VAX, of course…
- adgjlsfhk1 8mo ago> outside of power consumption. This is a pretty huge caveat. >90% of cpus are <1W (usb cables, wifi cards, storage controllers etc), and 99% are <10W (phones, lots of laptops)
- adrian_b 8mo agoYou are right about the order of magnitude of the percentages, but the CPUs <10 W are in phones, tablets, small SBCs (single-board computers) and only in a small fraction of laptops and mini-PCs. The vast majority of laptops and mini-PCs uses more powerful CPUs. While 15 W CPUs were normal many years ago, when Intel launched the "Ultrabook" campaign, in recent years, due to better cooling, most laptops and mini-PCs use 25 W to 30 W CPUs, and a significant fraction of them (bigger than the fraction of the laptops/mini-PCs that uses <=10 W CPUs) uses CPUs with a TDP between 35 W and 65 W.
- st_goliath 8mo agoFun little tidbit: The 0x40-0x4f range used for the REX prefix actually clashes with the single-byte encodings for increment/decrement. When AMD designed the 64 bit extension, they had run out of available single-byte opcodes to use as a prefix and decided to re-use those. The INC/DEC instructions are still available in 64 bit mode, but not in their single-byte encodings.
- TheAdamist 8mo agoWhich clever code can utilize to determine which mode its running in and branch appropriately depending if the inc/dec were executed or not.
- adgjlsfhk1 8mo agoIt is still crazy to me that intel though having 2 1 byte instructions for something that could just be coded as a single add with immediate instruction (which they had anyway).
- adrian_b 8mo agoOn that page, there is a link to another interesting page on the same site: https://soc.me/interfaces/intels-original-64bit-extensions-for-x86.html https://soc.me/interfaces/intels-original-64bit-extensions-f... where there are links to a couple of patents filed by Intel in 2000, about a 64-bit extension of the x86 ISA, which had been implemented in Pentium 4, but which had been nonetheless disabled and hidden from the users, in order to not compete with Itanium. The page explains the content of the patents. As already mentioned by another poster, at least on Firefox you have to open a tab and then copy this link there, to avoid being identified as an "undesirable" :-)
- jxors 8mo agoThis flowchart hides the most awful parts (IMO) of x86 prefixes: some combinations of prefixes are invalid but still parsed and executed, like combining two segment overrides, or placing a legacy prefix after a REX prefix. The CPU also doesn't care if you use prefixes that aren't valid for a specific instruction, for example a REP on a non-repeatable instruction. The LOCK prefix is the only prefix that makes the sane choice to reject invalid combinations, rather than silently accept them. Also, the (E)VEX prefix doesn't behave like the other prefixes: it must be placed last, and can therefore only appear once. All other prefixes can be repeated.
- benj111 8mo ago> doesn't behave like the other prefixes: it must be placed last As in a suffix??? or a post prefix (suf prefix??? Brunch-fix!)
- jxors 8mo agoIt must be the rightmost prefix among the prefixes. It also can't be repeated, unlike all other prefixes
- vardump 8mo agoI wonder whether there are some prefixes that cause (some) CPUs to execute the instruction a lot slower.
- jxors 8mo agoThis is indeed a thing. I believe in general instructions are executed slower when there are more than 4 legacy prefixes. And there are plenty of other timing differences between different microarchitectures
- peterfirefly 8mo ago> The CPU also doesn't care if you use prefixes that aren't valid for a specific instruction, for example a REP on a non-repeatable instruction. This is one of the reasons why the x86 could be extended so much. PAUSE is just REP NOP, for example. Segment prefixes in front of conditional branches were used as static branch prediction hints (which I believe have returned in some newer Intel CPUs). Useful if you want to make a hint on newer CPUs that is harmless on older CPUs. Some prefixes have become part of the encoding for certain SIMD instructions, but that is a different case because those prefixes aren't hints.
- dataflow 8mo agoThere's EVEX2 now. It's hard to keep up...
- notepad0x90 8mo agohiding this one, i hope others downvote it as well. Dick move by the person hosting this redirecting back to HN. Such incessant levels of pettiness are so irritating.