[77/77] Add a complex_mode class
commit430c243d294c979597b53ca062deb76cdfa2ae1b
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:21:04 +0000 (30 11:21 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:21:04 +0000 (30 11:21 +0000)
tree887cbbdf7eab9b228fc8dbc63e7d4c06f9b255eb
parentaf71096c672bed5a22e28fe4aeb9ee0c4d91d025
[77/77] Add a complex_mode class

This patch adds another machine_mode wrapper for modes that are
known to be COMPLEX_MODE_P.  There aren't yet many places that make
use of it, but that might change in future.

2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* coretypes.h (complex_mode): New type.
* gdbhooks.py (build_pretty_printer): Handle it.
* machmode.h (complex_mode): New class.
(complex_mode::includes_p): New function.
(is_complex_int_mode): Likewise.
(is_complex_float_mode): Likewise.
* genmodes.c (get_mode_class): Handle complex mode classes.
* function.c (expand_function_end): Use is_complex_int_mode.

gcc/go/
* go-lang.c (go_langhook_type_for_mode): Use is_complex_float_mode.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251527 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/coretypes.h
gcc/function.c
gcc/gdbhooks.py
gcc/genmodes.c
gcc/go/ChangeLog
gcc/go/go-lang.c
gcc/machmode.h