dctfix.
Decimal Convert To Fixed (Record)
dctfix. FRT,FRB
Converts a decimal floating-point number to a fixed-point integer.
Encoding
Binary Layout
59
0:5
FRT
6:10
/
11:15
FRB
16:20
290
21:30
Rc
31
Operands
-
FRT
Target -
FRB
Source
Example
dctfix f1, f3
Registers Altered
FPSCR (FPRF, FR, FI, FX, VXSNAN, VXCVI, XX), CR1 (if Rc=1)Related
More in Decimal Floating-Point
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
The DFP operand in FRB is rounded to an integer value and placed into FRT in the 64-bit signed binary integer format. The sign of the result is the same as the sign of the source operand, except when the source operand is a NaN or a zero.
Operation
if 'dctfix' then
FRT <- round(FRB)
else if 'dctfix.' then
FRT <- round(FRB)
CR1 <- result of comparison
Programming Note
It is recommended that software pre-round the operand to a floating-point integral using drintx[q] or drintn[q] if a rounding mode other than the current rounding mode specified by DRN is needed.