- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Our Intel Developer Services Application Engineers responded:
In the 2003 edition of the IA-32 Intel Architecture Software Developers Manual, Volume 2: Instruction Set Reference, the following sentences appear in the third paragrpah under the Description heading for the FADD instruction:
The no operand version of the floating point add instructions always results in the register stack being popped. In some assemblers, the mnemonic for this instruction is FADD rather than FADDP.
Sentences that are virtually identical to this appear for FSUB, FMUL, and FDIV. What this means is that no matter how the no operand version of the instruction is implemented, be it FADD, or FADDP, it will pop the stack. This means that even though some assemblers choose to support the FADD mnemonic, it will always act like the FADDP instruction. You can expect similar behavior for FSUB, FMUL, and FDIV. Good luck!
==
Lexi S.
IntelSoftware NetworkSupport
Message Edited by intel.software.network.support on 12-07-2005 04:51 PM
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I have read this too, but it does not answer my questions. Why do some assemblers accept FADD (no parameters), if it is not a valid mnemonic?
Our Application Engineers responded:
The no operand form of the FADD (and the other mathematical functions) mnemonic will always pop the register stack. While this allows these instructions to have functionality that is not intuitive (from the mnemonic itself), it does not make the mnemonic invalid. The manual clearly allows this form of the mnemonic, and therefore, it cannot be invalid. The functionality is certainly non-intuitive in this case. It is possible that this functionality is the result of the requirement for legacy support. It may be that in the early years, the no operand form of the FADD instruction popped the register stack, and programs were written using this functionality. It is certainly true that many programs have been written over the years which rely on this mnemonic. If all assemblers were to change to a more intuitive form of the mnemonic (FADDP with no operands), then all those legacy programs would fail. This is counter to the guarantee that legacy code will assemble and run seamlessly. We do not know why this form of the mnemonic originally appeared, but we have to support it and any legacy programs which use it. The short answer is, therefore, that some assemblers accept the no operand form of the FADD mnemonic because someone else did in the early years and they wish to maintain compatibility with those earlier assemblers. Exactly which assemblers that was and when that originally happened is not known.
==
Lexi S.
IntelSoftware NetworkSupport
Message Edited by intel.software.network.support on 12-07-2005 04:54 PM

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page