i accidentally got myself rambled at by a coworker who used to work on MIPS and now i'm terrified
-
Show this thread
-
choice tidbits include: 1. mips has over a dozen distinct ABIs 2. many of which resulted from mutually incompatible buggy implementations 3. Loongson made one. By accident. Because they read the spec differently and the conformance tests didn't catch it
7 replies 15 retweets 79 likesShow this thread -
mips requires by fiat that the high bits [in the 64-bit portion] of any 32-bit register be the sign extension of the 32-bit value, or else demons may come out of your nose
3 replies 6 retweets 43 likesShow this thread -
this is not an exaggeration. here is what it says.pic.twitter.com/BLIQQmuo1l
10 replies 4 retweets 44 likesShow this thread -
"ADD" is a MIPS instruction. you may think it is used to add two numbers. it is not. in fact, it's basically never used. what you want is "ADDU".
11 replies 2 retweets 52 likesShow this thread -
Replying to @FioraAeterna
IIRC "add" is very useful for ubsan-like purposes. It traps on signed overflow.
1 reply 0 retweets 0 likes -
Replying to @RichFelker
yeah, though i don't know if ubsan actually uses it or if it just takes the regular path that it does everywhere else
1 reply 0 retweets 0 likes -
Replying to @FioraAeterna
I suspect it doesn't because they want to call insecure library code to report errors rather than immediately faulting out. :-(
1 reply 0 retweets 0 likes -
Replying to @RichFelker @FioraAeterna
Perhaps as importantly 'trap on X condition' instructions make out of order machines sad
1 reply 0 retweets 0 likes
I'd be happy with "undefined state at the current privilege level if a trap occurs", i.e. no choice but to terminate the process.
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.