Commit eafa30ef by Uros Bizjak Committed by Uros Bizjak

emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.

	* emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
	* emit-rtl.h (rtl_data): Remove return_bnd.
	* explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
	* function.c (diddle_return_value): Do not handle crtl->return_bnd.
	* genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
	(POINTER_BOUNDS_MODE): Remove definition.
	(make_pointer_bounds_mode): Remove.
	(get_mode_class): Do not handle MODE_POINTER_BOUNDS.
	* machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
	(scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
	* mode-classes.def: Do not define MODE_POINTER_BOUNDS.
	* stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
	* tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
	* varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.

	* config/i386/i386-modes.def (BND32, BND64): Remove.
	* config/i386/i386.c (dbx_register_map): Remove bound registers.
	(dbx64_register_map): Ditto.
	(svr4_dbx_register_map): Ditto.
	(indirect_thunk_bnd_needed): Remove.
	(indirect_thunks_bnd_used): Ditto.
	(indirect_return_bnd_needed): Ditto.
	(indirect_return_via_cx_bnd): Ditto.
	(enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
	(indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
	(output_indirect_thunk): Ditto.  Remove need_prefix argument.
	(output_indirect_thunk_function): Remove handling of
	indirect_return_bnd_needed, indirect_return_via_cx_bnd,
	indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
	(ix86_save_reg): Remove handling of crtl->return_bnd.
	(ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
	(ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
	and UNSPEC_BNDLX_ADDR.
	(ix86_output_indirect_branch_via_reg): Remove handling of
	indirect_thunk_prefix_bnd.
	(ix86_output_indirect_branch_via_push): Ditto.
	(ix86_output_function_return): Ditto.
	(ix86_output_indirect_function_return): Ditto.
	(avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
	* config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
	(CALL_USED_REGISTERS): Ditto.
	(REG_ALLOC_ORDER): Update for removal of bound registers.
	(HI_REGISTER_NAMES): Ditto.
	* config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
	(UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
	(UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
	(BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
	(FIRST_PSEUDO_REG): Update.
	(BND): Remove mode iterator.
	* config/i386/predicates.md (bnd_mem_operator): Remove.

From-SVN: r263835
parent f5cd4f8c
2018-08-24 Uros Bizjak <ubizjak@gmail.com>
* emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
* emit-rtl.h (rtl_data): Remove return_bnd.
* explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
* function.c (diddle_return_value): Do not handle crtl->return_bnd.
* genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
(POINTER_BOUNDS_MODE): Remove definition.
(make_pointer_bounds_mode): Remove.
(get_mode_class): Do not handle MODE_POINTER_BOUNDS.
* machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
(scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
* mode-classes.def: Do not define MODE_POINTER_BOUNDS.
* stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
* tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
* varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
* config/i386/i386-modes.def (BND32, BND64): Remove.
* config/i386/i386.c (dbx_register_map): Remove bound registers.
(dbx64_register_map): Ditto.
(svr4_dbx_register_map): Ditto.
(indirect_thunk_bnd_needed): Remove.
(indirect_thunks_bnd_used): Ditto.
(indirect_return_bnd_needed): Ditto.
(indirect_return_via_cx_bnd): Ditto.
(enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
(indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
(output_indirect_thunk): Ditto. Remove need_prefix argument.
(output_indirect_thunk_function): Remove handling of
indirect_return_bnd_needed, indirect_return_via_cx_bnd,
indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
(ix86_save_reg): Remove handling of crtl->return_bnd.
(ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
(ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
and UNSPEC_BNDLX_ADDR.
(ix86_output_indirect_branch_via_reg): Remove handling of
indirect_thunk_prefix_bnd.
(ix86_output_indirect_branch_via_push): Ditto.
(ix86_output_function_return): Ditto.
(ix86_output_indirect_function_return): Ditto.
(avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
* config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
(CALL_USED_REGISTERS): Ditto.
(REG_ALLOC_ORDER): Update for removal of bound registers.
(HI_REGISTER_NAMES): Ditto.
* config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
(UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
(UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
(BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
(FIRST_PSEUDO_REG): Update.
(BND): Remove mode iterator.
* config/i386/predicates.md (bnd_mem_operator): Remove.
2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
......
......@@ -98,9 +98,6 @@ VECTOR_MODE (INT, QI, 14); /* V14QI */
VECTOR_MODE (INT, HI, 6); /* V6HI */
VECTOR_MODE (INT, SI, 64); /* V64SI */
POINTER_BOUNDS_MODE (BND32, 8);
POINTER_BOUNDS_MODE (BND64, 16);
INT_MODE (OI, 32);
INT_MODE (XI, 64);
......
......@@ -1033,9 +1033,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
/*xmm24,xmm25,xmm26,xmm27,xmm28,xmm29,xmm30,xmm31*/ \
0, 0, 0, 0, 0, 0, 0, 0, \
/* k0, k1, k2, k3, k4, k5, k6, k7*/ \
0, 0, 0, 0, 0, 0, 0, 0, \
/* b0, b1, b2, b3*/ \
0, 0, 0, 0 }
0, 0, 0, 0, 0, 0, 0, 0 }
/* 1 for registers not available across function calls.
These must include the FIXED_REGISTERS and also any
......@@ -1072,9 +1070,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
/*xmm24,xmm25,xmm26,xmm27,xmm28,xmm29,xmm30,xmm31*/ \
6, 6, 6, 6, 6, 6, 6, 6, \
/* k0, k1, k2, k3, k4, k5, k6, k7*/ \
1, 1, 1, 1, 1, 1, 1, 1, \
/* b0, b1, b2, b3*/ \
1, 1, 1, 1 }
1, 1, 1, 1, 1, 1, 1, 1 }
/* Order in which to allocate registers. Each register must be
listed once, even those in FIXED_REGISTERS. List frame pointer
......@@ -1090,8 +1086,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, \
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, \
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, \
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, \
78, 79, 80 }
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76 }
/* ADJUST_REG_ALLOC_ORDER is a macro which permits reg_alloc_order
to be rearranged based on a particular function. When using sse math,
......@@ -2043,8 +2038,7 @@ do { \
"xmm20", "xmm21", "xmm22", "xmm23", \
"xmm24", "xmm25", "xmm26", "xmm27", \
"xmm28", "xmm29", "xmm30", "xmm31", \
"k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7", \
"bnd0", "bnd1", "bnd2", "bnd3" }
"k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7" }
#define REGISTER_NAMES HI_REGISTER_NAMES
......
......@@ -184,16 +184,6 @@
UNSPEC_PDEP
UNSPEC_PEXT
UNSPEC_BNDMK
UNSPEC_BNDMK_ADDR
UNSPEC_BNDSTX
UNSPEC_BNDLDX
UNSPEC_BNDLDX_ADDR
UNSPEC_BNDCL
UNSPEC_BNDCU
UNSPEC_BNDCN
UNSPEC_MPX_FENCE
;; IRET support
UNSPEC_INTERRUPT_RETURN
])
......@@ -428,11 +418,7 @@
(MASK5_REG 74)
(MASK6_REG 75)
(MASK7_REG 76)
(BND0_REG 77)
(BND1_REG 78)
(BND2_REG 79)
(BND3_REG 80)
(FIRST_PSEUDO_REG 81)
(FIRST_PSEUDO_REG 77)
])
;; Insns whose names begin with "x86_" are emitted by gen_FOO calls
......@@ -1054,10 +1040,6 @@
(define_mode_iterator DWIH [(SI "!TARGET_64BIT")
(DI "TARGET_64BIT")])
;; Bound modes.
(define_mode_iterator BND [(BND32 "!TARGET_LP64")
(BND64 "TARGET_LP64")])
;; Instruction suffix for integer modes.
(define_mode_attr imodesuffix [(QI "b") (HI "w") (SI "l") (DI "q")])
......
......@@ -1135,9 +1135,6 @@
(define_predicate "vsib_mem_operator"
(match_code "mem"))
(define_predicate "bnd_mem_operator"
(match_code "mem"))
;; Return true if the rtx is known to be at least 32 bits aligned.
(define_predicate "aligned_operand"
(match_operand 0 "general_operand")
......
......@@ -6410,13 +6410,6 @@ init_emit_once (void)
if (GET_MODE_CLASS ((machine_mode) i) == MODE_CC)
const_tiny_rtx[0][i] = const0_rtx;
FOR_EACH_MODE_IN_CLASS (smode_iter, MODE_POINTER_BOUNDS)
{
scalar_mode smode = smode_iter.require ();
wide_int wi_zero = wi::zero (GET_MODE_PRECISION (smode));
const_tiny_rtx[0][smode] = immed_wide_int_const (wi_zero, smode);
}
pc_rtx = gen_rtx_fmt_ (PC, VOIDmode);
ret_rtx = gen_rtx_fmt_ (RETURN, VOIDmode);
simple_return_rtx = gen_rtx_fmt_ (SIMPLE_RETURN, VOIDmode);
......
......@@ -75,9 +75,6 @@ struct GTY(()) rtl_data {
result in a register, current_function_return_rtx will always be
the hard register containing the result. */
rtx return_rtx;
/* If nonxero, an RTL expression for the lcoation at which the current
function returns bounds for its result. */
rtx return_bnd;
/* Vector of initial-value pairs. Each pair consists of a pseudo
register of approprite mode that stores the initial value a hard
......
......@@ -56,8 +56,7 @@ trunc_int_for_mode (HOST_WIDE_INT c, machine_mode mode)
int width = GET_MODE_PRECISION (smode);
/* You want to truncate to a _what_? */
gcc_assert (SCALAR_INT_MODE_P (mode)
|| POINTER_BOUNDS_MODE_P (mode));
gcc_assert (SCALAR_INT_MODE_P (mode));
/* Canonicalize BImode to 0 and STORE_FLAG_VALUE. */
if (smode == BImode)
......
......@@ -5180,7 +5180,6 @@ diddle_return_value_1 (void (*doit) (rtx, void *), void *arg, rtx outgoing)
void
diddle_return_value (void (*doit) (rtx, void *), void *arg)
{
diddle_return_value_1 (doit, arg, crtl->return_bnd);
diddle_return_value_1 (doit, arg, crtl->return_rtx);
}
......
......@@ -340,7 +340,6 @@ complete_mode (struct mode_data *m)
break;
case MODE_INT:
case MODE_POINTER_BOUNDS:
case MODE_FLOAT:
case MODE_DECIMAL_FLOAT:
case MODE_FRACT:
......@@ -572,19 +571,6 @@ make_special_mode (enum mode_class cl, const char *name,
new_mode (cl, name, file, line);
}
#define POINTER_BOUNDS_MODE(N, Y) \
make_pointer_bounds_mode (#N, Y, __FILE__, __LINE__)
static void ATTRIBUTE_UNUSED
make_pointer_bounds_mode (const char *name,
unsigned int bytesize,
const char *file, unsigned int line)
{
struct mode_data *m = new_mode (MODE_POINTER_BOUNDS, name, file, line);
m->bytesize = bytesize;
}
#define INT_MODE(N, Y) FRACTIONAL_INT_MODE (N, -1U, Y)
#define FRACTIONAL_INT_MODE(N, B, Y) \
make_int_mode (#N, B, Y, __FILE__, __LINE__)
......@@ -1213,7 +1199,6 @@ get_mode_class (struct mode_data *mode)
case MODE_UFRACT:
case MODE_ACCUM:
case MODE_UACCUM:
case MODE_POINTER_BOUNDS:
return "scalar_mode";
case MODE_FLOAT:
......
......@@ -237,9 +237,6 @@ extern const unsigned char mode_class[NUM_MACHINE_MODES];
|| CLASS == MODE_ACCUM \
|| CLASS == MODE_UACCUM)
#define POINTER_BOUNDS_MODE_P(MODE) \
(GET_MODE_CLASS (MODE) == MODE_POINTER_BOUNDS)
/* An optional T (i.e. a T or nothing), where T is some form of mode class. */
template<typename T>
class opt_mode
......@@ -482,7 +479,6 @@ scalar_mode::includes_p (machine_mode m)
case MODE_UACCUM:
case MODE_FLOAT:
case MODE_DECIMAL_FLOAT:
case MODE_POINTER_BOUNDS:
return true;
default:
return false;
......
......@@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see
DEF_MODE_CLASS (MODE_CC), /* condition code in a register */ \
DEF_MODE_CLASS (MODE_INT), /* integer */ \
DEF_MODE_CLASS (MODE_PARTIAL_INT), /* integer with padding bits */ \
DEF_MODE_CLASS (MODE_POINTER_BOUNDS), /* bounds */ \
DEF_MODE_CLASS (MODE_FRACT), /* signed fractional number */ \
DEF_MODE_CLASS (MODE_UFRACT), /* unsigned fractional number */ \
DEF_MODE_CLASS (MODE_ACCUM), /* signed accumulator */ \
......
......@@ -390,7 +390,6 @@ int_mode_for_mode (machine_mode mode)
case MODE_VECTOR_ACCUM:
case MODE_VECTOR_UFRACT:
case MODE_VECTOR_UACCUM:
case MODE_POINTER_BOUNDS:
return int_mode_for_size (GET_MODE_BITSIZE (mode), 0);
case MODE_RANDOM:
......
......@@ -19,4 +19,3 @@ male_indirect_jump (long offset)
/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
/* { dg-final { scan-assembler-not "__x86_indirect_thunk\n" } } */
/* { dg-final { scan-assembler-not "__x86_indirect_thunk_bnd\n" } } */
......@@ -620,8 +620,6 @@ enum tree_index {
TI_CONST_FEXCEPT_T_PTR_TYPE,
TI_POINTER_SIZED_TYPE,
TI_POINTER_BOUNDS_TYPE,
TI_DFLOAT32_TYPE,
TI_DFLOAT64_TYPE,
TI_DFLOAT128_TYPE,
......
......@@ -3923,7 +3923,6 @@ output_constant_pool_2 (fixed_size_mode mode, rtx x, unsigned int align)
case MODE_UFRACT:
case MODE_ACCUM:
case MODE_UACCUM:
case MODE_POINTER_BOUNDS:
assemble_integer (x, GET_MODE_SIZE (mode), align, 1);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment