Reputation: 14519
Do modern x86 processors have native support for decimal floating point arithmetic? I can't find anything about it online.
Upvotes: 8
Views: 1244
Reputation: 64904
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
.
Upvotes: 7