title: Why do ARM chips have an instruction with Javascript in the name (FJCVTZS)?
body: <p><a href="https://developer.arm.com/documentation/dui0801/h/A64-Floating-point-Instructions/FJCVTZS" rel="noreferrer">FJCVTZS</a> is &quot;Floating-point Javascript Convert to Signed fixed-point, rounding toward Zero&quot;.  It is supported in Arm v8.3-A chips and later.  Which is odd, because you don't expect to see JavaScript so close to the bare metal.</p>
  <p>I can find explanations of what the instruction does, but not why it exists.  <a href="https://twitter.com/marcan42/status/1009468989213327360" rel="noreferrer">This thread</a> says &quot;it exists as a single instruction is because JS's lack of an integer type means certain use cases need this operation obscenely often for no good algorithmic reason.&quot;.  That's plausible but I would like a more detailed understanding.</p>