Click here to Skip to main content
15,881,803 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: A basic model for how a CPU works Pin
Jeremy Falcon19-Jan-23 13:06
professionalJeremy Falcon19-Jan-23 13:06 
GeneralRe: A basic model for how a CPU works Pin
obermd19-Jan-23 13:34
obermd19-Jan-23 13:34 
GeneralRe: A basic model for how a CPU works Pin
trønderen19-Jan-23 15:32
trønderen19-Jan-23 15:32 
GeneralRe: A basic model for how a CPU works Pin
Jeremy Falcon19-Jan-23 15:35
professionalJeremy Falcon19-Jan-23 15:35 
GeneralRe: A basic model for how a CPU works Pin
Calin Negru20-Jan-23 2:20
Calin Negru20-Jan-23 2:20 
GeneralRe: A basic model for how a CPU works Pin
kalberts20-Jan-23 9:12
kalberts20-Jan-23 9:12 
GeneralRe: A basic model for how a CPU works Pin
Calin Negru20-Jan-23 20:02
Calin Negru20-Jan-23 20:02 
GeneralRe: A basic model for how a CPU works Pin
kalberts20-Jan-23 8:59
kalberts20-Jan-23 8:59 
obermd wrote:
An example of this would be PUSH AX, POP AX, which older processors would dutifully execute and newer processors would simply cut out of the execution stream.
I wasn't aware of this optimization. What surprises me, though, is that compilers let anything like this through their optimization stages at the code generating level. More specifically: That code generators lets such things through so frequently that it justifies CPU mechanisms to compensate for the lack of compile time optimzation.

I guess it takes quite a handful of gates to analyze the instruction stream to identify such noop sequences and pick them out of the instruction stream. I was working (at instruction level, not hardware) on a machine which in its first version had a few hardware optimization for special cases, that were removed in later versions: The special cases occured so rarely that on a given gate budget (which you always have when designing a CPU), you could gain a much larger general speedup by spending your gates in other parts.

Do you have specific examples of CPUs that eliminate 'noop sequences' like the one you describe? (Preferably with link to documentation.)
GeneralRe: A basic model for how a CPU works Pin
obermd19-Jan-23 13:34
obermd19-Jan-23 13:34 
GeneralRe: A basic model for how a CPU works Pin
Calin Negru20-Jan-23 2:26
Calin Negru20-Jan-23 2:26 
GeneralRe: A basic model for how a CPU works Pin
englebart19-Jan-23 15:16
professionalenglebart19-Jan-23 15:16 
GeneralRe: A basic model for how a CPU works Pin
jmaida19-Jan-23 16:53
jmaida19-Jan-23 16:53 
GeneralRe: A basic model for how a CPU works Pin
englebart20-Jan-23 7:04
professionalenglebart20-Jan-23 7:04 
GeneralRe: A basic model for how a CPU works Pin
jmaida20-Jan-23 7:27
jmaida20-Jan-23 7:27 
GeneralRe: A basic model for how a CPU works Pin
kalberts20-Jan-23 9:48
kalberts20-Jan-23 9:48 
GeneralRe: A basic model for how a CPU works Pin
englebart20-Jan-23 15:18
professionalenglebart20-Jan-23 15:18 
GeneralRe: A basic model for how a CPU works Pin
kalberts20-Jan-23 8:39
kalberts20-Jan-23 8:39 
GeneralRe: A basic model for how a CPU works Pin
jmaida20-Jan-23 9:47
jmaida20-Jan-23 9:47 
GeneralRe: A basic model for how a CPU works Pin
BillWoodruff19-Jan-23 18:08
professionalBillWoodruff19-Jan-23 18:08 
GeneralRe: A basic model for how a CPU works Pin
Calin Negru19-Jan-23 23:49
Calin Negru19-Jan-23 23:49 
GeneralRe: A basic model for how a CPU works Pin
Keith Barrow19-Jan-23 22:59
professionalKeith Barrow19-Jan-23 22:59 
PraiseNice time news Pin
honey the codewitch19-Jan-23 6:31
mvahoney the codewitch19-Jan-23 6:31 
GeneralRe: Nice time news Pin
jeron119-Jan-23 6:37
jeron119-Jan-23 6:37 
GeneralRe: Nice time news Pin
Jeremy Falcon19-Jan-23 6:39
professionalJeremy Falcon19-Jan-23 6:39 
GeneralRe: Nice time news Pin
dandy7220-Jan-23 5:07
dandy7220-Jan-23 5:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.