fenv.c (8229:78bf55f23338) fenv.c (11321:02e930db812d)
1/*
2 * Copyright (c) 2007 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 33 unchanged lines hidden (view full) ---

42 assert(rm >= 0 && rm < 4);
43 fesetround(m5_round_ops[rm]);
44}
45
46int m5_fegetround()
47{
48 int x;
49 int rm = fegetround();
1/*
2 * Copyright (c) 2007 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 33 unchanged lines hidden (view full) ---

42 assert(rm >= 0 && rm < 4);
43 fesetround(m5_round_ops[rm]);
44}
45
46int m5_fegetround()
47{
48 int x;
49 int rm = fegetround();
50 for(x = 0; x < 4; x++)
50 for (x = 0; x < 4; x++)
51 if (m5_round_ops[x] == rm)
52 return x;
53 abort();
54 return 0;
55}
56
51 if (m5_round_ops[x] == rm)
52 return x;
53 abort();
54 return 0;
55}
56