BIFROST_RTZ = 0x3
};
+enum bifrost_minmax_mode {
+ BIFROST_MINMAX_NONE = 0x0,
+ BIFROST_NAN_WINS = 0x1,
+ BIFROST_SRC1_WINS = 0x2,
+ BIFROST_SRC0_WINS = 0x3,
+};
+
struct bifrost_fma_add {
unsigned src0 : 3;
unsigned src1 : 3;
static void dump_minmax_mode(FILE *fp, unsigned mod)
{
switch (mod) {
- case 0:
+ case BIFROST_MINMAX_NONE:
/* Same as fmax() and fmin() -- return the other number if any
* number is NaN. Also always return +0 if one argument is +0 and
* the other is -0.
*/
break;
- case 1:
+ case BIFROST_NAN_WINS:
/* Instead of never returning a NaN, always return one. The
* "greater"/"lesser" NaN is always returned, first by checking the
* sign and then the mantissa bits.
*/
fprintf(fp, ".nan_wins");
break;
- case 2:
+ case BIFROST_SRC1_WINS:
/* For max, implement src0 > src1 ? src0 : src1
* For min, implement src0 < src1 ? src0 : src1
*
*/
fprintf(fp, ".src1_wins");
break;
- case 3:
+ case BIFROST_SRC0_WINS:
/* For max, implement src0 < src1 ? src1 : src0
* For min, implement src0 > src1 ? src1 : src0
*/