3 ms·
ARMv7 (not AArch64) has the STM instruction that lets you push a register set, selected by bitmask. eg: STMFD sp!, {r3-r7,lr} (I believe the "FD" suffix
by rwmj 8y ago
ARMv7 (not AArch64) has the STM instruction that lets you push a register set, selected by bitmask. eg:
STMFD sp!, {r3-r7,lr}
(I believe the "FD" suffix is to do with the stack growing down - "full descending")
Of course this is just implemented with microcode so it's not really any more efficient than a series of PUSHes, except there's a bit less I-cache pressure.
- jlarcombe 8y agoIn the original ARM design the multiple register transfers were much more efficient than the equivalent single register transfers because of the simple architecture which had an inherent load delay (it couldn't fetch an instruction and a data word in a single cycle). When they switched to the Harvard model they lost their advantage. Talking of the ARM reminds me of older heroic feats of assembly-programmed internet software in the Acorn days, such as Ben Dooks' all-asm TCP/IP stack and Jon Ribbens' web browser. Probably not been done that often...