flâneur — a map of the web's best reading

Initialization | Pintos Documentation

cs162.org · 486 words · saved by 1 readers

Unlike GPRs, the x86 FPU is different since it doesn’t have specific floating point registers that are independently addressable. Instead, it has a stack of registers, and the programmer interacts with the FPU by pushing and popping from the stack. For example, to compute the square root of 𝜋 π, you would first push 𝜋 π onto the stack, and then run the fsqrt instruction. This instruction will pop the top of the stack, compute the square root of that value, and push it onto the top of the stack. Now, 𝜋 π ​ is at the top of the stack. Newly-created threads and processes generally cannot assume anything about the contents of GPRs, meaning GPRs do not have to be initialized to any particular values when a new thread or process is created. On the contrary, newly-created threads and processes in general should be able to assume that the FPU is clean (i.e. initialized/reset properly), meaning the FPU needs to be initialized at the operating system startup, thread/process creation, an

Initialization | Pintos Documentation Skip to main content Menu Expand (external link) Document Search Copy Copied Pintos Documentation Initialization Unlike GPRs, the x86 FPU is different since it doesn’t have specific floating point registers that are independently addressable. Instead, it has a stack of registers, and the programmer interacts with the FPU by pushing and popping from the stack. For example, to compute the square root of \(\pi\), you would first push \(\pi\) onto the stack, and then run the fsqrt instruction. This instruction will pop the top of the stack, compute the square

Explore this link on the map →

related reading