FJCVTZS is "Floating-point Javascript Convert to Signed fixed-point, rounding toward Zero". 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.
I can find explanations of what the instruction does, but not why it exists. This thread says "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.". That's plausible but I would like a more detailed understanding.
ToInt32
in the spec) whenver you apply a bitwise operator to a number and at various other times (unless the engine has been able to maintain the number as an integer as an optimization, but in many cases it cannot). – AnuskaFCVTZS
instruction provided for this job is thatFJCVTZS
has a different behaviour on overflow. Namely, you always get the least 32 bits whereasFCVTZS
seems to do something different instead if the number doesn't fit. The correct behaviour ofFJCVTZS
seems to be slightly tricky to implement otherwise. – Caecilian