8

Do modern x86 processors have native support for decimal floating point arithmetic? I can't find anything about it online.

1
  • 2
    Only in the sense that they are Turing-complete and can efficiently do extended-precision integer stuff which lets you build a software decimal-FP implementation. Commented Oct 30, 2017 at 5:35

1 Answer 1

7

No, which may make it hard to find anything about it.

There are two instructions, fbld and fbstp, that deal with decimal floats, but they are just to convert from and to packed BCD representation. This is the only direct support for any decimal floating point, all arithmetic is on binary formats. These instructions are extremely microcoded, especially fbstp which often translates to 150-300 µops.

There are (or in some sense "have been") some integer instructions that would be useful when writing procedures that implement arithmetic on BCD floats (packed or unpacked), but they are obsolete and not supported in 64bit mode (and never constituted "native support for decimal floating point arithmetic" anyway). These are instructions such as aaa and daa.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.