diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-08-30 11:19:17 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-08-30 11:19:17 +0000 |
commit | d21cefc26f716395b03e3c0d379ecac04656f963 (patch) | |
tree | 23cc0255a69adb29141d859194421f1c78fc961d /gcc/function.c | |
parent | 90970acd061f18e5e97162a36b92555ad162ed34 (diff) | |
download | gcc-d21cefc26f716395b03e3c0d379ecac04656f963.zip gcc-d21cefc26f716395b03e3c0d379ecac04656f963.tar.gz gcc-d21cefc26f716395b03e3c0d379ecac04656f963.tar.bz2 |
[64/77] Add a scalar_mode class
This patch adds a scalar_mode class that can hold any scalar mode,
specifically:
- scalar integers
- scalar floating-point values
- scalar fractional modes
- scalar accumulator modes
- pointer bounds modes
To start with this patch uses this type for GET_MODE_INNER.
Later patches add more uses.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* coretypes.h (scalar_mode): New class.
* machmode.h (scalar_mode): Likewise.
(scalar_mode::includes_p): New function.
(mode_to_inner): Return a scalar_mode rather than a machine_mode.
* gdbhooks.py (build_pretty_printers): Handle scalar_mode.
* genmodes.c (get_mode_class): Handle remaining scalar modes.
* cfgexpand.c (expand_debug_expr): Use scalar_mode.
* expmed.c (store_bit_field_1): Likewise.
(extract_bit_field_1): Likewise.
* expr.c (write_complex_part): Likewise.
(read_complex_part): Likewise.
(emit_move_complex_push): Likewise.
(expand_expr_real_2): Likewise.
* function.c (assign_parm_setup_reg): Likewise.
(assign_parms_unsplit_complex): Likewise.
* optabs.c (expand_binop): Likewise.
* rtlanal.c (subreg_get_info): Likewise.
* simplify-rtx.c (simplify_immed_subreg): Likewise.
* varasm.c (output_constant_pool_2): Likewise.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251515
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/function.c b/gcc/function.c index 8e8291e..af5e050 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -3365,8 +3365,7 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm, /* Mark complex types separately. */ if (GET_CODE (parmreg) == CONCAT) { - machine_mode submode - = GET_MODE_INNER (GET_MODE (parmreg)); + scalar_mode submode = GET_MODE_INNER (GET_MODE (parmreg)); int regnor = REGNO (XEXP (parmreg, 0)); int regnoi = REGNO (XEXP (parmreg, 1)); rtx stackr = adjust_address_nv (data->stack_parm, submode, 0); @@ -3503,7 +3502,7 @@ assign_parms_unsplit_complex (struct assign_parm_data_all *all, && targetm.calls.split_complex_arg (TREE_TYPE (parm))) { rtx tmp, real, imag; - machine_mode inner = GET_MODE_INNER (DECL_MODE (parm)); + scalar_mode inner = GET_MODE_INNER (DECL_MODE (parm)); real = DECL_RTL (fnargs[i]); imag = DECL_RTL (fnargs[i + 1]); |