NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: georgelappies on April 28, 2012, 07:06:11 PM

Title: On a quad core cpu, does each core have its own ax register?
Post by: georgelappies on April 28, 2012, 07:06:11 PM
Or is there only one ax register shared between the 4 cores?
Title: Re: On a quad core cpu, does each core have its own ax register?
Post by: Frank Kotler on April 28, 2012, 08:02:35 PM
I'm not very familiar with multi-core CPUs, but I think the question may be meaningless. I don't think you'll be switching CPUs without switching execution threads. Essentially, each core does have its own ax register, but it is saved and restored when tasks are switched, so you'll always have "your own" ax register to work with. I don't think it's anything you need to worry about, unless you're writing your own multi-tasking OS.

I think that the "true" answer is more complicated than that, but I hope that'll suffice. Corrections welcomed!

Best,
Frank

Title: Re: On a quad core cpu, does each core have its own ax register?
Post by: Cyrill Gorcunov on April 28, 2012, 08:45:07 PM
yup, each core has own registers set, they are not shared.
Title: Re: On a quad core cpu, does each core have its own ax register?
Post by: Cyrill Gorcunov on April 28, 2012, 08:49:20 PM
(fwiw, except of some msr registers, you need intel/amd manual for details)