Update LOCAL_PATCHES after libsanitizer merge.
[official-gcc.git] / gcc / brig / brigfrontend / brig-inst-mod-handler.cc
blobbf5e97ddcd186b870cc9a5c7f3ec85b1023ff4f2
1 /* brig-inst-mod-handler.cc -- brig rounding moded instruction handling
2 Copyright (C) 2016-2018 Free Software Foundation, Inc.
3 Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
4 for General Processor Tech.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 3, or (at your option) any later
11 version.
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
22 #include "brig-code-entry-handler.h"
24 #include "gimple-expr.h"
25 #include "errors.h"
27 size_t
28 brig_inst_mod_handler::generate (const BrigBase *base)
30 brig_basic_inst_handler basic_handler (m_parent);
31 return basic_handler (base);
34 const BrigAluModifier8_t *
35 brig_inst_mod_handler::modifier (const BrigBase *base) const
37 const BrigInstMod *inst = (const BrigInstMod *) base;
38 return &inst->modifier;
41 const BrigRound8_t *
42 brig_inst_mod_handler::round (const BrigBase *base) const
44 const BrigInstMod *inst = (const BrigInstMod *) base;
45 return &inst->round;
48 /* This used to inject fesetround () calls to control the rounding mode of the
49 actual executed floating point operation. It turned out that supporting
50 conversions using fesetround calls won't work in gcc due to it not being
51 able to restrict code motions across calls at the moment. This
52 functionality is therefore disabled for now until a better solution is
53 found or if fesetround () is fixed in gcc. */
54 size_t
55 brig_inst_mod_handler::operator () (const BrigBase *base)
57 return generate (base);