Oh no, oh no, oh no. No, no, please no. No, please no. Omg No! No, no, no. Oh, this is so bad.. https://github.com/riscv/riscv-isa-manual/commit/d420a9a5123e03b2d6fb652a9c4e8ad8700a40a3 … #riscvformal
-
Show this thread
-
"This nop sets all registers to zero and orders pizza, is that a bug?" "I don't know. Does super_complex_function() ever halt?"pic.twitter.com/h2THiAv3nD
2 replies 0 retweets 2 likesShow this thread -
Replying to @oe1cxw
I don't understand this example; why would the nop order pizza? Wouldn't the nop long be finished before the write to misa happened?
1 reply 0 retweets 0 likes -
Replying to @cr1901
You haven't fully understand undefined behavior yet. I envy you.. Don't google "undefined behavior causality". It's better this way.. :)
1 reply 0 retweets 0 likes -
Replying to @oe1cxw
That Google hint seems to mostly be for C compilers; I assume you mean "the whole program becomes undefined if there's even one case of UB"?
1 reply 0 retweets 1 like -
Replying to @cr1901
No! I said don't google that! :) UB has nothing to do with C compilers specifically. But it's unsurprising that this get most hits. 1/
1 reply 0 retweets 1 like -
But yes, UB does not mean "we don't define what happens when X (with X being something like div by zero)". UB means we only define behavior
1 reply 0 retweets 0 likes -
for programs/systems/whatever that do not do X. If this happens anywhere, all bets are off. Same with a CPU. This is different from things
1 reply 0 retweets 0 likes -
that are "implementation defined", or "unspecified", or "unpredictable". Full blown UB means: X happens anywhere, even in the future, and
1 reply 0 retweets 0 likes -
the entire spec goes out the window and the system can do whatever it wants. UB is part of the contract between system and user, and the
1 reply 0 retweets 1 like
user must guarantee that the UB is never ever triggered by their program.
-
-
Replying to @oe1cxw
AIUI, UB is sometimes necessary for speed and to prevent state space explosion for realizable impls of software/hardware. So what I ended >>
1 reply 0 retweets 0 likes -
up doing when seeing your example near the beginning of the thread was asking: "How _would_ I end up creating an impl that orders pizza >>
1 reply 0 retweets 1 like - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.