6 ms·
I wholly agree, processors are strongly typed, even if there are holes like using integer instructions on floating-point values in XMM regs, very insightful com
by Pannoniae 10d ago
I wholly agree, processors are strongly typed, even if there are holes like using integer instructions on floating-point values in XMM regs, very insightful comment:)
btw a bit of nitpick: to be fair basically no one uses x87 anymore, it's https://www.felixcloutier.com/x86/cvttss2si https://www.felixcloutier.com/x86/cvttss2si and friends but yes :)
- uecker 10d agoFor "strongly typed" I would expect some type checking.
- TheOtherHobbes 10d agoTrue for IEE754 floating point operations, which are constrained to valid bit patterns. An operation on an invalid pattern - can happen with uninitialised memory - throws an exception. Otherwise, no.
- uecker 9d agoThis is still not type checking, it accepts whenever the bit pattern is a valid for floating point even when it originally was used as another type.
- Dylan16807 9d agoWhat do you mean by invalid patterns? Signalling NaNs? I wouldn't really call those invalid, but also that's only about one in a thousand bit patterns. If it kicks in less than 1% of the time it's not really "type checking".