Honestly, x86 is not nearly as CISC as those go. It just has a somewhat developed addressing modes comparing to the utterly anemic "register plus constant offset" one, and you are allowed to fold some load-arithmetic-store combinations into a single instruction. But that's it, no double- or triple-indexing or anything like that.
And all it really takes to support this is just adding a second (smaller) ALU on your chip to do addressing calculations.BINOP disp(rd1+rd2 shl #N), rs vs. SHL rTMP1, rd2, #N ADD rTMP1, rTMP1, rd1 LOAD rTMP2, disp(rTMP1) BINOP rTMP2, rTMP2, rs STORE disp(rTMP1), rTMP2Loving this series! I'm currently implementing a z80 emulator (gameboy) and it's my first real introduction to CISC, and is really pushing my assembly / machine code skills - so having these blog posts coming from the "other direction" are really interesting and give me some good context.
I've implemented toy languages and bytecode compilers/vms before but seeing it from a professional perspective is just fascinating.
That being said it was totally unexpected to find out we can use "addresses" for addition on x86.