Re:ARM or x86? ISA Doesn't Matter
by rowanG077 on Saturday August 31, 2024 @07:56PM
(#41412969)
I would say it's load, store, compare, add, subtract, call, return and branch. If you have that you cover almost all code.
[ Parent
| on HN ]
Implementing multiplies as a bunch of adds has got to suck for performance though.
Re:ARM or x86? ISA Doesn't Matter
by colejohnson66 on Saturday August 31, 2024 @10:25PM
(#41413714)
Well, if you decompose it to a series of shifts and adds, it’s a bit quicker. That’s actually how the 8086 implemented it.
Sure. Multiplication is exceedingly rare compared to any of those 8 instructions though. RISC-V base instruction set doesn't include multiplication for example. If you had room to add more then 8 I would rather add the bitops first. This will allow you to also write a much more efficient soft mul in addition to many more things.