Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder if MOVEM was inspiration for ARM's (V)LDM/STM instructions?

x86 has provided an optimised memory copy instruction ever since the 8086: REP MOVS. The history and evolution of this instruction has quite an interesting story from a CPU architecture perspective.



The concept of a single instruction to load or store multiple registers is much much older than the 68000 architecture. It goes back to 1964 when IBM announced the S/360 architecture. The instructions were called LM (load multiple) and STM (store multiple). It's probably an older concept than that but I'm not familiar with 1950's computer architecture.

Here is LM and STM used in an IBM assembler calling convention: http://en.wikipedia.org/wiki/IBM_Basic_assembly_language_and...


> The history and evolution of this instruction has quite an interesting story from a CPU architecture perspective.

I'd love to read about that if you have any references. I've used the MOVS instructions a million times without really thinking about them much.


Originally the instruction was the fastest way to do a block copy, and generally this was the case until MMX appeared, and then it fell into the set of "microcoded CISC instructions no one really uses" - so Intel didn't bother to optimise it much (the RISC fad was also really starting to take off in the PC world at the time) and it started falling behind. But then, in the post-P4 era, when CPU designers realised that high clock speeds weren't everything, and it was better to make instructions do more per clock instead, it got a lot more attention and a lot of detailed information about that can be found in this thread:

http://software.intel.com/en-us/forums/topic/275765

Even more recently (Nehalem and beyond), they really started paying attention to optimising this instruction, so that even the byte/word variants will copy entire cache lines at once if possible.

http://stackoverflow.com/questions/8858778/why-are-complicat...

(IMHO the 2nd answer to that question should really have been chosen, since the 1st answer would be closer to reality a decade or two ago.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: