Commit 3aa775d6 by Walter Lee Committed by Walter Lee

Fix some typos and coding style violations.

	* confg/tilegx/tilegx.md: Fix code style.
	(*zero_extendsidi_truncdisi): Fix typo.
	* config/tilegx/tilegx.c: Fix code style.
	(tilegx_function_profiler): Fix typo.

From-SVN: r190739
parent a433d31f
2012-08-28 Walter Lee <walt@tilera.com> 2012-08-28 Walter Lee <walt@tilera.com>
* confg/tilegx/tilegx.md: Fix code style.
(*zero_extendsidi_truncdisi): Fix typo.
* config/tilegx/tilegx.c: Fix code style.
(tilegx_function_profiler): Fix typo.
2012-08-28 Walter Lee <walt@tilera.com>
* doc/invoke.texi: Document -mcmodel=small, -mcmodel=large. * doc/invoke.texi: Document -mcmodel=small, -mcmodel=large.
* config/tilegx/tilegx.h: Include config/tilegx/tilegx-opts.h. * config/tilegx/tilegx.h: Include config/tilegx/tilegx-opts.h.
......
...@@ -168,7 +168,7 @@ tilegx_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED) ...@@ -168,7 +168,7 @@ tilegx_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED)
} }
/* TARGET_MODE_REP_EXTENDED. */ /* Implement TARGET_MODE_REP_EXTENDED. */
static int static int
tilegx_mode_rep_extended (enum machine_mode mode, enum machine_mode mode_rep) tilegx_mode_rep_extended (enum machine_mode mode, enum machine_mode mode_rep)
{ {
...@@ -430,7 +430,7 @@ tilegx_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, ...@@ -430,7 +430,7 @@ tilegx_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
addr = create_tmp_var (ptr_type_node, "va_arg"); addr = create_tmp_var (ptr_type_node, "va_arg");
/* if an object is dynamically sized, a pointer to it is passed /* If an object is dynamically sized, a pointer to it is passed
instead of the object itself. */ instead of the object itself. */
pass_by_reference_p = pass_by_reference (NULL, TYPE_MODE (type), type, pass_by_reference_p = pass_by_reference (NULL, TYPE_MODE (type), type,
false); false);
...@@ -482,11 +482,11 @@ tilegx_rtx_costs (rtx x, int code, int outer_code, int opno, int *total, ...@@ -482,11 +482,11 @@ tilegx_rtx_costs (rtx x, int code, int outer_code, int opno, int *total,
{ {
case CONST_INT: case CONST_INT:
/* If this is an 8-bit constant, return zero since it can be /* If this is an 8-bit constant, return zero since it can be
used nearly anywhere with no cost. If it is a valid operand used nearly anywhere with no cost. If it is a valid operand
for an ADD or AND, likewise return 0 if we know it will be for an ADD or AND, likewise return 0 if we know it will be
used in that context. Otherwise, return 2 since it might be used in that context. Otherwise, return 2 since it might be
used there later. All other constants take at least two used there later. All other constants take at least two
insns. */ insns. */
if (satisfies_constraint_I (x)) if (satisfies_constraint_I (x))
{ {
*total = 0; *total = 0;
...@@ -531,8 +531,8 @@ tilegx_rtx_costs (rtx x, int code, int outer_code, int opno, int *total, ...@@ -531,8 +531,8 @@ tilegx_rtx_costs (rtx x, int code, int outer_code, int opno, int *total,
case MEM: case MEM:
/* If outer-code was a sign or zero extension, a cost of /* If outer-code was a sign or zero extension, a cost of
COSTS_N_INSNS (1) was already added in, so account for COSTS_N_INSNS (1) was already added in, so account for
that. */ that. */
if (outer_code == ZERO_EXTEND || outer_code == SIGN_EXTEND) if (outer_code == ZERO_EXTEND || outer_code == SIGN_EXTEND)
*total = COSTS_N_INSNS (1); *total = COSTS_N_INSNS (1);
else else
...@@ -660,7 +660,7 @@ tilegx_rtx_costs (rtx x, int code, int outer_code, int opno, int *total, ...@@ -660,7 +660,7 @@ tilegx_rtx_costs (rtx x, int code, int outer_code, int opno, int *total,
static rtx static rtx
create_temp_reg_if_possible (enum machine_mode mode, rtx default_reg) create_temp_reg_if_possible (enum machine_mode mode, rtx default_reg)
{ {
return can_create_pseudo_p ()? gen_reg_rtx (mode) : default_reg; return can_create_pseudo_p () ? gen_reg_rtx (mode) : default_reg;
} }
...@@ -1092,7 +1092,7 @@ tilegx_compute_pcrel_address (rtx result, rtx addr) ...@@ -1092,7 +1092,7 @@ tilegx_compute_pcrel_address (rtx result, rtx addr)
/* Returns a register that points to the plt entry of ADDR, a symbolic /* Returns a register that points to the plt entry of ADDR, a symbolic
address, by computing its address relative to address, by computing its address relative to
tilegx_text_label_symbol. */ tilegx_text_label_symbol. */
void void
tilegx_compute_pcrel_plt_address (rtx result, rtx addr) tilegx_compute_pcrel_plt_address (rtx result, rtx addr)
{ {
...@@ -1264,13 +1264,13 @@ tilegx_legitimize_pic_address (rtx orig, ...@@ -1264,13 +1264,13 @@ tilegx_legitimize_pic_address (rtx orig,
} }
/* If not during reload, allocate another temp reg here for /* If not during reload, allocate another temp reg here for
loading in the address, so that these instructions can be loading in the address, so that these instructions can be
optimized properly. */ optimized properly. */
temp_reg = create_temp_reg_if_possible (Pmode, reg); temp_reg = create_temp_reg_if_possible (Pmode, reg);
tilegx_compute_pcrel_address (temp_reg, orig); tilegx_compute_pcrel_address (temp_reg, orig);
/* Note: this is conservative. We use the text_label but we /* Note: this is conservative. We use the text_label but we
don't use the pic_offset_table. */ don't use the pic_offset_table. */
crtl->uses_pic_offset_table = 1; crtl->uses_pic_offset_table = 1;
address = temp_reg; address = temp_reg;
...@@ -1413,8 +1413,8 @@ tilegx_simd_int (rtx num, enum machine_mode mode) ...@@ -1413,8 +1413,8 @@ tilegx_simd_int (rtx num, enum machine_mode mode)
/* Returns true iff VAL can be moved into a register in one /* Returns true iff VAL can be moved into a register in one
instruction. And if it can, it emits the code to move the instruction. And if it can, it emits the code to move the constant
constant into DEST_REG. into DEST_REG.
If THREE_WIDE_ONLY is true, this insists on an instruction that If THREE_WIDE_ONLY is true, this insists on an instruction that
works in a bundle containing three instructions. */ works in a bundle containing three instructions. */
...@@ -1474,7 +1474,7 @@ tilegx_bitfield_operand_p (HOST_WIDE_INT n, int *first_bit, int *last_bit) ...@@ -1474,7 +1474,7 @@ tilegx_bitfield_operand_p (HOST_WIDE_INT n, int *first_bit, int *last_bit)
continue; continue;
/* See if x is a power of two minus one, i.e. only consecutive 1 /* See if x is a power of two minus one, i.e. only consecutive 1
bits starting from bit 0. */ bits starting from bit 0. */
if ((x & (x + 1)) == 0) if ((x & (x + 1)) == 0)
{ {
if (first_bit != NULL) if (first_bit != NULL)
...@@ -1558,8 +1558,8 @@ expand_set_cint64 (rtx dest_reg, rtx src_val) ...@@ -1558,8 +1558,8 @@ expand_set_cint64 (rtx dest_reg, rtx src_val)
if (expand_set_cint64_one_inst (temp, r, three_wide_only)) if (expand_set_cint64_one_inst (temp, r, three_wide_only))
{ {
/* 0xFFFFFFFFFFA5FFFF becomes: /* 0xFFFFFFFFFFA5FFFF becomes:
movei temp, 0xFFFFFFFFFFFFFFA5 movei temp, 0xFFFFFFFFFFFFFFA5
rotli dest, temp, 16 */ rotli dest, temp, 16 */
emit_move_insn (dest_reg, emit_move_insn (dest_reg,
gen_rtx_ROTATE (DImode, temp, GEN_INT (count))); gen_rtx_ROTATE (DImode, temp, GEN_INT (count)));
return; return;
...@@ -1608,11 +1608,11 @@ expand_set_cint64 (rtx dest_reg, rtx src_val) ...@@ -1608,11 +1608,11 @@ expand_set_cint64 (rtx dest_reg, rtx src_val)
unsigned HOST_WIDE_INT leftover; unsigned HOST_WIDE_INT leftover;
/* Recursively create the constant above the lowest 16 zero /* Recursively create the constant above the lowest 16 zero
bits. */ bits. */
expand_set_cint64 (temp, GEN_INT (val >> shift)); expand_set_cint64 (temp, GEN_INT (val >> shift));
/* See if we can easily insert the remaining bits, or if we need /* See if we can easily insert the remaining bits, or if we need
to fall through to the more general case. */ to fall through to the more general case. */
leftover = val - ((val >> shift) << shift); leftover = val - ((val >> shift) << shift);
if (leftover == 0) if (leftover == 0)
{ {
...@@ -1649,8 +1649,8 @@ expand_set_cint64 (rtx dest_reg, rtx src_val) ...@@ -1649,8 +1649,8 @@ expand_set_cint64 (rtx dest_reg, rtx src_val)
else else
{ {
/* Set as many high 16-bit blocks as we can with a single /* Set as many high 16-bit blocks as we can with a single
instruction. We'll insert the remaining 16-bit blocks instruction. We'll insert the remaining 16-bit blocks
below. */ below. */
for (shift = 16;; shift += 16) for (shift = 16;; shift += 16)
{ {
gcc_assert (shift < 64); gcc_assert (shift < 64);
...@@ -1693,10 +1693,10 @@ tilegx_expand_set_const64 (rtx op0, rtx op1) ...@@ -1693,10 +1693,10 @@ tilegx_expand_set_const64 (rtx op0, rtx op1)
if (CONST_INT_P (op1)) if (CONST_INT_P (op1))
{ {
/* TODO: I don't know if we want to split large constants /* TODO: I don't know if we want to split large constants
now, or wait until later (with a define_split). now, or wait until later (with a define_split).
Does splitting early help CSE? Does it harm other Does splitting early help CSE? Does it harm other
optimizations that might fold loads? */ optimizations that might fold loads? */
expand_set_cint64 (op0, op1); expand_set_cint64 (op0, op1);
} }
else else
...@@ -1794,7 +1794,7 @@ tilegx_expand_unaligned_load (rtx dest_reg, rtx mem, HOST_WIDE_INT bitsize, ...@@ -1794,7 +1794,7 @@ tilegx_expand_unaligned_load (rtx dest_reg, rtx mem, HOST_WIDE_INT bitsize,
if (bitsize == 2 * BITS_PER_UNIT && (bit_offset % BITS_PER_UNIT) == 0) if (bitsize == 2 * BITS_PER_UNIT && (bit_offset % BITS_PER_UNIT) == 0)
{ {
/* When just loading a two byte value, we can load the two bytes /* When just loading a two byte value, we can load the two bytes
individually and combine them efficiently. */ individually and combine them efficiently. */
mem_lo = adjust_address (mem, QImode, byte_offset); mem_lo = adjust_address (mem, QImode, byte_offset);
mem_hi = adjust_address (mem, QImode, byte_offset + 1); mem_hi = adjust_address (mem, QImode, byte_offset + 1);
...@@ -2131,6 +2131,7 @@ tilegx_expand_const_muldi (rtx op0, rtx op1, long long multiplier) ...@@ -2131,6 +2131,7 @@ tilegx_expand_const_muldi (rtx op0, rtx op1, long long multiplier)
return false; return false;
} }
/* Expand the muldi pattern. */ /* Expand the muldi pattern. */
bool bool
tilegx_expand_muldi (rtx op0, rtx op1, rtx op2) tilegx_expand_muldi (rtx op0, rtx op1, rtx op2)
...@@ -2305,7 +2306,7 @@ tilegx_emit_setcc_internal (rtx res, enum rtx_code code, rtx op0, rtx op1, ...@@ -2305,7 +2306,7 @@ tilegx_emit_setcc_internal (rtx res, enum rtx_code code, rtx op0, rtx op1,
case GEU: case GEU:
case GTU: case GTU:
/* We do not have these compares, so we reverse the /* We do not have these compares, so we reverse the
operands. */ operands. */
swap = true; swap = true;
break; break;
...@@ -2400,7 +2401,7 @@ tilegx_emit_cc_test (enum rtx_code code, rtx op0, rtx op1, ...@@ -2400,7 +2401,7 @@ tilegx_emit_cc_test (enum rtx_code code, rtx op0, rtx op1,
case GEU: case GEU:
case GTU: case GTU:
/* These must be reversed (except NE, but let's /* These must be reversed (except NE, but let's
canonicalize). */ canonicalize). */
code = reverse_condition (code); code = reverse_condition (code);
branch_code = EQ; branch_code = EQ;
break; break;
...@@ -2430,7 +2431,7 @@ tilegx_emit_cc_test (enum rtx_code code, rtx op0, rtx op1, ...@@ -2430,7 +2431,7 @@ tilegx_emit_cc_test (enum rtx_code code, rtx op0, rtx op1,
|| (REG_P (op0) && REG_POINTER (op0)))) || (REG_P (op0) && REG_POINTER (op0))))
{ {
/* TODO: Use a SIMD add immediate to hit zero for tiled /* TODO: Use a SIMD add immediate to hit zero for tiled
constants in a single instruction. */ constants in a single instruction. */
if (GET_MODE (op0) != DImode) if (GET_MODE (op0) != DImode)
{ {
/* Convert to DImode so we can use addli. Note that /* Convert to DImode so we can use addli. Note that
...@@ -3454,47 +3455,47 @@ tilegx_expand_builtin (tree exp, ...@@ -3454,47 +3455,47 @@ tilegx_expand_builtin (tree exp,
opnum = nonvoid; opnum = nonvoid;
FOR_EACH_CALL_EXPR_ARG (arg, iter, exp) FOR_EACH_CALL_EXPR_ARG (arg, iter, exp)
{ {
const struct insn_operand_data *insn_op; const struct insn_operand_data *insn_op;
if (arg == error_mark_node) if (arg == error_mark_node)
return NULL_RTX; return NULL_RTX;
if (opnum > MAX_BUILTIN_ARGS) if (opnum > MAX_BUILTIN_ARGS)
return NULL_RTX; return NULL_RTX;
insn_op = &insn_data[icode].operand[opnum]; insn_op = &insn_data[icode].operand[opnum];
op[opnum] = expand_expr (arg, NULL_RTX, insn_op->mode, EXPAND_NORMAL); op[opnum] = expand_expr (arg, NULL_RTX, insn_op->mode, EXPAND_NORMAL);
if (!(*insn_op->predicate) (op[opnum], insn_op->mode)) if (!(*insn_op->predicate) (op[opnum], insn_op->mode))
{ {
enum machine_mode opmode = insn_op->mode; enum machine_mode opmode = insn_op->mode;
/* pointer_operand and pmode_register_operand operands do /* pointer_operand and pmode_register_operand operands do
not specify a mode, so use the operand's mode instead not specify a mode, so use the operand's mode instead
(which should always be right by the time we get here, (which should always be right by the time we get here,
except for constants, which are VOIDmode). */ except for constants, which are VOIDmode). */
if (opmode == VOIDmode) if (opmode == VOIDmode)
{ {
enum machine_mode m = GET_MODE (op[opnum]); enum machine_mode m = GET_MODE (op[opnum]);
gcc_assert (m == Pmode || m == VOIDmode); gcc_assert (m == Pmode || m == VOIDmode);
opmode = Pmode; opmode = Pmode;
} }
op[opnum] = copy_to_mode_reg (opmode, op[opnum]); op[opnum] = copy_to_mode_reg (opmode, op[opnum]);
} }
if (!(*insn_op->predicate) (op[opnum], insn_op->mode)) if (!(*insn_op->predicate) (op[opnum], insn_op->mode))
{ {
/* We still failed to meet the predicate even after moving /* We still failed to meet the predicate even after moving
into a register. Assume we needed an immediate. */ into a register. Assume we needed an immediate. */
error_at (EXPR_LOCATION (exp), error_at (EXPR_LOCATION (exp),
"operand must be an immediate of the right size"); "operand must be an immediate of the right size");
return const0_rtx; return const0_rtx;
} }
opnum++; opnum++;
} }
if (nonvoid) if (nonvoid)
{ {
...@@ -3928,7 +3929,7 @@ tilegx_expand_prologue (void) ...@@ -3928,7 +3929,7 @@ tilegx_expand_prologue (void)
REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = STACK_BOUNDARY; REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = STACK_BOUNDARY;
/* fp holds a copy of the incoming sp, in case we need to store /* fp holds a copy of the incoming sp, in case we need to store
it. */ it. */
sp_copy_regno = HARD_FRAME_POINTER_REGNUM; sp_copy_regno = HARD_FRAME_POINTER_REGNUM;
} }
else if (!tilegx_current_function_is_leaf ()) else if (!tilegx_current_function_is_leaf ())
...@@ -4123,7 +4124,7 @@ tilegx_expand_epilogue (bool sibcall_p) ...@@ -4123,7 +4124,7 @@ tilegx_expand_epilogue (bool sibcall_p)
if (frame_pointer_needed) if (frame_pointer_needed)
{ {
/* Restore the old stack pointer by copying from the frame /* Restore the old stack pointer by copying from the frame
pointer. */ pointer. */
if (TARGET_32BIT) if (TARGET_32BIT)
{ {
insn = emit_insn (gen_sp_restore_32bit (stack_pointer_rtx, insn = emit_insn (gen_sp_restore_32bit (stack_pointer_rtx,
...@@ -4320,6 +4321,7 @@ get_jump_target (rtx branch) ...@@ -4320,6 +4321,7 @@ get_jump_target (rtx branch)
return 0; return 0;
} }
/* Implement TARGET_SCHED_ADJUST_COST. */ /* Implement TARGET_SCHED_ADJUST_COST. */
static int static int
tilegx_sched_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost) tilegx_sched_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
...@@ -4365,37 +4367,37 @@ tilegx_gen_bundles (void) ...@@ -4365,37 +4367,37 @@ tilegx_gen_bundles (void)
{ {
basic_block bb; basic_block bb;
FOR_EACH_BB (bb) FOR_EACH_BB (bb)
{ {
rtx insn, next; rtx insn, next;
rtx end = NEXT_INSN (BB_END (bb)); rtx end = NEXT_INSN (BB_END (bb));
for (insn = next_insn_to_bundle (BB_HEAD (bb), end); insn; insn = next) for (insn = next_insn_to_bundle (BB_HEAD (bb), end); insn; insn = next)
{ {
next = next_insn_to_bundle (NEXT_INSN (insn), end); next = next_insn_to_bundle (NEXT_INSN (insn), end);
/* Never wrap {} around inline asm. */ /* Never wrap {} around inline asm. */
if (GET_CODE (PATTERN (insn)) != ASM_INPUT) if (GET_CODE (PATTERN (insn)) != ASM_INPUT)
{ {
if (next == NULL_RTX || GET_MODE (next) == TImode if (next == NULL_RTX || GET_MODE (next) == TImode
/* NOTE: The scheduler incorrectly believes a call /* NOTE: The scheduler incorrectly believes a call
insn can execute in the same cycle as the insn insn can execute in the same cycle as the insn
after the call. This is of course impossible. after the call. This is of course impossible.
Really we need to fix the scheduler somehow, so Really we need to fix the scheduler somehow, so
the code after the call gets scheduled the code after the call gets scheduled
optimally. */ optimally. */
|| CALL_P (insn)) || CALL_P (insn))
{ {
/* Mark current insn as the end of a bundle. */ /* Mark current insn as the end of a bundle. */
PUT_MODE (insn, QImode); PUT_MODE (insn, QImode);
} }
else else
{ {
/* Mark it as part of a bundle. */ /* Mark it as part of a bundle. */
PUT_MODE (insn, SImode); PUT_MODE (insn, SImode);
} }
} }
} }
} }
} }
...@@ -4960,7 +4962,7 @@ tilegx_print_operand (FILE *file, rtx x, int code) ...@@ -4960,7 +4962,7 @@ tilegx_print_operand (FILE *file, rtx x, int code)
switch (code) switch (code)
{ {
case 'c': case 'c':
/* Print the compare operator opcode for conditional moves. */ /* Print the compare operator opcode for conditional moves. */
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
case EQ: case EQ:
...@@ -4975,7 +4977,7 @@ tilegx_print_operand (FILE *file, rtx x, int code) ...@@ -4975,7 +4977,7 @@ tilegx_print_operand (FILE *file, rtx x, int code)
return; return;
case 'C': case 'C':
/* Print the compare operator opcode for conditional moves. */ /* Print the compare operator opcode for conditional moves. */
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
case EQ: case EQ:
...@@ -4991,7 +4993,7 @@ tilegx_print_operand (FILE *file, rtx x, int code) ...@@ -4991,7 +4993,7 @@ tilegx_print_operand (FILE *file, rtx x, int code)
case 'd': case 'd':
{ {
/* Print the compare operator opcode for conditional moves. */ /* Print the compare operator opcode for conditional moves. */
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
case EQ: case EQ:
...@@ -5008,7 +5010,7 @@ tilegx_print_operand (FILE *file, rtx x, int code) ...@@ -5008,7 +5010,7 @@ tilegx_print_operand (FILE *file, rtx x, int code)
case 'D': case 'D':
{ {
/* Print the compare operator opcode for conditional moves. */ /* Print the compare operator opcode for conditional moves. */
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
case EQ: case EQ:
...@@ -5270,7 +5272,7 @@ tilegx_print_operand (FILE *file, rtx x, int code) ...@@ -5270,7 +5272,7 @@ tilegx_print_operand (FILE *file, rtx x, int code)
case 'r': case 'r':
/* In this case we need a register. Use 'zero' if the operand /* In this case we need a register. Use 'zero' if the operand
is const0_rtx. */ is const0_rtx. */
if (x == const0_rtx if (x == const0_rtx
|| (GET_MODE (x) != VOIDmode && x == CONST0_RTX (GET_MODE (x)))) || (GET_MODE (x) != VOIDmode && x == CONST0_RTX (GET_MODE (x))))
{ {
...@@ -5357,7 +5359,7 @@ tilegx_final_prescan_insn (rtx insn) ...@@ -5357,7 +5359,7 @@ tilegx_final_prescan_insn (rtx insn)
} }
/* While emitting asm, are we currently inside '{' for a bundle? */ /* While emitting asm, are we currently inside '{' for a bundle? */
static bool tilegx_in_bundle = false; static bool tilegx_in_bundle = false;
/* Implement ASM_OUTPUT_OPCODE. Prepend/append curly braces as /* Implement ASM_OUTPUT_OPCODE. Prepend/append curly braces as
...@@ -5419,7 +5421,7 @@ tilegx_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED) ...@@ -5419,7 +5421,7 @@ tilegx_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED)
"\t{\n" "\t{\n"
"\tmove\tr10, lr\n" "\tmove\tr10, lr\n"
"\tjal\t%s\n" "\tjal\t%s\n"
"\t}\t\n", MCOUNT_NAME); "\t}\n", MCOUNT_NAME);
} }
tilegx_in_bundle = false; tilegx_in_bundle = false;
...@@ -5532,7 +5534,7 @@ tilegx_file_end (void) ...@@ -5532,7 +5534,7 @@ tilegx_file_end (void)
#undef TARGET_BUILTIN_DECL #undef TARGET_BUILTIN_DECL
#define TARGET_BUILTIN_DECL tilegx_builtin_decl #define TARGET_BUILTIN_DECL tilegx_builtin_decl
#undef TARGET_EXPAND_BUILTIN #undef TARGET_EXPAND_BUILTIN
#define TARGET_EXPAND_BUILTIN tilegx_expand_builtin #define TARGET_EXPAND_BUILTIN tilegx_expand_builtin
#undef TARGET_CONDITIONAL_REGISTER_USAGE #undef TARGET_CONDITIONAL_REGISTER_USAGE
......
...@@ -417,7 +417,7 @@ ...@@ -417,7 +417,7 @@
(ss_minus "") (ss_minus "")
(us_minus "") (us_minus "")
]) ])
;; <s> is the load/store extension suffix. ;; <s> is the load/store extension suffix.
(define_code_attr s [(zero_extend "u") (define_code_attr s [(zero_extend "u")
(sign_extend "s")]) (sign_extend "s")])
...@@ -825,11 +825,11 @@ ...@@ -825,11 +825,11 @@
bit_width = INTVAL (operands[2]); bit_width = INTVAL (operands[2]);
bit_offset = INTVAL (operands[3]); bit_offset = INTVAL (operands[3]);
/* Reject bitfields that can be done with a normal load */ /* Reject bitfields that can be done with a normal load. */
if (MEM_ALIGN (operands[1]) >= bit_offset + bit_width) if (MEM_ALIGN (operands[1]) >= bit_offset + bit_width)
FAIL; FAIL;
/* The value in memory cannot span more than 8 bytes. */ /* The value in memory cannot span more than 8 bytes. */
first_byte_offset = bit_offset / BITS_PER_UNIT; first_byte_offset = bit_offset / BITS_PER_UNIT;
last_byte_offset = (bit_offset + bit_width - 1) / BITS_PER_UNIT; last_byte_offset = (bit_offset + bit_width - 1) / BITS_PER_UNIT;
if (last_byte_offset - first_byte_offset > 7) if (last_byte_offset - first_byte_offset > 7)
...@@ -854,7 +854,6 @@ ...@@ -854,7 +854,6 @@
HOST_WIDE_INT bit_width = INTVAL (operands[2]); HOST_WIDE_INT bit_width = INTVAL (operands[2]);
HOST_WIDE_INT bit_offset = INTVAL (operands[3]); HOST_WIDE_INT bit_offset = INTVAL (operands[3]);
if (MEM_P (operands[1])) if (MEM_P (operands[1]))
{ {
HOST_WIDE_INT first_byte_offset, last_byte_offset; HOST_WIDE_INT first_byte_offset, last_byte_offset;
...@@ -862,11 +861,11 @@ ...@@ -862,11 +861,11 @@
if (GET_MODE (operands[1]) != QImode) if (GET_MODE (operands[1]) != QImode)
FAIL; FAIL;
/* Reject bitfields that can be done with a normal load */ /* Reject bitfields that can be done with a normal load. */
if (MEM_ALIGN (operands[1]) >= bit_offset + bit_width) if (MEM_ALIGN (operands[1]) >= bit_offset + bit_width)
FAIL; FAIL;
/* The value in memory cannot span more than 8 bytes. */ /* The value in memory cannot span more than 8 bytes. */
first_byte_offset = bit_offset / BITS_PER_UNIT; first_byte_offset = bit_offset / BITS_PER_UNIT;
last_byte_offset = (bit_offset + bit_width - 1) / BITS_PER_UNIT; last_byte_offset = (bit_offset + bit_width - 1) / BITS_PER_UNIT;
if (last_byte_offset - first_byte_offset > 7) if (last_byte_offset - first_byte_offset > 7)
...@@ -882,7 +881,7 @@ ...@@ -882,7 +881,7 @@
if (bit_offset == 0) if (bit_offset == 0)
{ {
/* Extracting the low bits is just a bitwise AND. */ /* Extracting the low bits is just a bitwise AND. */
HOST_WIDE_INT mask = ((HOST_WIDE_INT)1 << bit_width) - 1; HOST_WIDE_INT mask = ((HOST_WIDE_INT)1 << bit_width) - 1;
emit_insn (gen_anddi3 (operands[0], operands[1], GEN_INT (mask))); emit_insn (gen_anddi3 (operands[0], operands[1], GEN_INT (mask)));
DONE; DONE;
...@@ -902,7 +901,7 @@ ...@@ -902,7 +901,7 @@
[(set (match_operand:DI 0 "register_operand" "") [(set (match_operand:DI 0 "register_operand" "")
(const:DI (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] (const:DI (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")]
UNSPEC_HW2_LAST)))]) UNSPEC_HW2_LAST)))])
(define_expand "mov_address_step2" (define_expand "mov_address_step2"
[(set (match_operand:DI 0 "register_operand" "") [(set (match_operand:DI 0 "register_operand" "")
(unspec:DI (unspec:DI
...@@ -954,7 +953,7 @@ ...@@ -954,7 +953,7 @@
"%1 = . + 8\n\tlnk\t%0" "%1 = . + 8\n\tlnk\t%0"
[(set_attr "type" "Y1")]) [(set_attr "type" "Y1")])
;; First step of the 3-insn sequence to materialize a position ;; The next three patterns are used to to materialize a position
;; independent address by adding the difference of two labels to a ;; independent address by adding the difference of two labels to a
;; base label in the text segment, assuming that the difference fits ;; base label in the text segment, assuming that the difference fits
;; in 32 signed bits. ;; in 32 signed bits.
...@@ -966,10 +965,6 @@ ...@@ -966,10 +965,6 @@
UNSPEC_HW1_LAST_PCREL)))] UNSPEC_HW1_LAST_PCREL)))]
"flag_pic") "flag_pic")
;; Second step of the 3-insn sequence to materialize a position
;; independent address by adding the difference of two labels to a
;; base label in the text segment, assuming that the difference fits
;; in 32 signed bits.
(define_expand "mov_pcrel_step2<bitsuffix>" (define_expand "mov_pcrel_step2<bitsuffix>"
[(set (match_operand:I48MODE 0 "register_operand" "") [(set (match_operand:I48MODE 0 "register_operand" "")
(unspec:I48MODE (unspec:I48MODE
...@@ -980,11 +975,7 @@ ...@@ -980,11 +975,7 @@
UNSPEC_HW0_PCREL))] UNSPEC_HW0_PCREL))]
UNSPEC_INSN_ADDR_SHL16INSLI))] UNSPEC_INSN_ADDR_SHL16INSLI))]
"flag_pic") "flag_pic")
;; Third step of the 3-insn sequence to materialize a position
;; independent address by adding the difference of two labels to a base
;; label in the text segment, assuming that the difference fits in 32
;; signed bits.
(define_insn "mov_pcrel_step3<bitsuffix>" (define_insn "mov_pcrel_step3<bitsuffix>"
[(set (match_operand:I48MODE 0 "register_operand" "=r") [(set (match_operand:I48MODE 0 "register_operand" "=r")
(unspec:I48MODE [(match_operand:I48MODE 1 "reg_or_0_operand" "rO") (unspec:I48MODE [(match_operand:I48MODE 1 "reg_or_0_operand" "rO")
...@@ -1442,7 +1433,6 @@ ...@@ -1442,7 +1433,6 @@
DONE; DONE;
}) })
(define_expand "subdf3" (define_expand "subdf3"
[(set (match_operand:DF 0 "register_operand" "") [(set (match_operand:DF 0 "register_operand" "")
(minus:DF (match_operand:DF 1 "register_operand" "") (minus:DF (match_operand:DF 1 "register_operand" "")
...@@ -1815,7 +1805,6 @@ ...@@ -1815,7 +1805,6 @@
"ctz\t%0, %r1" "ctz\t%0, %r1"
[(set_attr "type" "Y0")]) [(set_attr "type" "Y0")])
(define_insn "popcount<mode>2" (define_insn "popcount<mode>2"
[(set (match_operand:I48MODE 0 "register_operand" "=r") [(set (match_operand:I48MODE 0 "register_operand" "=r")
(popcount:I48MODE (match_operand:DI 1 "reg_or_0_operand" "rO")))] (popcount:I48MODE (match_operand:DI 1 "reg_or_0_operand" "rO")))]
...@@ -2044,7 +2033,7 @@ ...@@ -2044,7 +2033,7 @@
(define_insn "*zero_extendsidi_truncdisi" (define_insn "*zero_extendsidi_truncdisi"
[(set (match_operand:DI 0 "register_operand" "=r") [(set (match_operand:DI 0 "register_operand" "=r")
(zero_extend:DI (zero_extend:DI
(truncate:SI (match_operand:DI 1 "reg_or_0_operand" "0"))))] (truncate:SI (match_operand:DI 1 "reg_or_0_operand" "rO"))))]
"" ""
"v4int_l\t%0, zero, %r1" "v4int_l\t%0, zero, %r1"
[(set_attr "type" "X01")]) [(set_attr "type" "X01")])
...@@ -2115,7 +2104,7 @@ ...@@ -2115,7 +2104,7 @@
shruxi\t%0, %r1, %2 shruxi\t%0, %r1, %2
shrux\t%0, %r1, %r2" shrux\t%0, %r1, %r2"
[(set_attr "type" "X01,X01")]) [(set_attr "type" "X01,X01")])
(define_insn "*lshrsi_truncdisi2" (define_insn "*lshrsi_truncdisi2"
[(set (match_operand:SI 0 "register_operand" "=r") [(set (match_operand:SI 0 "register_operand" "=r")
(lshiftrt:SI (lshiftrt:SI
...@@ -2320,7 +2309,8 @@ ...@@ -2320,7 +2309,8 @@
;; Loops ;; Loops
;; ;;
;; Define the subtract-one-and-jump insns so loop.c knows what to generate. ;; Define the subtract-one-and-jump insns so loop.c knows what to
;; generate.
(define_expand "doloop_end" (define_expand "doloop_end"
[(use (match_operand 0 "" "")) ;; loop pseudo [(use (match_operand 0 "" "")) ;; loop pseudo
(use (match_operand 1 "" "")) ;; iterations; zero if unknown (use (match_operand 1 "" "")) ;; iterations; zero if unknown
...@@ -2470,7 +2460,7 @@ ...@@ -2470,7 +2460,7 @@
tilegx_compute_pcrel_plt_address (addr, orig_addr); tilegx_compute_pcrel_plt_address (addr, orig_addr);
operands[1] = gen_rtx_MEM (DImode, addr); operands[1] = gen_rtx_MEM (DImode, addr);
} }
} }
}) })
(define_insn "*call_value_insn" (define_insn "*call_value_insn"
...@@ -2633,8 +2623,8 @@ ...@@ -2633,8 +2623,8 @@
[(set_attr "type" "*,*,X01")]) [(set_attr "type" "*,*,X01")])
;; Used for move sp, r52, to pop a stack frame. We need to make sure ;; Used for move sp, r52, to pop a stack frame. We need to make sure
;; that stack frame memory operations have been issued before we do this. ;; that stack frame memory operations have been issued before we do
;; TODO: see above TODO. ;; this. TODO: see above TODO.
(define_insn "sp_restore<bitsuffix>" (define_insn "sp_restore<bitsuffix>"
[(set (match_operand:I48MODE 0 "register_operand" "=r") [(set (match_operand:I48MODE 0 "register_operand" "=r")
(match_operand:I48MODE 1 "register_operand" "r")) (match_operand:I48MODE 1 "register_operand" "r"))
......
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