IP/EIP registers? Pre-RIP use of instruction pointer

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Locked
lopidas
Member
Member
Posts: 65
Joined: Sun May 26, 2013 10:12 am

IP/EIP registers? Pre-RIP use of instruction pointer

Post by lopidas »

What was their purpose when they were directly unusable?
User avatar
dozniak
Member
Member
Posts: 723
Joined: Thu Jul 12, 2012 7:29 am
Location: Tallinn, Estonia

Re: IP/EIP registers? Pre-RIP use of instruction pointer

Post by dozniak »

Is there some invisible power preventing you from reading the kcufing manual?
Learn to read.
lopidas
Member
Member
Posts: 65
Joined: Sun May 26, 2013 10:12 am

Re: IP/EIP registers? Pre-RIP use of instruction pointer

Post by lopidas »

No
User avatar
dozniak
Member
Member
Posts: 723
Joined: Thu Jul 12, 2012 7:29 am
Location: Tallinn, Estonia

Re: IP/EIP registers? Pre-RIP use of instruction pointer

Post by dozniak »

May I ask you why are you breaking forum rules by not reading it?
Learn to read.
lopidas
Member
Member
Posts: 65
Joined: Sun May 26, 2013 10:12 am

Re: IP/EIP registers? Pre-RIP use of instruction pointer

Post by lopidas »

But I can't find there why it was exposed as real register instead of being CPU internal only. Only usage I found is pushing his value in case of exceptions. Which I think does not need exposing it
Last edited by lopidas on Tue Jun 04, 2013 1:32 pm, edited 1 time in total.
User avatar
dozniak
Member
Member
Posts: 723
Joined: Thu Jul 12, 2012 7:29 am
Location: Tallinn, Estonia

Re: IP/EIP registers? Pre-RIP use of instruction pointer

Post by dozniak »

I heard x86_64 introduced this thing called RIP-relative addressing...
Learn to read.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: IP/EIP registers? Pre-RIP use of instruction pointer

Post by Combuster »

lopidas wrote:But I can't find there why it was exposed as real register instead of being CPU internal only.
The instruction pointer has always been a real register. Even the 8086 has a load IP with constant, load IP with register, and push/pop IP on the stack, and even *gasp* addition.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Locked