Re:The Return of the Frame Pointers
by weebull on Sunday March 17, 2024 @11:34AM
(#39735149)
It would be, yes. x86 had very few registers, so anything you could do to free them up was vital. Arm 32bit has 32 general purpose registers I think, and RISC V certainly does. In fact there's no difference between 32 and 64 bit in that respect. If anything, 64-bit frame pointers make it marginally worse.
[ Parent
| on HN ]
Re:The Return of the Frame Pointers
by CountSessine on Sunday March 17, 2024 @12:00PM
(#39735342)
Sadly, no. 32-bit ARM only has 16 GPR’s (two of which are zero and link), mostly because of the stupid predication bits in the instruction encoding.
That said, I don’t know how valuable getting rid of FP on ARM is - I once benchmarked ffmpeg on 32-bit x86 before and after enabling FP and PIC (basically removing 2 GPRs) and the difference was huge (>10%) but that’s an extreme example.
Arm32 doesn’t have a zero-value register. Its non-general-purpose registers are PC, LR, SP, FP – tho the link register can be used for temporary values.
Re:The Return of the Frame Pointers
by CountSessine on Wednesday March 20, 2024 @08:19PM
(#39773630)
Ah yes - the weird one was PC not zero. Anyhoo, all of these mistakes were fixed with Arm64.