Commit 95e3eb80 by Jakub Jelinek Committed by Jakub Jelinek

i386.c (ix86_option_override_internal, [...]): Formatting fixes.

	* config/i386/i386.c (ix86_option_override_internal,
	ix86_can_inline_p, classify_argument, construct_container,
	ix86_expand_prologue, ix86_expand_split_stack_prologue,
	ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
	expand_setmem_epilogue_via_loop, promote_duplicated_reg,
	ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
	Formatting fixes.

From-SVN: r266391
parent a7433f32
2018-11-22 Jakub Jelinek <jakub@redhat.com> 2018-11-22 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.c (ix86_option_override_internal,
ix86_can_inline_p, classify_argument, construct_container,
ix86_expand_prologue, ix86_expand_split_stack_prologue,
ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
expand_setmem_epilogue_via_loop, promote_duplicated_reg,
ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
Formatting fixes.
* config/i386/i386.c (ix86_option_override_internal): For * config/i386/i386.c (ix86_option_override_internal): For
stack_protector_guard related options, use opts_set->x_ instead stack_protector_guard related options, use opts_set->x_ instead
of global_options_set. and prefix options with opts->x_ . Move of global_options_set. and prefix options with opts->x_ . Move
...@@ -4658,8 +4658,8 @@ ix86_option_override_internal (bool main_args_p, ...@@ -4658,8 +4658,8 @@ ix86_option_override_internal (bool main_args_p,
= build_target_option_node (opts); = build_target_option_node (opts);
if (opts->x_flag_cf_protection != CF_NONE) if (opts->x_flag_cf_protection != CF_NONE)
opts->x_flag_cf_protection = opts->x_flag_cf_protection
(cf_protection_level) (opts->x_flag_cf_protection | CF_SET); = (cf_protection_level) (opts->x_flag_cf_protection | CF_SET);
if (ix86_tune_features [X86_TUNE_AVOID_128FMA_CHAINS]) if (ix86_tune_features [X86_TUNE_AVOID_128FMA_CHAINS])
maybe_set_param_value (PARAM_AVOID_FMA_MAX_BITS, 128, maybe_set_param_value (PARAM_AVOID_FMA_MAX_BITS, 128,
...@@ -5475,8 +5475,8 @@ ix86_can_inline_p (tree caller, tree callee) ...@@ -5475,8 +5475,8 @@ ix86_can_inline_p (tree caller, tree callee)
struct cl_target_option *caller_opts = TREE_TARGET_OPTION (caller_tree); struct cl_target_option *caller_opts = TREE_TARGET_OPTION (caller_tree);
struct cl_target_option *callee_opts = TREE_TARGET_OPTION (callee_tree); struct cl_target_option *callee_opts = TREE_TARGET_OPTION (callee_tree);
bool ret = false; bool ret = false;
bool always_inline = bool always_inline
(DECL_DISREGARD_INLINE_LIMITS (callee) = (DECL_DISREGARD_INLINE_LIMITS (callee)
&& lookup_attribute ("always_inline", && lookup_attribute ("always_inline",
DECL_ATTRIBUTES (callee))); DECL_ATTRIBUTES (callee)));
...@@ -7375,8 +7375,8 @@ static int ...@@ -7375,8 +7375,8 @@ static int
classify_argument (machine_mode mode, const_tree type, classify_argument (machine_mode mode, const_tree type,
enum x86_64_reg_class classes[MAX_CLASSES], int bit_offset) enum x86_64_reg_class classes[MAX_CLASSES], int bit_offset)
{ {
HOST_WIDE_INT bytes = HOST_WIDE_INT bytes
(mode == BLKmode) ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode); = mode == BLKmode ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode);
int words = CEIL (bytes + (bit_offset % 64) / 8, UNITS_PER_WORD); int words = CEIL (bytes + (bit_offset % 64) / 8, UNITS_PER_WORD);
/* Variable sized entities are always passed/returned in memory. */ /* Variable sized entities are always passed/returned in memory. */
...@@ -7432,9 +7432,8 @@ classify_argument (machine_mode mode, const_tree type, ...@@ -7432,9 +7432,8 @@ classify_argument (machine_mode mode, const_tree type,
i < ((int_bit_position (field) + (bit_offset % 64)) i < ((int_bit_position (field) + (bit_offset % 64))
+ tree_to_shwi (DECL_SIZE (field)) + tree_to_shwi (DECL_SIZE (field))
+ 63) / 8 / 8; i++) + 63) / 8 / 8; i++)
classes[i] = classes[i]
merge_classes (X86_64_INTEGER_CLASS, = merge_classes (X86_64_INTEGER_CLASS, classes[i]);
classes[i]);
} }
else else
{ {
...@@ -7471,8 +7470,8 @@ classify_argument (machine_mode mode, const_tree type, ...@@ -7471,8 +7470,8 @@ classify_argument (machine_mode mode, const_tree type,
pos = (int_bit_position (field) pos = (int_bit_position (field)
+ (bit_offset % 64)) / 8 / 8; + (bit_offset % 64)) / 8 / 8;
for (i = 0; i < num && (i + pos) < words; i++) for (i = 0; i < num && (i + pos) < words; i++)
classes[i + pos] = classes[i + pos]
merge_classes (subclasses[i], classes[i + pos]); = merge_classes (subclasses[i], classes[i + pos]);
} }
} }
} }
...@@ -7827,8 +7826,8 @@ construct_container (machine_mode mode, machine_mode orig_mode, ...@@ -7827,8 +7826,8 @@ construct_container (machine_mode mode, machine_mode orig_mode,
static bool issued_x87_ret_error; static bool issued_x87_ret_error;
machine_mode tmpmode; machine_mode tmpmode;
int bytes = int bytes
(mode == BLKmode) ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode); = mode == BLKmode ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode);
enum x86_64_reg_class regclass[MAX_CLASSES]; enum x86_64_reg_class regclass[MAX_CLASSES];
int n; int n;
int i; int i;
...@@ -13369,8 +13368,8 @@ ix86_expand_prologue (void) ...@@ -13369,8 +13368,8 @@ ix86_expand_prologue (void)
&& frame.stack_pointer_offset > SEH_MAX_FRAME_SIZE && frame.stack_pointer_offset > SEH_MAX_FRAME_SIZE
&& !sse_registers_saved) && !sse_registers_saved)
{ {
HOST_WIDE_INT sse_size = HOST_WIDE_INT sse_size
frame.sse_reg_save_offset - frame.reg_save_offset; = frame.sse_reg_save_offset - frame.reg_save_offset;
gcc_assert (int_registers_saved); gcc_assert (int_registers_saved);
...@@ -14651,8 +14650,8 @@ ix86_expand_split_stack_prologue (void) ...@@ -14651,8 +14650,8 @@ ix86_expand_split_stack_prologue (void)
if (split_stack_fn_large == NULL_RTX) if (split_stack_fn_large == NULL_RTX)
{ {
split_stack_fn_large = split_stack_fn_large
gen_rtx_SYMBOL_REF (Pmode, "__morestack_large_model"); = gen_rtx_SYMBOL_REF (Pmode, "__morestack_large_model");
SYMBOL_REF_FLAGS (split_stack_fn_large) |= SYMBOL_FLAG_LOCAL; SYMBOL_REF_FLAGS (split_stack_fn_large) |= SYMBOL_FLAG_LOCAL;
} }
if (ix86_cmodel == CM_LARGE_PIC) if (ix86_cmodel == CM_LARGE_PIC)
...@@ -22700,8 +22699,8 @@ ix86_expand_setcc (rtx dest, enum rtx_code code, rtx op0, rtx op1) ...@@ -22700,8 +22699,8 @@ ix86_expand_setcc (rtx dest, enum rtx_code code, rtx op0, rtx op1)
static bool static bool
ix86_expand_carry_flag_compare (enum rtx_code code, rtx op0, rtx op1, rtx *pop) ix86_expand_carry_flag_compare (enum rtx_code code, rtx op0, rtx op1, rtx *pop)
{ {
machine_mode mode = machine_mode mode
GET_MODE (op0) != VOIDmode ? GET_MODE (op0) : GET_MODE (op1); = GET_MODE (op0) != VOIDmode ? GET_MODE (op0) : GET_MODE (op1);
/* Do not handle double-mode compares that go through special path. */ /* Do not handle double-mode compares that go through special path. */
if (mode == (TARGET_64BIT ? TImode : DImode)) if (mode == (TARGET_64BIT ? TImode : DImode))
...@@ -25839,10 +25838,10 @@ expand_set_or_movmem_via_loop (rtx destmem, rtx srcmem, ...@@ -25839,10 +25838,10 @@ expand_set_or_movmem_via_loop (rtx destmem, rtx srcmem,
{ {
if (i) if (i)
{ {
destmem = destmem = adjust_address (copy_rtx (destmem), mode,
adjust_address (copy_rtx (destmem), mode, GET_MODE_SIZE (mode)); GET_MODE_SIZE (mode));
srcmem = srcmem = adjust_address (copy_rtx (srcmem), mode,
adjust_address (copy_rtx (srcmem), mode, GET_MODE_SIZE (mode)); GET_MODE_SIZE (mode));
} }
emit_move_insn (destmem, srcmem); emit_move_insn (destmem, srcmem);
} }
...@@ -25855,19 +25854,15 @@ expand_set_or_movmem_via_loop (rtx destmem, rtx srcmem, ...@@ -25855,19 +25854,15 @@ expand_set_or_movmem_via_loop (rtx destmem, rtx srcmem,
{ {
tmpreg[i] = gen_reg_rtx (mode); tmpreg[i] = gen_reg_rtx (mode);
if (i) if (i)
{ srcmem = adjust_address (copy_rtx (srcmem), mode,
srcmem = GET_MODE_SIZE (mode));
adjust_address (copy_rtx (srcmem), mode, GET_MODE_SIZE (mode));
}
emit_move_insn (tmpreg[i], srcmem); emit_move_insn (tmpreg[i], srcmem);
} }
for (i = 0; i < unroll; i++) for (i = 0; i < unroll; i++)
{ {
if (i) if (i)
{ destmem = adjust_address (copy_rtx (destmem), mode,
destmem = GET_MODE_SIZE (mode));
adjust_address (copy_rtx (destmem), mode, GET_MODE_SIZE (mode));
}
emit_move_insn (destmem, tmpreg[i]); emit_move_insn (destmem, tmpreg[i]);
} }
} }
...@@ -25876,8 +25871,8 @@ expand_set_or_movmem_via_loop (rtx destmem, rtx srcmem, ...@@ -25876,8 +25871,8 @@ expand_set_or_movmem_via_loop (rtx destmem, rtx srcmem,
for (i = 0; i < unroll; i++) for (i = 0; i < unroll; i++)
{ {
if (i) if (i)
destmem = destmem = adjust_address (copy_rtx (destmem), mode,
adjust_address (copy_rtx (destmem), mode, GET_MODE_SIZE (mode)); GET_MODE_SIZE (mode));
emit_move_insn (destmem, value); emit_move_insn (destmem, value);
} }
...@@ -25896,7 +25891,8 @@ expand_set_or_movmem_via_loop (rtx destmem, rtx srcmem, ...@@ -25896,7 +25891,8 @@ expand_set_or_movmem_via_loop (rtx destmem, rtx srcmem,
else if (expected_size > REG_BR_PROB_BASE) else if (expected_size > REG_BR_PROB_BASE)
predict_jump (REG_BR_PROB_BASE - 1); predict_jump (REG_BR_PROB_BASE - 1);
else else
predict_jump (REG_BR_PROB_BASE - (REG_BR_PROB_BASE + expected_size / 2) / expected_size); predict_jump (REG_BR_PROB_BASE - (REG_BR_PROB_BASE + expected_size / 2)
/ expected_size);
} }
else else
predict_jump (REG_BR_PROB_BASE * 80 / 100); predict_jump (REG_BR_PROB_BASE * 80 / 100);
...@@ -26239,8 +26235,7 @@ static void ...@@ -26239,8 +26235,7 @@ static void
expand_setmem_epilogue_via_loop (rtx destmem, rtx destptr, rtx value, expand_setmem_epilogue_via_loop (rtx destmem, rtx destptr, rtx value,
rtx count, int max_size) rtx count, int max_size)
{ {
count = count = expand_simple_binop (counter_mode (count), AND, count,
expand_simple_binop (counter_mode (count), AND, count,
GEN_INT (max_size - 1), count, 1, OPTAB_DIRECT); GEN_INT (max_size - 1), count, 1, OPTAB_DIRECT);
expand_set_or_movmem_via_loop (destmem, NULL, destptr, NULL, expand_set_or_movmem_via_loop (destmem, NULL, destptr, NULL,
gen_lowpart (QImode, value), count, QImode, gen_lowpart (QImode, value), count, QImode,
...@@ -27051,8 +27046,8 @@ promote_duplicated_reg (machine_mode mode, rtx val) ...@@ -27051,8 +27046,8 @@ promote_duplicated_reg (machine_mode mode, rtx val)
{ {
tmp = expand_simple_binop (mode, ASHIFT, reg, GEN_INT (8), tmp = expand_simple_binop (mode, ASHIFT, reg, GEN_INT (8),
NULL, 1, OPTAB_DIRECT); NULL, 1, OPTAB_DIRECT);
reg = reg = expand_simple_binop (mode, IOR, reg, tmp, reg, 1,
expand_simple_binop (mode, IOR, reg, tmp, reg, 1, OPTAB_DIRECT); OPTAB_DIRECT);
} }
tmp = expand_simple_binop (mode, ASHIFT, reg, GEN_INT (16), tmp = expand_simple_binop (mode, ASHIFT, reg, GEN_INT (16),
NULL, 1, OPTAB_DIRECT); NULL, 1, OPTAB_DIRECT);
...@@ -27586,8 +27581,7 @@ ix86_expand_set_or_movmem (rtx dst, rtx src, rtx count_exp, rtx val_exp, ...@@ -27586,8 +27581,7 @@ ix86_expand_set_or_movmem (rtx dst, rtx src, rtx count_exp, rtx val_exp,
if (size_needed < epilogue_size_needed) if (size_needed < epilogue_size_needed)
{ {
tmp = tmp = expand_simple_binop (counter_mode (count_exp), AND, count_exp,
expand_simple_binop (counter_mode (count_exp), AND, count_exp,
GEN_INT (size_needed - 1), count_exp, 1, GEN_INT (size_needed - 1), count_exp, 1,
OPTAB_DIRECT); OPTAB_DIRECT);
if (tmp != count_exp) if (tmp != count_exp)
...@@ -33378,23 +33372,22 @@ ix86_init_builtins_va_builtins_abi (void) ...@@ -33378,23 +33372,22 @@ ix86_init_builtins_va_builtins_abi (void)
fnattr_ms = build_tree_list (get_identifier ("ms_abi"), NULL_TREE); fnattr_ms = build_tree_list (get_identifier ("ms_abi"), NULL_TREE);
fnattr_sysv = build_tree_list (get_identifier ("sysv_abi"), NULL_TREE); fnattr_sysv = build_tree_list (get_identifier ("sysv_abi"), NULL_TREE);
ms_va_ref = build_reference_type (ms_va_list_type_node); ms_va_ref = build_reference_type (ms_va_list_type_node);
sysv_va_ref = sysv_va_ref = build_pointer_type (TREE_TYPE (sysv_va_list_type_node));
build_pointer_type (TREE_TYPE (sysv_va_list_type_node));
fnvoid_va_end_ms = build_function_type_list (void_type_node, ms_va_ref,
fnvoid_va_end_ms =
build_function_type_list (void_type_node, ms_va_ref, NULL_TREE);
fnvoid_va_start_ms =
build_varargs_function_type_list (void_type_node, ms_va_ref, NULL_TREE);
fnvoid_va_end_sysv =
build_function_type_list (void_type_node, sysv_va_ref, NULL_TREE);
fnvoid_va_start_sysv =
build_varargs_function_type_list (void_type_node, sysv_va_ref,
NULL_TREE); NULL_TREE);
fnvoid_va_copy_ms = fnvoid_va_start_ms
build_function_type_list (void_type_node, ms_va_ref, ms_va_list_type_node, = build_varargs_function_type_list (void_type_node, ms_va_ref, NULL_TREE);
fnvoid_va_end_sysv
= build_function_type_list (void_type_node, sysv_va_ref, NULL_TREE);
fnvoid_va_start_sysv
= build_varargs_function_type_list (void_type_node, sysv_va_ref,
NULL_TREE); NULL_TREE);
fnvoid_va_copy_sysv = fnvoid_va_copy_ms
build_function_type_list (void_type_node, sysv_va_ref, = build_function_type_list (void_type_node, ms_va_ref,
ms_va_list_type_node, NULL_TREE);
fnvoid_va_copy_sysv
= build_function_type_list (void_type_node, sysv_va_ref,
sysv_va_ref, NULL_TREE); sysv_va_ref, NULL_TREE);
add_builtin_function ("__builtin_ms_va_start", fnvoid_va_start_ms, add_builtin_function ("__builtin_ms_va_start", fnvoid_va_start_ms,
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