freenode/lisp - IRC Chatlog
Search
7:09:51
jnewton
I'm reading something which directly contradicts a fundamental principle of how RISC works. Maybe my understanding has been wrong all this time.
7:13:43
jnewton
My question is if I load (write) data into a register, and in the next instruction I try to read from that register. will I (1) read the old value, or (2) will the processor automatically stall waiting for the data to be ready? I though (1) was the case and that that was considered a feature.
7:13:51
jdz
jnewton: There was an article how Apple's new CPU can have sane instruction stream decoding and speculative execution (because of constant instruction sizes), whereas x86 is screwed because it has to process too many false positives since it has to try instructions at every byte position.
7:15:35
jdz
jnewton: Stalls are usually associated with writes/reads to memory. And even then CPUs speculate.
7:17:13
jdz
jnewton: AMD CPUs do even more: https://www.amd.com/system/files/documents/security-analysis-predictive-store-forwarding.pdf
7:17:55
|3b|
ACTION thought it was generally a 'feature' of RISC to /not/ automatically do things for you
7:19:58
jnewton
|3b|: that was what I thought as well. i.e., you were allowed to write, and still read the old value for one cycle.
7:21:08
jnewton
Sorry I know this is not a lispy conversation. just thought there might be someone here that could clear up my confusion
7:21:51
beach
jnewton: #lisp may be about to move to #commonlisp at libera.chat because of a "hostile takeover" of freenode.
7:25:52
jdz
jnewton: I think this is the article I had in mind: https://debugger.medium.com/why-is-apples-m1-chip-so-fast-3262b158cba2
7:32:03
|3b|
not sure it is even guaranteed to show you the old value on old mips (or anything else with load delay slot), might depend on cache hit, or might stall automatically and delay slot just gives you a chance to do something during the stall
7:47:48
White_Flame
jnewton: "RISC" was a concrete architecture, with a bunch of interconnected tradeoffs. Talking about "RISC style" is as contentious as "What is a Lisp?"
14:58:19
green__
I'm trying to get ironclad's sha256 hash to give them same output as sha256sum. Something is way off. When I ask ironclad to sha256 sum a file, I get the same output as sha256sum. But if I feed it a byte array that's the same as the file I get a different output. Google-searches suggest others have had this problem, but there's no pointer to resolution... Anybody else struggle with this?
15:00:35
green__
Example is here: https://titanwolf.org/Network/Articles/Article?AID=dd489e0b-0965-4cf2-a8ec-1c2f653f6a89#gsc.tab=0 . But if I sha256sum a file with "Rosetta code" I get something different..
15:01:08
phoe
the only possible problem I see is the implicit newline that unix text files have at the end
15:01:40
phoe
I account for that in my Lisp string, whereas a file on a unix filesystem created e.g. with nano or vim will usually have a newline at its very end
15:09:15
phoe
I used to do that some time ago, but I don't remember anymore; #emacs might know better