发明名称 Decimal floating-point quantum exception detection
摘要 A system and method for detecting decimal floating point data processing exceptions. A processor accepts at least one decimal floating point operand and performs a decimal floating point operation on the at least one decimal floating point operand to produce a decimal floating point result. A determination is made as to whether the decimal floating point result fails to maintain a preferred quantum. The preferred quantum indicates a value represented by a least significant digit of a significand of the decimal floating point result. An output is provided, in response to the determining that the decimal floating point result fails to maintain the preferred quantum, indicating an occurrence of a quantum exception. A maskable exception can be generated that is immediately trapped or later detected to control conditional processing.
申请公布号 US9244654(B2) 申请公布日期 2016.01.26
申请号 US201213544338 申请日期 2012.07.09
申请人 International Business Machines Corporation 发明人 Cowlishaw Michael F.;Mueller Silvia Melitta;Schwarz Eric;Yeh Phil C.
分类号 G06F11/00;G06F7/499;G06F9/30;G06F9/38 主分类号 G06F11/00
代理机构 代理人 Kinnaman, Jr. William A.
主权项 1. A computer program product for detecting a Decimal Floating Point Quantum exception, the computer program product comprising: a computer readable storage medium having program code embodied therewith, the program code readable by a computer processor to perform a method comprising: executing, by the processor, an instruction, the executing comprising: obtaining, by at least one processor of a processing environment, at least one decimal floating point operand; performing a decimal floating point operation on the at least one decimal floating point operand to produce a decimal floating point result having a quantum; determining a preferred quantum based upon the operation and on the at least one decimal floating point operand; based on determining that the quantum of the decimal floating point result is different from the preferred quantum, providing an output indicating a quantum exception, wherein providing an output indicating a quantum exception comprises: determining whether a quantum exception mask bit is set;based on determining that the quantum exception mask bit is not set, storing the decimal floating point result and setting a quantum exception flag bit; andbased on determining that the quantum exception mask bit is set, storing the decimal floating point result and performing a trap operation; and based on determining that the quantum of the decimal floating point result is the same as the preferred quantum, providing an output without a quantum exception.
地址 Armonk NY US