Re: x86: Question about state of general purpose registers on switch to 64-bit mode

2020-05-23 Thread Linus Torvalds
On Sat, May 23, 2020 at 8:57 AM Arvind Sankar wrote: > > (1) We assume that registers that are set in 32-bit mode will have their > upper 32 bits clear when we switch to 64-bit mode. Realistically, I don't think that is what happens. The upper bits probably won't actually be affected at all by

Re: x86: Question about state of general purpose registers on switch to 64-bit mode

2020-05-23 Thread Andy Lutomirski
On Sat, May 23, 2020 at 8:57 AM Arvind Sankar wrote: > > Hi, > > I have a question about the state of the upper 32 bits of the general > purpose registers following a switch from/to 64-bit mode. > > Both the AMD [0] and Intel [1] manuals state that these bits are > undefined following a switch

x86: Question about state of general purpose registers on switch to 64-bit mode

2020-05-23 Thread Arvind Sankar
Hi, I have a question about the state of the upper 32 bits of the general purpose registers following a switch from/to 64-bit mode. Both the AMD [0] and Intel [1] manuals state that these bits are undefined following a switch from 64 to 32-bit mode. Since they can't be accessed in 32-bit mode,