]> git.ipfire.org Git - thirdparty/gcc.git/commit
genmodes: Define NUM_MODE_* macros
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 8 Nov 2021 10:36:25 +0000 (10:36 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 8 Nov 2021 10:36:25 +0000 (10:36 +0000)
commit8fd2477ddc358660611f79d8e50f31ed0f3aa105
tree6395941555799811b180c6eb89c5784daf68b92f
parent61a7f947cc063f92ccdaa6319f1f3894bcc8557e
genmodes: Define NUM_MODE_* macros

I was working on a patch that needed to calculate the number of
modes in a particular class.  It seemed better to have genmodes
generate this directly rather than do the kind of dance that
expmed.h had.

gcc/
* genmodes.c (emit_insn_modes_h): Define NUM_MODE_* macros.
* expmed.h (NUM_MODE_INT): Delete in favor of genmodes definitions.
(NUM_MODE_PARTIAL_INT, NUM_MODE_VECTOR_INT): Likewise.
* real.h (real_format_for_mode): Use NUM_MODE_FLOAT and
NUM_MODE_DECIMAL_FLOAT.
(REAL_MODE_FORMAT): Likewise.
gcc/expmed.h
gcc/genmodes.c
gcc/real.h