Home | History | Annotate | Download | only in s390x
      1 #ifndef ROUNDING_H
      2 #define ROUNDING_H
      3 
      4 /* Macros, so the values can be used together with opcodes.h */
      5 
      6 /* ---------------------------------------------------------------- */
      7 /* BFP rounding mode as it is encoded in the m3 field of certain    */
      8 /* instructions (e.g. CFEBR)                                        */
      9 /* ---------------------------------------------------------------- */
     10 #define M3_BFP_ROUND_PER_FPC        0
     11 
     12 // Cannot be mapped to IRRoundingMode
     13 #define M3_BFP_ROUND_NEAREST_AWAY   1
     14 
     15 // 2 is not allowed
     16 
     17 // Needs floating point extension facility
     18 // Cannot be mapped to IRRoundingMode
     19 #define M3_BFP_ROUND_PREPARE_SHORT  3
     20 
     21 #define M3_BFP_ROUND_NEAREST_EVEN   4
     22 #define M3_BFP_ROUND_ZERO           5
     23 #define M3_BFP_ROUND_POSINF         6
     24 #define M3_BFP_ROUND_NEGINF         7
     25 
     26 
     27 /* ---------------------------------------------------------------- */
     28 /* BFP rounding mode as it is encoded in bits [29:31] of the FPC    */
     29 /* register. Only rounding modes 0..3 are universally supported.    */
     30 /* Others require additional hardware facilities.                   */
     31 /* ---------------------------------------------------------------- */
     32 #define FPC_BFP_ROUND_NEAREST_EVEN  0
     33 #define FPC_BFP_ROUND_ZERO          1
     34 #define FPC_BFP_ROUND_POSINF        2
     35 #define FPC_BFP_ROUND_NEGINF        3
     36 
     37 // 4,5,6 are not allowed
     38 
     39 // Needs floating point extension facility
     40 // Cannot be mapped to IRRoundingMode
     41 #define FPC_BFP_ROUND_PREPARE_SHORT 7
     42 
     43 
     44 #endif /* ROUNDING_H */
     45