logoalt Hacker News

vardump10/01/20242 repliesview on HN

Just when you get used with features like x86 CPUs combining two instructions into one micro-op (micro-op fusing), you get something like this.

I guess immediate addressing mode addition is a good choice to execute at rename / allocation stage, as it's common, relatively simple and can't generate exceptions.


Replies

Taniwha10/01/2024

This isn't really combining as the result of the first increment is needed by the intermediate compare, but is a rewriting that removes a dependency (or moves it further back in the stream)

show 1 reply
eigenform10/01/2024

> immediate addressing mode addition

Well, except for the fact that you need to read from a register before adding the immediate displacement to it. You'd have to know the physical register and do the read very early (before renaming), or predict the value!

show 1 reply