Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:multiasm:papc:chapter_6_10 [2025/10/31 16:19] – [FPU control instructions] ktokarzen:multiasm:papc:chapter_6_10 [2025/10/31 16:28] (current) – [Table] ktokarz
Line 168: Line 168:
 <table ftrans> <table ftrans>
 <caption>Transcendental arithmetic instructions</caption> <caption>Transcendental arithmetic instructions</caption>
-^ Mnemonic     ^ operation                              ^ note                    ^+^ Mnemonic     ^ operation                              ^ note on operands        ^
 | **f2xm1**    | {{ :en:multiasm:cs:f2xm1.png?105 }}    |                         | | **f2xm1**    | {{ :en:multiasm:cs:f2xm1.png?105 }}    |                         |
 | **fyl2x**    | {{ :en:multiasm:cs:fyl2x.png?105 }}    | y is ST(1); x is ST(0)  | | **fyl2x**    | {{ :en:multiasm:cs:fyl2x.png?105 }}    | y is ST(1); x is ST(0)  |
Line 176: Line 176:
 ===== FPU control instructions ===== ===== FPU control instructions =====
 The FPU control instructions help the programmer to save and restore the contents of chosen registers if there is a need to use them in an interrupt handler or inside a function. It is also possible to initialise the state of the FPU unit or clear errors. The FPU control instructions help the programmer to save and restore the contents of chosen registers if there is a need to use them in an interrupt handler or inside a function. It is also possible to initialise the state of the FPU unit or clear errors.
-The **fincstp*** increments and **fdecstp** decrements the FPU register stack pointer.+The **fincstp** increments and **fdecstp** decrements the FPU register stack pointer.
 The following set of instructions can perform error checking while execution (instructions without "N") or perform the operation without checking for error conditions (instructions without "N"). The following set of instructions can perform error checking while execution (instructions without "N") or perform the operation without checking for error conditions (instructions without "N").
 The **finit** and **fninit** initialise the FPU (after checking error conditions or without checking error conditions). The **finit** and **fninit** initialise the FPU (after checking error conditions or without checking error conditions).
Line 182: Line 182:
 The **fstcw** and **fnstcw** store the FPU control word. The **fstcw** and **fnstcw** store the FPU control word.
 The **fldcw** loads the FPU control word. The **fldcw** loads the FPU control word.
-The **fstenv** and **fnstenr** store the FPU environment.+The **fstenv** and **fnstenr** store the FPU environment. The environment consists of the FPU control word, status 
 +word, tag word, instruction pointer, data pointer, and last opcode register.
 The **fldenv** loads the FPU environment. The **fldenv** loads the FPU environment.
-The **fsave** and **fnsave** save the FPU state.+The **fsave** and **fnsave** save the FPU state. The state is the operating environment and full register stack.
 The **frstor** restores the FPU state. The **frstor** restores the FPU state.
-The **fstsw and **fnstsw** store the FPU status word. There is no instruction for restoring the status word.+The **fstsw** and **fnstsw** store the FPU status word. There is no instruction for restoring the status word.
 The **wait** or **fwait** waits for the FPU to finish the operation. The **wait** or **fwait** waits for the FPU to finish the operation.
 The **fnop** instruction is the no operation instruction for the FPU. The **fnop** instruction is the no operation instruction for the FPU.
en/multiasm/papc/chapter_6_10.1761927586.txt.gz · Last modified: 2025/10/31 16:19 by ktokarz
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0