Commit 1a63219b by Kazu Hirata Committed by Jeff Law

h8300.c: Fix formatting.

        * h8300.c: Fix formatting.
        * h8300.h: Likewise.
        * h8300.md: Likewise.
        (movsi_h8300hs): Fix formatting of the resulting assembly code.

From-SVN: r35575
parent 1d7254c5
2000-08-08 Kazu Hirata <kazu@hxi.com> 2000-08-08 Kazu Hirata <kazu@hxi.com>
* h8300.c: Fix formatting.
* h8300.h: Likewise.
* h8300.md: Likewise.
(movsi_h8300hs): Fix formatting of the resulting assembly code.
* reload1.c: Fix formatting. * reload1.c: Fix formatting.
2000-08-08 Rodney Brown <RodneyBrown@mynd.com> 2000-08-08 Rodney Brown <RodneyBrown@mynd.com>
......
...@@ -167,7 +167,7 @@ dosize (file, op, size) ...@@ -167,7 +167,7 @@ dosize (file, op, size)
amount > 0; amount > 0;
amount /= 2) amount /= 2)
{ {
for(; size >= amount; size -= amount) for (; size >= amount; size -= amount)
fprintf (file, "\t%ss\t#%d,sp\n", op, amount); fprintf (file, "\t%ss\t#%d,sp\n", op, amount);
} }
} }
...@@ -612,7 +612,7 @@ split_adds_subs (mode, operands) ...@@ -612,7 +612,7 @@ split_adds_subs (mode, operands)
amount > 0; amount > 0;
amount /= 2) amount /= 2)
{ {
for(; val >= amount; val -= amount) for (; val >= amount; val -= amount)
{ {
rtx tmp = gen_rtx_PLUS (mode, reg, GEN_INT (sign * amount)); rtx tmp = gen_rtx_PLUS (mode, reg, GEN_INT (sign * amount));
emit_insn (gen_rtx_SET (VOIDmode, reg, tmp)); emit_insn (gen_rtx_SET (VOIDmode, reg, tmp));
...@@ -1773,16 +1773,16 @@ enum shift_alg ...@@ -1773,16 +1773,16 @@ enum shift_alg
/* Symbols of the various shifts which can be used as indices. */ /* Symbols of the various shifts which can be used as indices. */
enum shift_type enum shift_type
{ {
SHIFT_ASHIFT, SHIFT_LSHIFTRT, SHIFT_ASHIFTRT SHIFT_ASHIFT, SHIFT_LSHIFTRT, SHIFT_ASHIFTRT
}; };
/* Symbols of the various modes which can be used as indices. */ /* Symbols of the various modes which can be used as indices. */
enum shift_mode enum shift_mode
{ {
QIshift, HIshift, SIshift QIshift, HIshift, SIshift
}; };
/* For single bit shift insns, record assembler and what bits of the /* For single bit shift insns, record assembler and what bits of the
condition code are valid afterwards (represented as various CC_FOO condition code are valid afterwards (represented as various CC_FOO
...@@ -2680,7 +2680,8 @@ fix_bit_operand (operands, what, type) ...@@ -2680,7 +2680,8 @@ fix_bit_operand (operands, what, type)
if (CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), what)) if (CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), what))
{ {
/* Ok to have a memory dest. */ /* Ok to have a memory dest. */
if (GET_CODE (operands[0]) == MEM && !EXTRA_CONSTRAINT (operands[0], 'U')) if (GET_CODE (operands[0]) == MEM
&& !EXTRA_CONSTRAINT (operands[0], 'U'))
{ {
rtx mem = gen_rtx_MEM (GET_MODE (operands[0]), rtx mem = gen_rtx_MEM (GET_MODE (operands[0]),
copy_to_mode_reg (Pmode, copy_to_mode_reg (Pmode,
...@@ -2689,7 +2690,8 @@ fix_bit_operand (operands, what, type) ...@@ -2689,7 +2690,8 @@ fix_bit_operand (operands, what, type)
operands[0] = mem; operands[0] = mem;
} }
if (GET_CODE (operands[1]) == MEM && !EXTRA_CONSTRAINT (operands[1], 'U')) if (GET_CODE (operands[1]) == MEM
&& !EXTRA_CONSTRAINT (operands[1], 'U'))
{ {
rtx mem = gen_rtx_MEM (GET_MODE (operands[1]), rtx mem = gen_rtx_MEM (GET_MODE (operands[1]),
copy_to_mode_reg (Pmode, copy_to_mode_reg (Pmode,
......
...@@ -410,27 +410,27 @@ enum reg_class { ...@@ -410,27 +410,27 @@ enum reg_class {
#define CONST_OK_FOR_I(VALUE) ((VALUE) == 0) #define CONST_OK_FOR_I(VALUE) ((VALUE) == 0)
#define CONST_OK_FOR_J(VALUE) ((unsigned HOST_WIDE_INT) (VALUE) < 256) #define CONST_OK_FOR_J(VALUE) ((unsigned HOST_WIDE_INT) (VALUE) < 256)
#define CONST_OK_FOR_K(VALUE) ((VALUE) == 1 || (VALUE) == 2) #define CONST_OK_FOR_K(VALUE) ((VALUE) == 1 || (VALUE) == 2)
#define CONST_OK_FOR_L(VALUE) \ #define CONST_OK_FOR_L(VALUE) \
(TARGET_H8300H || TARGET_H8300S \ (TARGET_H8300H || TARGET_H8300S \
? (VALUE) == 1 || (VALUE) == 2 || (VALUE) == 4 \ ? (VALUE) == 1 || (VALUE) == 2 || (VALUE) == 4 \
: (VALUE) == 1 || (VALUE) == 2) : (VALUE) == 1 || (VALUE) == 2)
#define CONST_OK_FOR_M(VALUE) ((VALUE) == 3 || (VALUE) == 4) #define CONST_OK_FOR_M(VALUE) ((VALUE) == 3 || (VALUE) == 4)
#define CONST_OK_FOR_N(VALUE) \ #define CONST_OK_FOR_N(VALUE) \
(TARGET_H8300H || TARGET_H8300S \ (TARGET_H8300H || TARGET_H8300S \
? (VALUE) == -1 || (VALUE) == -2 || (VALUE) == -4 \ ? (VALUE) == -1 || (VALUE) == -2 || (VALUE) == -4 \
: (VALUE) == -1 || (VALUE) == -2) : (VALUE) == -1 || (VALUE) == -2)
#define CONST_OK_FOR_O(VALUE) (ok_for_bclr (VALUE)) #define CONST_OK_FOR_O(VALUE) (ok_for_bclr (VALUE))
#define CONST_OK_FOR_P(VALUE) (small_power_of_two (VALUE)) #define CONST_OK_FOR_P(VALUE) (small_power_of_two (VALUE))
#define CONST_OK_FOR_LETTER_P(VALUE, C) \ #define CONST_OK_FOR_LETTER_P(VALUE, C) \
((C) == 'I' ? CONST_OK_FOR_I (VALUE) : \ ((C) == 'I' ? CONST_OK_FOR_I (VALUE) : \
(C) == 'J' ? CONST_OK_FOR_J (VALUE) : \ (C) == 'J' ? CONST_OK_FOR_J (VALUE) : \
(C) == 'K' ? CONST_OK_FOR_K (VALUE) : \ (C) == 'K' ? CONST_OK_FOR_K (VALUE) : \
(C) == 'L' ? CONST_OK_FOR_L (VALUE) : \ (C) == 'L' ? CONST_OK_FOR_L (VALUE) : \
(C) == 'M' ? CONST_OK_FOR_M (VALUE) : \ (C) == 'M' ? CONST_OK_FOR_M (VALUE) : \
(C) == 'N' ? CONST_OK_FOR_N (VALUE) : \ (C) == 'N' ? CONST_OK_FOR_N (VALUE) : \
(C) == 'O' ? CONST_OK_FOR_O (VALUE) : \ (C) == 'O' ? CONST_OK_FOR_O (VALUE) : \
(C) == 'P' ? CONST_OK_FOR_P (VALUE) : \ (C) == 'P' ? CONST_OK_FOR_P (VALUE) : \
0) 0)
/* Similar, but for floating constants, and defining letters G and H. /* Similar, but for floating constants, and defining letters G and H.
...@@ -438,7 +438,7 @@ enum reg_class { ...@@ -438,7 +438,7 @@ enum reg_class {
`G' is a floating-point zero. */ `G' is a floating-point zero. */
#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
((C) == 'G' ? (VALUE) == CONST0_RTX (DFmode) \ ((C) == 'G' ? (VALUE) == CONST0_RTX (DFmode) \
: 0) : 0)
...@@ -629,8 +629,8 @@ struct cum_arg ...@@ -629,8 +629,8 @@ struct cum_arg
of mode MODE and data type TYPE. of mode MODE and data type TYPE.
(TYPE is null for libcalls where that information may not be available.) */ (TYPE is null for libcalls where that information may not be available.) */
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
((CUM).nbytes += ((MODE) != BLKmode \ ((CUM).nbytes += ((MODE) != BLKmode \
? (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) & -UNITS_PER_WORD \ ? (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) & -UNITS_PER_WORD \
: (int_size_in_bytes (TYPE) + UNITS_PER_WORD - 1) & -UNITS_PER_WORD)) : (int_size_in_bytes (TYPE) + UNITS_PER_WORD - 1) & -UNITS_PER_WORD))
...@@ -734,7 +734,7 @@ struct cum_arg ...@@ -734,7 +734,7 @@ struct cum_arg
else \ else \
{ \ { \
fprintf (FILE, "\tmov.l #0x12345678,er3\n"); \ fprintf (FILE, "\tmov.l #0x12345678,er3\n"); \
fprintf (FILE, "\tjmp @0x123456\n"); \ fprintf (FILE, "\tjmp @0x123456\n"); \
} \ } \
} while (0) } while (0)
...@@ -783,7 +783,7 @@ struct cum_arg ...@@ -783,7 +783,7 @@ struct cum_arg
/* 1 if X is an rtx for a constant that is a valid address. */ /* 1 if X is an rtx for a constant that is a valid address. */
#define CONSTANT_ADDRESS_P(X) \ #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| (GET_CODE (X) == CONST_INT \ || (GET_CODE (X) == CONST_INT \
/* We handle signed and unsigned offsets here. */ \ /* We handle signed and unsigned offsets here. */ \
...@@ -1021,18 +1021,18 @@ h8300_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS) ...@@ -1021,18 +1021,18 @@ h8300_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
switch on CODE. */ switch on CODE. */
/* ??? Shifts need to have a *much* higher cost than this. */ /* ??? Shifts need to have a *much* higher cost than this. */
#define RTX_COSTS(RTX,CODE,OUTER_CODE) \ #define RTX_COSTS(RTX,CODE,OUTER_CODE) \
case MOD: \ case MOD: \
case DIV: \ case DIV: \
return 60; \ return 60; \
case MULT: \ case MULT: \
return 20; \ return 20; \
case ASHIFT: \ case ASHIFT: \
case ASHIFTRT: \ case ASHIFTRT: \
case LSHIFTRT: \ case LSHIFTRT: \
case ROTATE: \ case ROTATE: \
case ROTATERT: \ case ROTATERT: \
if (GET_MODE (RTX) == HImode) return 2; \ if (GET_MODE (RTX) == HImode) return 2; \
return 8; return 8;
/* Tell final.c how to eliminate redundant test instructions. */ /* Tell final.c how to eliminate redundant test instructions. */
...@@ -1336,14 +1336,14 @@ do { char dstr[30]; \ ...@@ -1336,14 +1336,14 @@ do { char dstr[30]; \
that says to advance the location counter that says to advance the location counter
to a multiple of 2**LOG bytes. */ to a multiple of 2**LOG bytes. */
#define ASM_OUTPUT_ALIGN(FILE,LOG) \ #define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG) != 0) \ if ((LOG) != 0) \
fprintf (FILE, "\t.align %d\n", (LOG)) fprintf (FILE, "\t.align %d\n", (LOG))
/* This is how to output an assembler line /* This is how to output an assembler line
that says to advance the location counter by SIZE bytes. */ that says to advance the location counter by SIZE bytes. */
#define ASM_OUTPUT_IDENT(FILE, NAME) \ #define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf(FILE, "%s\t \"%s\"\n", IDENT_ASM_OP, NAME) fprintf(FILE, "%s\t \"%s\"\n", IDENT_ASM_OP, NAME)
#define ASM_OUTPUT_SKIP(FILE, SIZE) \ #define ASM_OUTPUT_SKIP(FILE, SIZE) \
...@@ -1352,16 +1352,16 @@ do { char dstr[30]; \ ...@@ -1352,16 +1352,16 @@ do { char dstr[30]; \
/* This says how to output an assembler line /* This says how to output an assembler line
to define a global common symbol. */ to define a global common symbol. */
#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
( fputs ("\t.comm ", (FILE)), \ ( fputs ("\t.comm ", (FILE)), \
assemble_name ((FILE), (NAME)), \ assemble_name ((FILE), (NAME)), \
fprintf ((FILE), ",%d\n", (SIZE))) fprintf ((FILE), ",%d\n", (SIZE)))
/* This says how to output the assembler to define a global /* This says how to output the assembler to define a global
uninitialized but not common symbol. uninitialized but not common symbol.
Try to use asm_output_bss to implement this macro. */ Try to use asm_output_bss to implement this macro. */
#define ASM_OUTPUT_BSS(FILE, DECL, NAME, SIZE, ROUNDED) \ #define ASM_OUTPUT_BSS(FILE, DECL, NAME, SIZE, ROUNDED) \
asm_output_bss ((FILE), (DECL), (NAME), (SIZE), (ROUNDED)) asm_output_bss ((FILE), (DECL), (NAME), (SIZE), (ROUNDED))
/* This says how to output an assembler line /* This says how to output an assembler line
...@@ -1437,18 +1437,18 @@ do { char dstr[30]; \ ...@@ -1437,18 +1437,18 @@ do { char dstr[30]; \
/* Perform target dependent optabs initialization. */ /* Perform target dependent optabs initialization. */
#define INIT_TARGET_OPTABS \ #define INIT_TARGET_OPTABS \
do { \ do { \
smul_optab->handlers[(int) HImode].libfunc \ smul_optab->handlers[(int) HImode].libfunc \
= init_one_libfunc (MULHI3_LIBCALL); \ = init_one_libfunc (MULHI3_LIBCALL); \
sdiv_optab->handlers[(int) HImode].libfunc \ sdiv_optab->handlers[(int) HImode].libfunc \
= init_one_libfunc (DIVHI3_LIBCALL); \ = init_one_libfunc (DIVHI3_LIBCALL); \
udiv_optab->handlers[(int) HImode].libfunc \ udiv_optab->handlers[(int) HImode].libfunc \
= init_one_libfunc (UDIVHI3_LIBCALL); \ = init_one_libfunc (UDIVHI3_LIBCALL); \
smod_optab->handlers[(int) HImode].libfunc \ smod_optab->handlers[(int) HImode].libfunc \
= init_one_libfunc (MODHI3_LIBCALL); \ = init_one_libfunc (MODHI3_LIBCALL); \
umod_optab->handlers[(int) HImode].libfunc \ umod_optab->handlers[(int) HImode].libfunc \
= init_one_libfunc (UMODHI3_LIBCALL); \ = init_one_libfunc (UMODHI3_LIBCALL); \
} while (0) } while (0)
#define MOVE_RATIO 3 #define MOVE_RATIO 3
...@@ -144,11 +144,11 @@ ...@@ -144,11 +144,11 @@
"" ""
" "
{ {
/* One of the ops has to be in a register */ /* One of the ops has to be in a register. */
if (!register_operand(operand0, QImode) if (!register_operand (operand0, QImode)
&& !register_operand(operand1, QImode)) && !register_operand (operand1, QImode))
{ {
operands[1] = copy_to_mode_reg(QImode, operand1); operands[1] = copy_to_mode_reg (QImode, operand1);
} }
}") }")
...@@ -208,11 +208,11 @@ ...@@ -208,11 +208,11 @@
"" ""
" "
{ {
/* One of the ops has to be in a register */ /* One of the ops has to be in a register. */
if (!register_operand(operand1, HImode) if (!register_operand (operand1, HImode)
&& !register_operand(operand0, HImode)) && !register_operand (operand0, HImode))
{ {
operands[1] = copy_to_mode_reg(HImode, operand1); operands[1] = copy_to_mode_reg (HImode, operand1);
} }
}") }")
...@@ -426,13 +426,13 @@ ...@@ -426,13 +426,13 @@
if (val == (val & 0xff)) if (val == (val & 0xff))
{ {
operands[1] = GEN_INT ((char) val & 0xff); operands[1] = GEN_INT ((char) val & 0xff);
return \"sub.l %S0,%S0\;add.b %1,%w0\"; return \"sub.l\\t%S0,%S0\;add.b\\t%1,%w0\";
} }
if (val == (val & 0xff00)) if (val == (val & 0xff00))
{ {
operands[1] = GEN_INT ((char) (val >> 8) & 0xff); operands[1] = GEN_INT ((char) (val >> 8) & 0xff);
return \"sub.l %S0,%S0\;add.b %1,%x0\"; return \"sub.l\\t%S0,%S0\;add.b\\t%1,%x0\";
} }
/* Now look for small negative numbers. We can subtract them /* Now look for small negative numbers. We can subtract them
...@@ -440,7 +440,7 @@ ...@@ -440,7 +440,7 @@
if (val == -4 || val == -2 || val == -1) if (val == -4 || val == -2 || val == -1)
{ {
operands[1] = GEN_INT (-INTVAL (operands[1])); operands[1] = GEN_INT (-INTVAL (operands[1]));
return \"sub.l %S0,%S0\;subs %1,%S0\"; return \"sub.l\\t%S0,%S0\;subs\\t%1,%S0\";
} }
} }
} }
...@@ -2257,4 +2257,3 @@ ...@@ -2257,4 +2257,3 @@
"mov.w %T0,@-%T1" "mov.w %T0,@-%T1"
[(set_attr "length" "2") [(set_attr "length" "2")
(set_attr "cc" "set_znv")]) (set_attr "cc" "set_znv")])
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