1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* (C) Copyright 2019 Kalray S.A. This file provides fegetround for the Coolidge processor. */ #include <fenv.h> int fegetround(void) { /* Get all $cs flags (exception flags and rounding mode) */ fenv_t rm; rm = __builtin_kvx_get(KVX_SFR_CS); /* Return the rounding mode */ return rm & FE_RND_MASK; }