Re:Should you learn C to “learn how the computer works”?
by pm215 on Tuesday October 02, 2018 @04:54PM
(#18125620)
There's a reason 32-bit ARM has 'move base register down and then do some stores' and 'do loads and then move base register up' (stmdb and ldmia) rather than just plain old ldm and stm, and I'm pretty sure it's because it makes the entry and exit sequences for function calls with a stack shorter. (The ARM ISA doesn't privilege a downward growing stack, so you can use stmib and ldmda if you want your stack to grow upward; the Thumb ISA, however, does want a downward stack for push and pop.)
[ Parent
| on HN ]
Re:Should you learn C to “learn how the computer works”?
by XMPPwocky on Tuesday October 02, 2018 @09:02PM
(#18126912)
That's definitely a large part of it, but it also makes small memcpys nicer (load sizeof(foo)/4 registers from sourceptr with post increment, store them to destptr with post increment)