Re:ARM or x86? ISA Doesn’t Matter
by Findecanor on Monday May 15, 2023 @07:36AM
(#35946573)
I think the parent poster might have been referring to the integer multiply-add instruction.
In fact, 64-bit ARM does not have a regular MUL instruction. "MUL" is an alias to a MADD with the zero register as addend.
Flipping one parameter bit in the instruction word changes a MADD into a MSUB.
That instruction is used to compute the remainder after a division.
Bigger ARM cores (such as Apple M1) perform macro-op fusion of DIV and MSUB to deliver both quotient and remainder in one operation.
Anyway. I thought that was pretty clever by ARM's designers.
In fact, 64-bit ARM does not have a regular MUL instruction. "MUL" is an alias to a MADD with the zero register as addend.
Flipping one parameter bit in the instruction word changes a MADD into a MSUB. That instruction is used to compute the remainder after a division. Bigger ARM cores (such as Apple M1) perform macro-op fusion of DIV and MSUB to deliver both quotient and remainder in one operation.
Anyway. I thought that was pretty clever by ARM's designers.