Commit 5ab9749e by Nick Clifton Committed by Nick Clifton

stormy16.md: Remove extraneous spaces and quotes.

        * config/stormy16/stormy16.md: Remove extraneous spaces and
        quotes.
        * config/stormy16/stormy16.c: Remove extraneous spaces and fix up
        formatting of quotes.

From-SVN: r142431
parent 5cf96841
2008-12-04 Nick Clifton <nickc@redhat.com>
* config/stormy16/stormy16.md: Remove extraneous spaces and
quotes.
* config/stormy16/stormy16.c: Remove extraneous spaces and fix up
formatting of quotes.
2008-12-04 Jakub Jelinek <jakub@redhat.com>
PR middle-end/38371
......@@ -3,21 +3,21 @@
2006, 2007, 2008 Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
This file is part of GCC.
This file is part of GCC.
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 3, or (at your option)
any later version.
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 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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 COPYING3. If not see
<http://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
......@@ -91,7 +91,7 @@ xstormy16_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
case CONST:
case SYMBOL_REF:
case LABEL_REF:
*total = COSTS_N_INSNS(2);
*total = COSTS_N_INSNS (2);
return true;
case MULT:
......@@ -134,8 +134,7 @@ xstormy16_address_cost (rtx x, bool speed ATTRIBUTE_UNUSED)
sbc
blt
or
bne
*/
bne. */
/* Emit a branch of kind CODE to location LOC. */
......@@ -489,6 +488,7 @@ xstormy16_preferred_reload_class (rtx x, enum reg_class rclass)
/* Predicate for symbols and addresses that reflect special 8-bit
addressing. */
int
xstormy16_below100_symbol (rtx x,
enum machine_mode mode ATTRIBUTE_UNUSED)
......@@ -514,6 +514,7 @@ xstormy16_below100_symbol (rtx x,
/* Likewise, but only for non-volatile MEMs, for patterns where the
MEM will get split into smaller sized accesses. */
int
xstormy16_splittable_below100_operand (rtx x, enum machine_mode mode)
{
......@@ -524,6 +525,7 @@ xstormy16_splittable_below100_operand (rtx x, enum machine_mode mode)
/* Expand an 8-bit IOR. This either detects the one case we can
actually do, or uses a 16-bit IOR. */
void
xstormy16_expand_iorqi3 (rtx *operands)
{
......@@ -564,7 +566,9 @@ xstormy16_expand_iorqi3 (rtx *operands)
emit_move_insn (operands[0], out);
}
/* Likewise, for AND. */
/* Expand an 8-bit AND. This either detects the one case we can
actually do, or uses a 16-bit AND. */
void
xstormy16_expand_andqi3 (rtx *operands)
{
......@@ -663,6 +667,7 @@ xstormy16_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
of 0 but not of 6, because in that case it cannot be used as an
address for DImode or DFmode, or if the address is a post-increment
or pre-decrement address. */
int
xstormy16_mode_dependent_address_p (rtx x)
{
......@@ -679,7 +684,6 @@ xstormy16_mode_dependent_address_p (rtx x)
x = XEXP (x, 0);
/* Auto-increment addresses are now treated generically in recog.c. */
return 0;
}
......@@ -690,6 +694,7 @@ xstormy16_mode_dependent_address_p (rtx x)
target machine, it should return 1 if VALUE corresponds to the operand type
represented by the constraint letter C. If C is not defined as an extra
constraint, the value returned should be 0 regardless of VALUE. */
int
xstormy16_extra_constraint_p (rtx x, int c)
{
......@@ -750,8 +755,7 @@ short_memory_operand (rtx x, enum machine_mode mode)
by hardware. Emit insns to copy a value of mode MODE from SRC to
DEST.
This function is only called when reload_completed.
*/
This function is only called when reload_completed. */
void
xstormy16_split_move (enum machine_mode mode, rtx dest, rtx src)
......@@ -934,7 +938,6 @@ xstormy16_expand_move (enum machine_mode mode, rtx dest, rtx src)
emit_insn (gen_rtx_SET (VOIDmode, dest, src));
}
/* Stack Layout:
The stack is laid out as follows:
......@@ -977,6 +980,7 @@ struct xstormy16_stack_layout
&& (df_regs_ever_live_p (REGNUM) || ! current_function_is_leaf)))
/* Compute the stack layout. */
struct xstormy16_stack_layout
xstormy16_compute_stack_layout (void)
{
......@@ -1019,6 +1023,7 @@ xstormy16_compute_stack_layout (void)
}
/* Determine how all the special registers get eliminated. */
int
xstormy16_initial_elimination_offset (int from, int to)
{
......@@ -1062,6 +1067,7 @@ emit_addhi3_postreload (rtx dest, rtx src0, rtx src1)
Also any insns generated here should have RTX_FRAME_RELATED_P(insn) = 1
so that the debug info generation code can handle them properly. */
void
xstormy16_expand_prologue (void)
{
......@@ -1164,6 +1170,7 @@ xstormy16_expand_prologue (void)
}
/* Do we need an epilogue at all? */
int
direct_return (void)
{
......@@ -1236,7 +1243,6 @@ xstormy16_function_profiler (void)
sorry ("function_profiler support");
}
/* Return an updated summarizer variable CUM to advance past an
argument in the argument list. The values MODE, TYPE and NAMED
describe that argument. Once this is done, the variable CUM is
......@@ -1248,6 +1254,7 @@ xstormy16_function_profiler (void)
stack space used for arguments without any special help. However,
it makes life easier for xstormy16_build_va_list if it does update
the word count. */
CUMULATIVE_ARGS
xstormy16_function_arg_advance (CUMULATIVE_ARGS cum, enum machine_mode mode,
tree type, int named ATTRIBUTE_UNUSED)
......@@ -1272,7 +1279,7 @@ xstormy16_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
return const0_rtx;
if (targetm.calls.must_pass_in_stack (mode, type)
|| cum + XSTORMY16_WORD_SIZE (type, mode) > NUM_ARGUMENT_REGISTERS)
return 0;
return NULL_RTX;
return gen_rtx_REG (mode, cum + 2);
}
......@@ -1314,6 +1321,7 @@ xstormy16_build_builtin_va_list (void)
is stdarg.h instead of varargs.h. VALIST is the tree of the va_list
variable to initialize. NEXTARG is the machine independent notion of the
'next' argument after the variable arguments. */
static void
xstormy16_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
{
......@@ -1445,6 +1453,7 @@ xstormy16_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
the address of the trampoline; FNADDR is an RTX for the address of
the nested function; STATIC_CHAIN is an RTX for the static chain
value that should be passed to the function when it is called. */
void
xstormy16_initialize_trampoline (rtx addr, rtx fnaddr, rtx static_chain)
{
......@@ -1534,6 +1543,7 @@ xstormy16_asm_output_mi_thunk (FILE *file,
.bss_below100. We can't just use a section override (like we do
for .data_below100), because that makes them initialized rather
than uninitialized. */
void
xstormy16_asm_output_aligned_common (FILE *stream,
tree decl,
......@@ -1613,13 +1623,14 @@ xstormy16_encode_section_info (tree decl, rtx r, int first)
}
}
/* Output constructors and destructors. Just like
default_named_section_asm_out_* but don't set the sections writable. */
#undef TARGET_ASM_CONSTRUCTOR
#define TARGET_ASM_CONSTRUCTOR xstormy16_asm_out_constructor
#undef TARGET_ASM_DESTRUCTOR
#define TARGET_ASM_DESTRUCTOR xstormy16_asm_out_destructor
/* Output constructors and destructors. Just like
default_named_section_asm_out_* but don't set the sections writable. */
static void
xstormy16_asm_out_destructor (rtx symbol, int priority)
{
......@@ -1665,6 +1676,7 @@ xstormy16_asm_out_constructor (rtx symbol, int priority)
}
/* Print a memory address as an operand to reference that memory location. */
void
xstormy16_print_operand_address (FILE *file, rtx address)
{
......@@ -1685,9 +1697,7 @@ xstormy16_print_operand_address (FILE *file, rtx address)
}
/* Otherwise, it's hopefully something of the form
(plus:HI (pre_dec:HI (reg:HI ...)) (const_int ...))
*/
(plus:HI (pre_dec:HI (reg:HI ...)) (const_int ...)). */
if (GET_CODE (address) == PLUS)
{
gcc_assert (GET_CODE (XEXP (address, 1)) == CONST_INT);
......@@ -1716,6 +1726,7 @@ xstormy16_print_operand_address (FILE *file, rtx address)
}
/* Print an operand to an assembler instruction. */
void
xstormy16_print_operand (FILE *file, rtx x, int code)
{
......@@ -1842,7 +1853,6 @@ xstormy16_print_operand (FILE *file, rtx x, int code)
return;
}
/* Expander for the `casesi' pattern.
INDEX is the index of the switch statement.
LOWER_BOUND is a CONST_INT that is the value of INDEX corresponding
......@@ -1850,8 +1860,7 @@ xstormy16_print_operand (FILE *file, rtx x, int code)
RANGE is the number of table entries.
TABLE is an ADDR_VEC that is the jump table.
DEFAULT_LABEL is the address to branch to if INDEX is outside the
range LOWER_BOUND to LOWER_BOUND+RANGE-1.
*/
range LOWER_BOUND to LOWER_BOUND + RANGE - 1. */
void
xstormy16_expand_casesi (rtx index, rtx lower_bound, rtx range,
......@@ -1899,7 +1908,6 @@ xstormy16_output_addr_vec (FILE *file, rtx label ATTRIBUTE_UNUSED, rtx table)
}
}
/* Expander for the `call' patterns.
INDEX is the index of the switch statement.
LOWER_BOUND is a CONST_INT that is the value of INDEX corresponding
......@@ -1907,8 +1915,7 @@ xstormy16_output_addr_vec (FILE *file, rtx label ATTRIBUTE_UNUSED, rtx table)
RANGE is the number of table entries.
TABLE is an ADDR_VEC that is the jump table.
DEFAULT_LABEL is the address to branch to if INDEX is outside the
range LOWER_BOUND to LOWER_BOUND+RANGE-1.
*/
range LOWER_BOUND to LOWER_BOUND + RANGE - 1. */
void
xstormy16_expand_call (rtx retval, rtx dest, rtx counter)
......@@ -2143,19 +2150,19 @@ xstormy16_output_shift (enum machine_mode mode, enum rtx_code code,
case ASHIFT:
sprintf (r,
"mov %s,%s | shl %s,#%d | shl %s,#%d | shr %s,#%d | or %s,%s",
rt, r0, r0, (int) size, r1, (int) size, rt, (int) (16-size),
rt, r0, r0, (int) size, r1, (int) size, rt, (int) (16 - size),
r1, rt);
break;
case ASHIFTRT:
sprintf (r,
"mov %s,%s | asr %s,#%d | shr %s,#%d | shl %s,#%d | or %s,%s",
rt, r1, r1, (int) size, r0, (int) size, rt, (int) (16-size),
rt, r1, r1, (int) size, r0, (int) size, rt, (int) (16 - size),
r0, rt);
break;
case LSHIFTRT:
sprintf (r,
"mov %s,%s | shr %s,#%d | shr %s,#%d | shl %s,#%d | or %s,%s",
rt, r1, r1, (int) size, r0, (int) size, rt, (int) (16-size),
rt, r1, r1, (int) size, r0, (int) size, rt, (int) (16 - size),
r0, rt);
break;
default:
......@@ -2167,6 +2174,7 @@ xstormy16_output_shift (enum machine_mode mode, enum rtx_code code,
/* Attribute handling. */
/* Return nonzero if the function is an interrupt function. */
int
xstormy16_interrupt_function_p (void)
{
......@@ -2184,6 +2192,7 @@ xstormy16_interrupt_function_p (void)
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE xstormy16_attribute_table
static tree xstormy16_handle_interrupt_attribute
(tree *, tree, tree, int, bool *);
static tree xstormy16_handle_below100_attribute
......@@ -2191,7 +2200,7 @@ static tree xstormy16_handle_below100_attribute
static const struct attribute_spec xstormy16_attribute_table[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
/* name, min_len, max_len, decl_req, type_req, fn_type_req, handler. */
{ "interrupt", 0, 0, false, true, true, xstormy16_handle_interrupt_attribute },
{ "BELOW100", 0, 0, false, false, false, xstormy16_handle_below100_attribute },
{ "below100", 0, 0, false, false, false, xstormy16_handle_below100_attribute },
......@@ -2200,6 +2209,7 @@ static const struct attribute_spec xstormy16_attribute_table[] =
/* Handle an "interrupt" attribute;
arguments as in struct attribute_spec.handler. */
static tree
xstormy16_handle_interrupt_attribute (tree *node, tree name,
tree args ATTRIBUTE_UNUSED,
......@@ -2218,6 +2228,7 @@ xstormy16_handle_interrupt_attribute (tree *node, tree name,
/* Handle an "below" attribute;
arguments as in struct attribute_spec.handler. */
static tree
xstormy16_handle_below100_attribute (tree *node,
tree name ATTRIBUTE_UNUSED,
......@@ -2251,17 +2262,20 @@ xstormy16_handle_below100_attribute (tree *node,
#undef TARGET_EXPAND_BUILTIN
#define TARGET_EXPAND_BUILTIN xstormy16_expand_builtin
static struct {
const char *name;
static struct
{
const char * name;
int md_code;
const char *arg_ops; /* 0..9, t for temp register, r for return value */
const char *arg_types; /* s=short,l=long, upper case for unsigned */
} s16builtins[] = {
const char * arg_ops; /* 0..9, t for temp register, r for return value. */
const char * arg_types; /* s=short,l=long, upper case for unsigned. */
}
s16builtins[] =
{
{ "__sdivlh", CODE_FOR_sdivlh, "rt01", "sls" },
{ "__smodlh", CODE_FOR_sdivlh, "tr01", "sls" },
{ "__udivlh", CODE_FOR_udivlh, "rt01", "SLS" },
{ "__umodlh", CODE_FOR_udivlh, "tr01", "SLS" },
{ 0, 0, 0, 0 }
{ NULL, 0, NULL, NULL }
};
static void
......@@ -2272,10 +2286,10 @@ xstormy16_init_builtins (void)
ret_type = void_type_node;
for (i=0; s16builtins[i].name; i++)
for (i = 0; s16builtins[i].name; i++)
{
args = void_list_node;
for (a=strlen (s16builtins[i].arg_types)-1; a>=0; a--)
for (a = strlen (s16builtins[i].arg_types) - 1; a >= 0; a--)
{
switch (s16builtins[i].arg_types[a])
{
......@@ -2363,10 +2377,10 @@ xstormy16_expand_builtin (tree exp, rtx target,
return retval;
}
/* Look for combinations of insns that can be converted to BN or BP
opcodes. This is, unfortunately, too complex to do with MD
patterns. */
static void
combine_bnp (rtx insn)
{
......@@ -2592,7 +2606,6 @@ xstormy16_reorg (void)
}
}
/* Worker function for TARGET_RETURN_IN_MEMORY. */
static bool
......@@ -2609,7 +2622,7 @@ xstormy16_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO xstormy16_encode_section_info
/* select_section doesn't handle .bss_below100. */
/* Select_section doesn't handle .bss_below100. */
#undef TARGET_HAVE_SWITCHABLE_BSS_SECTIONS
#define TARGET_HAVE_SWITCHABLE_BSS_SECTIONS false
......
......@@ -50,8 +50,6 @@
]
)
;; ::::::::::::::::::::
;; ::
;; :: Attributes
......@@ -135,7 +133,9 @@
[(set (match_operand:QI 0 "nonimmediate_nonstack_operand" "")
(match_operand:QI 1 "general_operand" ""))]
""
"{ xstormy16_expand_move (QImode, operands[0], operands[1]); DONE; }")
{ xstormy16_expand_move (QImode, operands[0], operands[1]);
DONE;
})
(define_insn "movqi_internal"
[(set (match_operand:QI 0 "nonimmediate_nonstack_operand" "=r,m,e,e,T,r,S,W,e")
......@@ -187,7 +187,9 @@
[(set (match_operand:HI 0 "nonimmediate_nonstack_operand" "")
(match_operand:HI 1 "xs_hi_general_operand" ""))]
""
"{ xstormy16_expand_move (HImode, operands[0], operands[1]); DONE; }")
{ xstormy16_expand_move (HImode, operands[0], operands[1]);
DONE;
})
(define_insn "movhi_internal"
[(set (match_operand:HI 0 "nonimmediate_nonstack_operand" "=r,m,e,e,T,r,S,W,e")
......@@ -223,7 +225,9 @@
[(set (match_operand:SI 0 "nonimmediate_operand" "")
(match_operand:SI 1 "general_operand" ""))]
""
"{ xstormy16_expand_move (SImode, operands[0], operands[1]); DONE; }")
{ xstormy16_expand_move (SImode, operands[0], operands[1]);
DONE;
})
(define_insn_and_split "*movsi_internal"
[(set (match_operand:SI 0 "nonimmediate_operand" "=r,Q,r,m,e,&e,e,r,S")
......@@ -232,7 +236,9 @@
"#"
"reload_completed"
[(pc)]
"{ xstormy16_split_move (SImode, operands[0], operands[1]); DONE; }"
{ xstormy16_split_move (SImode, operands[0], operands[1]);
DONE;
}
[(set_attr_alternative "length"
[(const_int 4)
(const_int 4)
......@@ -250,7 +256,6 @@
(const_int 8)
(const_int 8)])])
;; ::::::::::::::::::::
;; ::
;; :: Conversions
......@@ -275,7 +280,6 @@
[(const_int 4)
(const_int 8)])])
;; ::::::::::::::::::::
;; ::
;; :: Bit field extraction
......@@ -501,7 +505,6 @@
""
"")
;; ::::::::::::::::::::
;; ::
;; :: 16-bit Integer Shifts and Rotates
......@@ -535,7 +538,6 @@
""
"shr %0,%2")
;; ::::::::::::::::::::
;; ::
;; :: 16-Bit Integer Logical operations
......@@ -564,13 +566,12 @@
[(set (match_dup 3)
(and:QI (match_dup 4)
(match_dup 5)))]
"{ int s = ((INTVAL (operands[2]) & 0xff) == 0xff) ? 1 : 0;
{ int s = ((INTVAL (operands[2]) & 0xff) == 0xff) ? 1 : 0;
operands[3] = simplify_gen_subreg (QImode, operands[0], HImode, s);
operands[4] = simplify_gen_subreg (QImode, operands[1], HImode, s);
operands[5] = simplify_gen_subreg (QImode, operands[2], HImode, s);
operands[5] = GEN_INT (INTVAL (operands[5]) | ~(HOST_WIDE_INT)0xff);
}
")
operands[5] = GEN_INT (INTVAL (operands[5]) | ~ (HOST_WIDE_INT) 0xff);
})
;; Inclusive OR, 16-bit integers
(define_insn "iorhi3"
......@@ -594,13 +595,12 @@
[(set (match_dup 3)
(ior:QI (match_dup 4)
(match_dup 5)))]
"{ int s = ((INTVAL (operands[2]) & 0xff) == 0x00) ? 1 : 0;
{ int s = ((INTVAL (operands[2]) & 0xff) == 0x00) ? 1 : 0;
operands[3] = simplify_gen_subreg (QImode, operands[0], HImode, s);
operands[4] = simplify_gen_subreg (QImode, operands[1], HImode, s);
operands[5] = simplify_gen_subreg (QImode, operands[2], HImode, s);
operands[5] = GEN_INT (INTVAL (operands[5]) & 0xff);
}
")
})
;; Exclusive OR, 16-bit integers
(define_insn "xorhi3"
......@@ -621,7 +621,6 @@
""
"not %0")
;; ::::::::::::::::::::
;; ::
;; :: 32-bit Integer arithmetic
......@@ -638,8 +637,10 @@
"#"
"reload_completed"
[(pc)]
"{ xstormy16_expand_arith (SImode, PLUS, operands[0], operands[1],
operands[2]); DONE; } "
{ xstormy16_expand_arith (SImode, PLUS, operands[0], operands[1],
operands[2]);
DONE;
}
[(set_attr "length" "4")])
;; Subtraction
......@@ -652,8 +653,10 @@
"#"
"reload_completed"
[(pc)]
"{ xstormy16_expand_arith (SImode, MINUS, operands[0], operands[1],
operands[2]); DONE; } "
{ xstormy16_expand_arith (SImode, MINUS, operands[0], operands[1],
operands[2]);
DONE;
}
[(set_attr "length" "4")])
(define_expand "negsi2"
......@@ -661,7 +664,7 @@
(neg:SI (match_operand:SI 1 "register_operand" "")))
(clobber (reg:BI CARRY_REG))])]
""
"{ operands[2] = gen_reg_rtx (HImode); }")
{ operands[2] = gen_reg_rtx (HImode); })
(define_insn_and_split "*negsi2_internal"
[(set (match_operand:SI 0 "register_operand" "=&r")
......@@ -671,8 +674,10 @@
"#"
"reload_completed"
[(pc)]
"{ xstormy16_expand_arith (SImode, NEG, operands[0], operands[0],
operands[1]); DONE; }")
{ xstormy16_expand_arith (SImode, NEG, operands[0], operands[0],
operands[1]);
DONE;
})
;; ::::::::::::::::::::
;; ::
......@@ -688,9 +693,10 @@
(clobber (reg:BI CARRY_REG))
(clobber (match_dup 3))])]
""
" if (! const_int_operand (operands[2], SImode))
{ if (! const_int_operand (operands[2], SImode))
FAIL;
operands[3] = gen_reg_rtx (HImode); ")
operands[3] = gen_reg_rtx (HImode);
})
;; Arithmetic Shift Right
(define_expand "ashrsi3"
......@@ -700,9 +706,10 @@
(clobber (reg:BI CARRY_REG))
(clobber (match_dup 3))])]
""
" if (! const_int_operand (operands[2], SImode))
{ if (! const_int_operand (operands[2], SImode))
FAIL;
operands[3] = gen_reg_rtx (HImode); ")
operands[3] = gen_reg_rtx (HImode);
})
;; Logical Shift Right
(define_expand "lshrsi3"
......@@ -712,9 +719,10 @@
(clobber (reg:BI CARRY_REG))
(clobber (match_dup 3))])]
""
" if (! const_int_operand (operands[2], SImode))
{ if (! const_int_operand (operands[2], SImode))
FAIL;
operands[3] = gen_reg_rtx (HImode); ")
operands[3] = gen_reg_rtx (HImode);
})
(define_insn "*shiftsi"
[(set (match_operand:SI 0 "register_operand" "=r,r")
......@@ -729,7 +737,6 @@
[(set_attr "length" "6,10")
(set_attr "psw_operand" "clobber,clobber")])
;; ::::::::::::::::::::
;; ::
;; :: Comparisons
......@@ -745,12 +752,11 @@
(compare (match_operand:HI 0 "register_operand" "")
(match_operand:HI 1 "nonmemory_operand" "")))]
""
"
{
{
xstormy16_compare_op0 = operands[0];
xstormy16_compare_op1 = operands[1];
DONE;
}")
})
; There are no real SImode comparisons, but some can be emulated
; by performing a SImode subtract and looking at the condition flags.
......@@ -759,13 +765,11 @@
(compare (match_operand:SI 0 "register_operand" "")
(match_operand:SI 1 "nonmemory_operand" "")))]
""
"
{
{
xstormy16_compare_op0 = operands[0];
xstormy16_compare_op1 = operands[1];
DONE;
}")
})
;; ::::::::::::::::::::
;; ::
......@@ -776,53 +780,52 @@
(define_expand "beq"
[(use (match_operand 0 "" ""))]
""
"{ xstormy16_emit_cbranch (EQ, operands[0]); DONE; }")
{ xstormy16_emit_cbranch (EQ, operands[0]); DONE; })
(define_expand "bne"
[(use (match_operand 0 "" ""))]
""
"{ xstormy16_emit_cbranch (NE, operands[0]); DONE; }")
{ xstormy16_emit_cbranch (NE, operands[0]); DONE; })
(define_expand "bge"
[(use (match_operand 0 "" ""))]
""
"{ xstormy16_emit_cbranch (GE, operands[0]); DONE; }")
{ xstormy16_emit_cbranch (GE, operands[0]); DONE; })
(define_expand "bgt"
[(use (match_operand 0 "" ""))]
""
"{ xstormy16_emit_cbranch (GT, operands[0]); DONE; }")
{ xstormy16_emit_cbranch (GT, operands[0]); DONE; })
(define_expand "ble"
[(use (match_operand 0 "" ""))]
""
"{ xstormy16_emit_cbranch (LE, operands[0]); DONE; }")
{ xstormy16_emit_cbranch (LE, operands[0]); DONE; })
(define_expand "blt"
[(use (match_operand 0 "" ""))]
""
"{ xstormy16_emit_cbranch (LT, operands[0]); DONE; }")
{ xstormy16_emit_cbranch (LT, operands[0]); DONE; })
(define_expand "bgeu"
[(use (match_operand 0 "" ""))]
""
"{ xstormy16_emit_cbranch (GEU, operands[0]); DONE; }")
{ xstormy16_emit_cbranch (GEU, operands[0]); DONE; })
(define_expand "bgtu"
[(use (match_operand 0 "" ""))]
""
"{ xstormy16_emit_cbranch (GTU, operands[0]); DONE; }")
{ xstormy16_emit_cbranch (GTU, operands[0]); DONE; })
(define_expand "bleu"
[(use (match_operand 0 "" ""))]
""
"{ xstormy16_emit_cbranch (LEU, operands[0]); DONE; }")
{ xstormy16_emit_cbranch (LEU, operands[0]); DONE; })
(define_expand "bltu"
[(use (match_operand 0 "" ""))]
""
"{ xstormy16_emit_cbranch (LTU, operands[0]); DONE; }")
{ xstormy16_emit_cbranch (LTU, operands[0]); DONE; })
(define_insn "cbranchhi"
[(set (pc)
......@@ -892,7 +895,7 @@
"#"
"reload_completed"
[(pc)]
"{ xstormy16_split_cbranch (SImode, operands[0], operands[1], operands[2]); DONE; }"
{ xstormy16_split_cbranch (SImode, operands[0], operands[1], operands[2]); DONE; }
[(set_attr "length" "8")])
(define_insn "*ineqbranch_1"
......@@ -915,7 +918,6 @@
[(set_attr "branch_class" "bcc8p2,bcc8p2,bcc8p4")
(set_attr "psw_operand" "2,2,2")])
;; ::::::::::::::::::::
;; ::
;; :: Call and branch instructions
......@@ -1046,7 +1048,6 @@
"br %0"
[(set_attr "psw_operand" "nop")])
;; ::::::::::::::::::::
;; ::
;; :: Prologue and Epilogue instructions
......@@ -1063,11 +1064,10 @@
(define_expand "prologue"
[(const_int 1)]
""
"
{
{
xstormy16_expand_prologue ();
DONE;
}")
})
;; Called after register allocation to add any instructions needed for
;; the epilogue. Using an epilogue insn is favored compared to putting
......@@ -1079,12 +1079,10 @@
(define_expand "epilogue"
[(const_int 2)]
""
"
{
{
xstormy16_expand_epilogue ();
DONE;
}")
})
;; ::::::::::::::::::::
;; ::
......@@ -1115,11 +1113,10 @@
(match_operand:QI 1 "xstormy16_below100_or_register" "")
(match_operand:QI 2 "nonmemory_operand" "")]
""
"
{
{
xstormy16_expand_iorqi3 (operands);
DONE;
}")
})
(define_insn "iorqi3_internal"
[(set (match_operand:QI 0 "xstormy16_below100_or_register" "=Wr")
......@@ -1155,11 +1152,10 @@
(match_operand:QI 1 "xstormy16_below100_or_register" "")
(match_operand:QI 2 "nonmemory_operand" "")]
""
"
{
{
xstormy16_expand_andqi3 (operands);
DONE;
}")
})
(define_insn "andqi3_internal"
[(set (match_operand:QI 0 "xstormy16_below100_or_register" "=Wr")
......
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