/* Subroutines for insn-output.c for Renesas H8/300.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Contributed by Steve Chamberlain (sac@cygnus.com),
Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
static int h8300_saveall_function_p (tree);
static int h8300_monitor_function_p (tree);
static int h8300_os_task_function_p (tree);
-static void h8300_emit_stack_adjustment (int, unsigned int);
-static int round_frame_size (int);
+static void h8300_emit_stack_adjustment (int, HOST_WIDE_INT);
+static HOST_WIDE_INT round_frame_size (HOST_WIDE_INT);
static unsigned int compute_saved_regs (void);
static void push (int);
static void pop (int);
"r4l", "r4h", "r5l", "r5h", "r6l", "r6h", "r7l", "r7h"
};
- if (!REG_P (x))
- abort ();
+ gcc_assert (REG_P (x));
return names_small[REGNO (x) * 2 + b];
}
&& ! TREE_THIS_VOLATILE (current_function_decl) \
&& (h8300_saveall_function_p (current_function_decl) \
/* Save any call saved register that was used. */ \
- || (regs_ever_live[regno] && !call_used_regs[regno]) \
+ || (df_regs_ever_live_p (regno) && !call_used_regs[regno]) \
/* Save the frame pointer if it was used. */ \
- || (regno == HARD_FRAME_POINTER_REGNUM && regs_ever_live[regno]) \
+ || (regno == HARD_FRAME_POINTER_REGNUM && df_regs_ever_live_p (regno)) \
/* Save any register used in an interrupt handler. */ \
|| (h8300_current_function_interrupt_function_p () \
- && regs_ever_live[regno]) \
+ && df_regs_ever_live_p (regno)) \
/* Save call clobbered registers in non-leaf interrupt \
handlers. */ \
|| (h8300_current_function_interrupt_function_p () \
SIZE to adjust the stack pointer. */
static void
-h8300_emit_stack_adjustment (int sign, unsigned int size)
+h8300_emit_stack_adjustment (int sign, HOST_WIDE_INT size)
{
/* If the frame size is 0, we don't have anything to do. */
if (size == 0)
/* Round up frame size SIZE. */
-static int
-round_frame_size (int size)
+static HOST_WIDE_INT
+round_frame_size (HOST_WIDE_INT size)
{
return ((size + STACK_BOUNDARY / BITS_PER_UNIT - 1)
& -STACK_BOUNDARY / BITS_PER_UNIT);
}
if (!returned_p)
- emit_insn (gen_rtx_RETURN (VOIDmode));
+ emit_jump_insn (gen_rtx_RETURN (VOIDmode));
}
/* Return nonzero if the current function is an interrupt
break;
default:
- abort ();
+ gcc_unreachable ();
}
/* Try different amounts in descending order. */
If this operand isn't a register, fall back to 'R' handling.
'Z' print int & 7.
'c' print the opcode corresponding to rtl
- 'e' first word of 32 bit value - if reg, then least reg. if mem
+ 'e' first word of 32-bit value - if reg, then least reg. if mem
then least. if const then most sig word
- 'f' second word of 32 bit value - if reg, then biggest reg. if mem
+ 'f' second word of 32-bit value - if reg, then biggest reg. if mem
then +2. if const then least sig word
'j' print operand as condition code.
'k' print operand as reverse condition code.
'm' convert an integer operand to a size suffix (.b, .w or .l)
'o' print an integer without a leading '#'
- 's' print as low byte of 16 bit value
- 't' print as high byte of 16 bit value
- 'w' print as low byte of 32 bit value
- 'x' print as 2nd byte of 32 bit value
- 'y' print as 3rd byte of 32 bit value
- 'z' print as msb of 32 bit value
+ 's' print as low byte of 16-bit value
+ 't' print as high byte of 16-bit value
+ 'w' print as low byte of 32-bit value
+ 'x' print as 2nd byte of 32-bit value
+ 'y' print as 3rd byte of 32-bit value
+ 'z' print as msb of 32-bit value
*/
/* Return assembly language string which identifies a comparison type. */
case LTU:
return "lo";
default:
- abort ();
+ gcc_unreachable ();
}
}
fprintf (file, "#%ld", (-INTVAL (x)) & 0xff);
break;
default:
- abort ();
+ gcc_unreachable ();
}
break;
case 'F':
fprintf (file, "#%ld", ((-INTVAL (x)) & 0xff00) >> 8);
break;
default:
- abort ();
+ gcc_unreachable ();
}
break;
case 'G':
- if (GET_CODE (x) != CONST_INT)
- abort ();
+ gcc_assert (GET_CODE (x) == CONST_INT);
fprintf (file, "#%ld", 0xff & (-INTVAL (x)));
break;
case 'S':
break;
case 'V':
bitint = exact_log2 (INTVAL (x) & 0xff);
- if (bitint == -1)
- abort ();
+ gcc_assert (bitint >= 0);
fprintf (file, "#%d", bitint);
break;
case 'W':
bitint = exact_log2 ((~INTVAL (x)) & 0xff);
- if (bitint == -1)
- abort ();
+ gcc_assert (bitint >= 0);
fprintf (file, "#%d", bitint);
break;
case 'R':
goto def;
break;
case 'Y':
- if (bitint == -1)
- abort ();
+ gcc_assert (bitint >= 0);
if (GET_CODE (x) == REG)
fprintf (file, "%s%c", names_big[REGNO (x)], bitint > 7 ? 'h' : 'l');
else
break;
}
default:
- abort ();
+ gcc_unreachable ();
break;
}
break;
break;
}
default:
- abort ();
+ gcc_unreachable ();
}
break;
case 'j':
fputs (cond_string (reverse_condition (GET_CODE (x))), file);
break;
case 'm':
- if (GET_CODE (x) != CONST_INT)
- abort ();
- if (INTVAL (x) == 1)
- fputs (".b", file);
- else if (INTVAL (x) == 2)
- fputs (".w", file);
- else if (INTVAL (x) == 4)
- fputs (".l", file);
- else
- abort ();
+ gcc_assert (GET_CODE (x) == CONST_INT);
+ switch (INTVAL (x))
+ {
+ case 1:
+ fputs (".b", file);
+ break;
+
+ case 2:
+ fputs (".w", file);
+ break;
+
+ case 4:
+ fputs (".l", file);
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
break;
case 'o':
print_operand_address (file, x);
fprintf (file, "%s", names_extended[REGNO (x)]);
break;
default:
- abort ();
+ gcc_unreachable ();
}
break;
case CONST_INT:
{
- /* Since the H8/300 only has 16 bit pointers, negative values are also
+ /* Since the H8/300 only has 16-bit pointers, negative values are also
those >= 32768. This happens for example with pointer minus a
constant. We don't want to turn (char *p - 2) into
(char *p + 65534) because loop unrolling can build upon this
pointer int account. */
saved_regs_size -= fp_size;
- if (to == HARD_FRAME_POINTER_REGNUM)
+ switch (to)
{
+ case HARD_FRAME_POINTER_REGNUM:
switch (from)
{
case ARG_POINTER_REGNUM:
case FRAME_POINTER_REGNUM:
return -saved_regs_size;
default:
- abort ();
+ gcc_unreachable ();
}
- }
- else if (to == STACK_POINTER_REGNUM)
- {
+ break;
+ case STACK_POINTER_REGNUM:
switch (from)
{
case ARG_POINTER_REGNUM:
case FRAME_POINTER_REGNUM:
return frame_size;
default:
- abort ();
+ gcc_unreachable ();
}
+ break;
+ default:
+ gcc_unreachable ();
}
- else
- abort ();
+ gcc_unreachable ();
}
/* Worker function for RETURN_ADDR_RTX. */
return 0;
}
}
- else if (register_operand (op, VOIDmode))
- {
- *class = H8OP_REGISTER;
- return 0;
- }
- abort ();
+ gcc_assert (register_operand (op, VOIDmode));
+ *class = H8OP_REGISTER;
+ return 0;
}
/* Return the length of the instruction described by TABLE given that
return operand_length + 6;
default:
- abort ();
+ gcc_unreachable ();
}
}
return 4 + operand_length;
default:
- abort ();
+ gcc_unreachable ();
}
}
if (GET_CODE (op) == REG)
op = op2;
- if (GET_CODE (op) == REG)
- abort ();
+ gcc_assert (GET_CODE (op) != REG);
size = GET_MODE_SIZE (GET_MODE (op));
operand_length = h8300_classify_operand (op, size, &class);
return 4 + operand_length;
default:
- abort ();
+ gcc_unreachable ();
}
}
rtx set;
set = single_set (insn);
- if (set == 0)
- abort ();
+ gcc_assert (set);
if (BINARY_P (SET_SRC (set)))
return h8300_length_from_table (XEXP (SET_SRC (set), 0),
XEXP (SET_SRC (set), 1), table);
- else if (GET_RTX_CLASS (GET_CODE (SET_SRC (set))) == RTX_TERNARY)
- return h8300_length_from_table (XEXP (XEXP (SET_SRC (set), 1), 0),
- XEXP (XEXP (SET_SRC (set), 1), 1),
- table);
else
- abort ();
+ {
+ gcc_assert (GET_RTX_CLASS (GET_CODE (SET_SRC (set))) == RTX_TERNARY);
+ return h8300_length_from_table (XEXP (XEXP (SET_SRC (set), 1), 0),
+ XEXP (XEXP (SET_SRC (set), 1), 1),
+ table);
+ }
}
/* Subroutine of h8300_move_length. Return true if OP is 1- or 2-byte
switch (get_attr_length_table (insn))
{
case LENGTH_TABLE_NONE:
- abort ();
+ gcc_unreachable ();
case LENGTH_TABLE_ADDB:
return h8300_binary_length (insn, &addb_length_table);
case LENGTH_TABLE_BITBRANCH:
return h8300_bitfield_length (operands[1], operands[2]) - 2;
-
+
+ default:
+ gcc_unreachable ();
}
- abort ();
}
/* Return true if LHS and RHS are memory references that can be mapped
break;
default:
- abort ();
+ gcc_unreachable ();
}
/* Adjust the length based on the addressing mode used.
break;
default:
- abort ();
+ gcc_unreachable ();
}
/* Adjust the length based on the addressing mode used.
{
enum machine_mode mode = GET_MODE (operands[0]);
- if (mode != SImode)
- abort ();
+ gcc_assert (mode == SImode);
if (TARGET_H8300)
{
{
enum machine_mode mode = GET_MODE (operands[0]);
- if (mode != SImode)
- abort ();
+ gcc_assert (mode == SImode);
if (TARGET_H8300)
{
{
enum machine_mode mode = GET_MODE (operands[0]);
- if (mode != SImode)
- abort ();
+ gcc_assert (mode == SImode);
if (TARGET_H8300)
{
opname = "xor";
break;
default:
- abort ();
+ gcc_unreachable ();
}
switch (mode)
}
break;
default:
- abort ();
+ gcc_unreachable ();
}
return "";
}
}
break;
default:
- abort ();
+ gcc_unreachable ();
}
return length;
}
}
break;
default:
- abort ();
+ gcc_unreachable ();
}
return cc;
}
break;
default:
- abort ();
+ gcc_unreachable ();
}
if (operands[2] == const1_rtx)
sprintf (buffer, "%s.%c\t%%%c0", stem, suffix, optype);
break;
default:
- abort ();
+ gcc_unreachable ();
}
/* Fill in INFO. Return unless we have SHIFT_SPECIAL. */
case QIshift:
/* For ASHIFTRT by 7 bits, the sign bit is simply replicated
through the entire value. */
- if (shift_type == SHIFT_ASHIFTRT && count == 7)
- {
- info->special = "shll\t%X0\n\tsubx\t%X0,%X0";
- goto end;
- }
- abort ();
+ gcc_assert (shift_type == SHIFT_ASHIFTRT && count == 7);
+ info->special = "shll\t%X0\n\tsubx\t%X0,%X0";
+ goto end;
case HIshift:
if (count == 7)
info->cc_special = CC_SET_ZNV;
}
else /* TARGET_H8300S */
- abort ();
+ gcc_unreachable ();
goto end;
}
}
goto end;
}
}
- abort ();
+ gcc_unreachable ();
case SIshift:
if (TARGET_H8300 && 8 <= count && count <= 9)
switch (shift_type)
{
case SHIFT_ASHIFT:
- abort ();
+ gcc_unreachable ();
case SHIFT_LSHIFTRT:
info->special = "bld\t#7,%z0\n\tmov.w\t%e0,%f0\n\txor\t%y0,%y0\n\txor\t%z0,%z0\n\trotxl\t%w0\n\trotxl\t%x0\n\trotxl\t%y0";
goto end;
info->cc_special = CC_SET_ZNV;
goto end;
case SHIFT_ASHIFTRT:
- abort ();
+ gcc_unreachable ();
}
}
else if ((TARGET_H8300 && 16 <= count && count <= 20)
info->special = "sub.w\t%f0,%f0\n\trotl.l\t#2,%S0\n\trotl.l\t#2,%S0\n\textu.l\t%S0";
goto end;
case SHIFT_ASHIFTRT:
- abort ();
+ gcc_unreachable ();
}
}
else if (!TARGET_H8300 && count == 29)
}
goto end;
case SHIFT_ASHIFTRT:
- abort ();
+ gcc_unreachable ();
}
}
else if (!TARGET_H8300 && count == 30)
info->special = "sub.w\t%f0,%f0\n\trotl.l\t#2,%S0\n\textu.l\t%S0";
goto end;
case SHIFT_ASHIFTRT:
- abort ();
+ gcc_unreachable ();
}
}
else if (count == 31)
}
}
}
- abort ();
+ gcc_unreachable ();
default:
- abort ();
+ gcc_unreachable ();
}
end:
break;
default:
- abort ();
+ gcc_unreachable ();
}
/* On H8/300H, count == 8 uses a scratch register. */
enum shift_type shift_type;
enum shift_mode shift_mode;
struct shift_info info;
+ int n;
loopend_lab++;
shift_mode = SIshift;
break;
default:
- abort ();
+ gcc_unreachable ();
}
switch (code)
shift_type = SHIFT_ASHIFT;
break;
default:
- abort ();
+ gcc_unreachable ();
}
- if (GET_CODE (operands[2]) != CONST_INT)
- {
- /* This case must be taken care of by one of the two splitters
- that convert a variable shift into a loop. */
- abort ();
- }
- else
+ /* This case must be taken care of by one of the two splitters
+ that convert a variable shift into a loop. */
+ gcc_assert (GET_CODE (operands[2]) == CONST_INT);
+
+ n = INTVAL (operands[2]);
+
+ /* If the count is negative, make it 0. */
+ if (n < 0)
+ n = 0;
+ /* If the count is too big, truncate it.
+ ANSI says shifts of GET_MODE_BITSIZE are undefined - we choose to
+ do the intuitive thing. */
+ else if ((unsigned int) n > GET_MODE_BITSIZE (mode))
+ n = GET_MODE_BITSIZE (mode);
+
+ get_shift_alg (shift_type, shift_mode, n, &info);
+
+ switch (info.alg)
{
- int n = INTVAL (operands[2]);
-
- /* If the count is negative, make it 0. */
- if (n < 0)
- n = 0;
- /* If the count is too big, truncate it.
- ANSI says shifts of GET_MODE_BITSIZE are undefined - we choose to
- do the intuitive thing. */
- else if ((unsigned int) n > GET_MODE_BITSIZE (mode))
- n = GET_MODE_BITSIZE (mode);
+ case SHIFT_SPECIAL:
+ output_asm_insn (info.special, operands);
+ /* Fall through. */
- get_shift_alg (shift_type, shift_mode, n, &info);
+ case SHIFT_INLINE:
+ n = info.remainder;
- switch (info.alg)
+ /* Emit two bit shifts first. */
+ if (info.shift2 != NULL)
{
- case SHIFT_SPECIAL:
- output_asm_insn (info.special, operands);
- /* Fall through. */
-
- case SHIFT_INLINE:
- n = info.remainder;
-
- /* Emit two bit shifts first. */
- if (info.shift2 != NULL)
- {
- for (; n > 1; n -= 2)
- output_asm_insn (info.shift2, operands);
- }
-
- /* Now emit one bit shifts for any residual. */
- for (; n > 0; n--)
- output_asm_insn (info.shift1, operands);
- return "";
+ for (; n > 1; n -= 2)
+ output_asm_insn (info.shift2, operands);
+ }
- case SHIFT_ROT_AND:
+ /* Now emit one bit shifts for any residual. */
+ for (; n > 0; n--)
+ output_asm_insn (info.shift1, operands);
+ return "";
+
+ case SHIFT_ROT_AND:
+ {
+ int m = GET_MODE_BITSIZE (mode) - n;
+ const int mask = (shift_type == SHIFT_ASHIFT
+ ? ((1 << m) - 1) << n
+ : (1 << m) - 1);
+ char insn_buf[200];
+
+ /* Not all possibilities of rotate are supported. They shouldn't
+ be generated, but let's watch for 'em. */
+ gcc_assert (info.shift1);
+
+ /* Emit two bit rotates first. */
+ if (info.shift2 != NULL)
{
- int m = GET_MODE_BITSIZE (mode) - n;
- const int mask = (shift_type == SHIFT_ASHIFT
- ? ((1 << m) - 1) << n
- : (1 << m) - 1);
- char insn_buf[200];
-
- /* Not all possibilities of rotate are supported. They shouldn't
- be generated, but let's watch for 'em. */
- if (info.shift1 == 0)
- abort ();
-
- /* Emit two bit rotates first. */
- if (info.shift2 != NULL)
- {
- for (; m > 1; m -= 2)
- output_asm_insn (info.shift2, operands);
- }
+ for (; m > 1; m -= 2)
+ output_asm_insn (info.shift2, operands);
+ }
+
+ /* Now single bit rotates for any residual. */
+ for (; m > 0; m--)
+ output_asm_insn (info.shift1, operands);
+
+ /* Now mask off the high bits. */
+ switch (mode)
+ {
+ case QImode:
+ sprintf (insn_buf, "and\t#%d,%%X0", mask);
+ break;
- /* Now single bit rotates for any residual. */
- for (; m > 0; m--)
- output_asm_insn (info.shift1, operands);
+ case HImode:
+ gcc_assert (TARGET_H8300H || TARGET_H8300S);
+ sprintf (insn_buf, "and.w\t#%d,%%T0", mask);
+ break;
- /* Now mask off the high bits. */
- if (mode == QImode)
- sprintf (insn_buf, "and\t#%d,%%X0", mask);
- else if (mode == HImode && (TARGET_H8300H || TARGET_H8300S))
- sprintf (insn_buf, "and.w\t#%d,%%T0", mask);
- else
- abort ();
-
- output_asm_insn (insn_buf, operands);
- return "";
+ default:
+ gcc_unreachable ();
}
- case SHIFT_LOOP:
- /* A loop to shift by a "large" constant value.
- If we have shift-by-2 insns, use them. */
- if (info.shift2 != NULL)
- {
- fprintf (asm_out_file, "\tmov.b #%d,%sl\n", n / 2,
- names_big[REGNO (operands[4])]);
- fprintf (asm_out_file, ".Llt%d:\n", loopend_lab);
- output_asm_insn (info.shift2, operands);
- output_asm_insn ("add #0xff,%X4", operands);
- fprintf (asm_out_file, "\tbne .Llt%d\n", loopend_lab);
- if (n % 2)
- output_asm_insn (info.shift1, operands);
- }
- else
- {
- fprintf (asm_out_file, "\tmov.b #%d,%sl\n", n,
- names_big[REGNO (operands[4])]);
- fprintf (asm_out_file, ".Llt%d:\n", loopend_lab);
- output_asm_insn (info.shift1, operands);
- output_asm_insn ("add #0xff,%X4", operands);
- fprintf (asm_out_file, "\tbne .Llt%d\n", loopend_lab);
- }
- return "";
+ output_asm_insn (insn_buf, operands);
+ return "";
+ }
- default:
- abort ();
+ case SHIFT_LOOP:
+ /* A loop to shift by a "large" constant value.
+ If we have shift-by-2 insns, use them. */
+ if (info.shift2 != NULL)
+ {
+ fprintf (asm_out_file, "\tmov.b #%d,%sl\n", n / 2,
+ names_big[REGNO (operands[4])]);
+ fprintf (asm_out_file, ".Llt%d:\n", loopend_lab);
+ output_asm_insn (info.shift2, operands);
+ output_asm_insn ("add #0xff,%X4", operands);
+ fprintf (asm_out_file, "\tbne .Llt%d\n", loopend_lab);
+ if (n % 2)
+ output_asm_insn (info.shift1, operands);
}
+ else
+ {
+ fprintf (asm_out_file, "\tmov.b #%d,%sl\n", n,
+ names_big[REGNO (operands[4])]);
+ fprintf (asm_out_file, ".Llt%d:\n", loopend_lab);
+ output_asm_insn (info.shift1, operands);
+ output_asm_insn ("add #0xff,%X4", operands);
+ fprintf (asm_out_file, "\tbne .Llt%d\n", loopend_lab);
+ }
+ return "";
+
+ default:
+ gcc_unreachable ();
}
}
shift_mode = SIshift;
break;
default:
- abort ();
+ gcc_unreachable ();
}
switch (code)
shift_type = SHIFT_ASHIFT;
break;
default:
- abort ();
+ gcc_unreachable ();
}
if (GET_CODE (operands[2]) != CONST_INT)
/* Not all possibilities of rotate are supported. They shouldn't
be generated, but let's watch for 'em. */
- if (info.shift1 == 0)
- abort ();
+ gcc_assert (info.shift1);
if (info.shift2 != NULL)
{
wlength += 2;
break;
case SImode:
- if (TARGET_H8300)
- abort ();
+ gcc_assert (!TARGET_H8300);
wlength += 3;
break;
default:
- abort ();
+ gcc_unreachable ();
}
return 2 * wlength;
}
return 2 * wlength;
default:
- abort ();
+ gcc_unreachable ();
}
}
}
enum shift_type shift_type;
enum shift_mode shift_mode;
struct shift_info info;
-
+ int n;
+
switch (mode)
{
case QImode:
shift_mode = SIshift;
break;
default:
- abort ();
+ gcc_unreachable ();
}
switch (code)
shift_type = SHIFT_ASHIFT;
break;
default:
- abort ();
+ gcc_unreachable ();
}
- if (GET_CODE (operands[2]) != CONST_INT)
- {
- /* This case must be taken care of by one of the two splitters
- that convert a variable shift into a loop. */
- abort ();
- }
- else
+ /* This case must be taken care of by one of the two splitters
+ that convert a variable shift into a loop. */
+ gcc_assert (GET_CODE (operands[2]) == CONST_INT);
+
+ n = INTVAL (operands[2]);
+
+ /* If the count is negative, make it 0. */
+ if (n < 0)
+ n = 0;
+ /* If the count is too big, truncate it.
+ ANSI says shifts of GET_MODE_BITSIZE are undefined - we choose to
+ do the intuitive thing. */
+ else if ((unsigned int) n > GET_MODE_BITSIZE (mode))
+ n = GET_MODE_BITSIZE (mode);
+
+ get_shift_alg (shift_type, shift_mode, n, &info);
+
+ switch (info.alg)
{
- int n = INTVAL (operands[2]);
-
- /* If the count is negative, make it 0. */
- if (n < 0)
- n = 0;
- /* If the count is too big, truncate it.
- ANSI says shifts of GET_MODE_BITSIZE are undefined - we choose to
- do the intuitive thing. */
- else if ((unsigned int) n > GET_MODE_BITSIZE (mode))
- n = GET_MODE_BITSIZE (mode);
+ case SHIFT_SPECIAL:
+ if (info.remainder == 0)
+ return info.cc_special;
- get_shift_alg (shift_type, shift_mode, n, &info);
+ /* Fall through. */
- switch (info.alg)
+ case SHIFT_INLINE:
+ return info.cc_inline;
+
+ case SHIFT_ROT_AND:
+ /* This case always ends with an and instruction. */
+ return CC_SET_ZNV;
+
+ case SHIFT_LOOP:
+ /* A loop to shift by a "large" constant value.
+ If we have shift-by-2 insns, use them. */
+ if (info.shift2 != NULL)
{
- case SHIFT_SPECIAL:
- if (info.remainder == 0)
- return info.cc_special;
-
- /* Fall through. */
-
- case SHIFT_INLINE:
- return info.cc_inline;
-
- case SHIFT_ROT_AND:
- /* This case always ends with an and instruction. */
- return CC_SET_ZNV;
-
- case SHIFT_LOOP:
- /* A loop to shift by a "large" constant value.
- If we have shift-by-2 insns, use them. */
- if (info.shift2 != NULL)
- {
- if (n % 2)
- return info.cc_inline;
- }
- return CC_CLOBBER;
-
- default:
- abort ();
+ if (n % 2)
+ return info.cc_inline;
}
+ return CC_CLOBBER;
+
+ default:
+ gcc_unreachable ();
}
}
\f
emit_insn (gen_rotlsi3_1 (dst, dst, const1_rtx));
break;
default:
- abort ();
+ gcc_unreachable ();
}
/* Decrement the counter by 1. */
emit_insn (gen_rotlsi3_1 (dst, dst, rotate_amount));
break;
default:
- abort ();
+ gcc_unreachable ();
}
}
int amount;
enum machine_mode mode = GET_MODE (dst);
- if (GET_CODE (rotate_amount) != CONST_INT)
- abort ();
+ gcc_assert (GET_CODE (rotate_amount) == CONST_INT);
switch (mode)
{
rotate_mode = SIshift;
break;
default:
- abort ();
+ gcc_unreachable ();
}
switch (code)
rotate_type = SHIFT_LSHIFTRT;
break;
default:
- abort ();
+ gcc_unreachable ();
}
amount = INTVAL (rotate_amount);
break;
default:
- abort ();
+ gcc_unreachable ();
}
/* Adjust AMOUNT and flip the direction. */
int amount;
unsigned int length = 0;
- if (GET_CODE (amount_rtx) != CONST_INT)
- abort ();
+ gcc_assert (GET_CODE (amount_rtx) == CONST_INT);
amount = INTVAL (amount_rtx);
emit_insn (gen_xorqi3_1 (res, operands[1], operands[2]));
break;
default:
- abort ();
+ gcc_unreachable ();
}
emit_insn (gen_movqi (operands[0], res));
}
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
- warning ("%qs attribute only applies to functions",
+ warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
}
else
{
- warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
+ warning (OPT_Wattributes, "%qs attribute ignored",
+ IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
}
else
{
- warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
+ warning (OPT_Wattributes, "%qs attribute ignored",
+ IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
&& REGNO (operands[1]) == 1
&& REGNO (operands[2]) == 2
&& REGNO (operands[3]) == 3);
+ default:
+ gcc_unreachable ();
}
-
- abort ();
}
/* Return nonzero if register OLD_REG can be renamed to register NEW_REG. */
call-clobbered. */
if (h8300_current_function_interrupt_function_p ()
- && !regs_ever_live[new_reg])
+ && !df_regs_ever_live_p (new_reg))
return 0;
return 1;
/* Worker function for TARGET_RETURN_IN_MEMORY. */
static bool
-h8300_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+h8300_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
{
return (TYPE_MODE (type) == BLKmode
|| GET_MODE_SIZE (TYPE_MODE (type)) > (TARGET_H8300 ? 4 : 8));
#undef TARGET_MACHINE_DEPENDENT_REORG
#define TARGET_MACHINE_DEPENDENT_REORG h8300_reorg
+#undef TARGET_DEFAULT_TARGET_FLAGS
+#define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
+
struct gcc_target targetm = TARGET_INITIALIZER;