Author Topic: On a quad core cpu, does each core have its own ax register?  (Read 5863 times)

Offline georgelappies

  • Jr. Member
  • *
  • Posts: 12
On a quad core cpu, does each core have its own ax register?
« on: April 28, 2012, 07:06:11 PM »
Or is there only one ax register shared between the 4 cores?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: On a quad core cpu, does each core have its own ax register?
« Reply #1 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


Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: On a quad core cpu, does each core have its own ax register?
« Reply #2 on: April 28, 2012, 08:45:07 PM »
yup, each core has own registers set, they are not shared.

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: On a quad core cpu, does each core have its own ax register?
« Reply #3 on: April 28, 2012, 08:49:20 PM »
(fwiw, except of some msr registers, you need intel/amd manual for details)