Index Home About Blog
Date: Tue, 10 Mar 2009 12:48:26 +0100
From: Terje Mathisen <"terje.mathisen at">
Newsgroups: alt.folklore.computers,comp.arch
Subject: Re: Architectural Diversity
Message-ID: <>

Peter Flass wrote:
> What does the x86 look like under the covers?  I have heard it is
> "really" RISC.  I find it hard to believe that "REP MOVSB" isn't

REP MOVS has indeed been microcoded on (nearly?) all x86 cpus, and Andy
Glew have posted that this was a mistake:

REP MOVS has to handle all the possible permutations of
source/destination memory types, cacheability, alignment etc, and this
makes the microcode relatively slow-starting, making it easy to beat for
small blocks.

HW is really good at figuring out many-way branches, and this would have
allowed REP MOVS to stay as the canonical way to handle all block moves.

Today we have all sorts of funky code sequences locally optimized for
various fixed or variable-sized copies, to/from memory that needs to
stay in cache, or not.

- <Terje.Mathisen at>
"almost all programming can be viewed as an exercise in caching"

Index Home About Blog