Commit 07e4d94e by Kazu Hirata Committed by Jeff Law

h8300-proto.h: Fix formatting.

        * h8300-proto.h: Fix formatting.
        * h8300.c: Likewise.
        * h8300.h: Likewise.

From-SVN: r34882
parent 768ff52f
2000-07-05 Kazu Hirata <kazu@hxi.com>
* h8300-proto.h: Fix formatting.
* h8300.c: Likewise.
* h8300.h: Likewise.
2000-07-05 Jim Wilson <wilson@cygnus.com> 2000-07-05 Jim Wilson <wilson@cygnus.com>
* config/ia64/ia64.h (HARD_REGNO_MODE_OK): If FR_REGNO_P, disallow * config/ia64/ia64.h (HARD_REGNO_MODE_OK): If FR_REGNO_P, disallow
......
...@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
#ifdef RTX_CODE #ifdef RTX_CODE
extern const char *emit_a_shift PARAMS ((rtx, rtx *)); extern const char *emit_a_shift PARAMS ((rtx, rtx *));
extern const char *output_adds_subs PARAMS ((rtx *)); extern const char *output_adds_subs PARAMS ((rtx *));
extern const char * output_simode_bld PARAMS ((int, int, rtx[])); extern const char *output_simode_bld PARAMS ((int, int, rtx[]));
extern void print_operand_address PARAMS ((FILE *, rtx)); extern void print_operand_address PARAMS ((FILE *, rtx));
extern const char *byte_reg PARAMS ((rtx, int)); extern const char *byte_reg PARAMS ((rtx, int));
extern int const_costs PARAMS ((rtx, enum rtx_code)); extern int const_costs PARAMS ((rtx, enum rtx_code));
......
...@@ -67,13 +67,13 @@ int monitor; ...@@ -67,13 +67,13 @@ int monitor;
int pragma_saveall; int pragma_saveall;
static const char *const names_big[] = static const char *const names_big[] =
{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7"}; { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7" };
static const char *const names_extended[] = static const char *const names_extended[] =
{"er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7"}; { "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7" };
static const char *const names_upper_extended[] = static const char *const names_upper_extended[] =
{"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7"}; { "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7" };
/* Points to one of the above. */ /* Points to one of the above. */
/* ??? The above could be put in an array indexed by CPU_TYPE. */ /* ??? The above could be put in an array indexed by CPU_TYPE. */
...@@ -81,9 +81,9 @@ const char * const *h8_reg_names; ...@@ -81,9 +81,9 @@ const char * const *h8_reg_names;
/* Various operations needed by the following, indexed by CPU_TYPE. */ /* Various operations needed by the following, indexed by CPU_TYPE. */
static const char *const h8_push_ops[2] = {"push", "push.l"}; static const char *const h8_push_ops[2] = { "push", "push.l" };
static const char *const h8_pop_ops[2] = {"pop", "pop.l"}; static const char *const h8_pop_ops[2] = { "pop", "pop.l" };
static const char *const h8_mov_ops[2] = {"mov.w", "mov.l"}; static const char *const h8_mov_ops[2] = { "mov.w", "mov.l" };
const char *h8_push_op, *h8_pop_op, *h8_mov_op; const char *h8_push_op, *h8_pop_op, *h8_mov_op;
...@@ -124,7 +124,7 @@ byte_reg (x, b) ...@@ -124,7 +124,7 @@ byte_reg (x, b)
#define WORD_REG_USED(regno) \ #define WORD_REG_USED(regno) \
(regno < 7 \ (regno < 7 \
/* No need to save registers if this function will not return.*/\ /* No need to save registers if this function will not return. */\
&& ! TREE_THIS_VOLATILE (current_function_decl) \ && ! TREE_THIS_VOLATILE (current_function_decl) \
&& (pragma_saveall \ && (pragma_saveall \
/* Save any call saved register that was used. */ \ /* Save any call saved register that was used. */ \
...@@ -153,7 +153,7 @@ dosize (file, op, size) ...@@ -153,7 +153,7 @@ dosize (file, op, size)
with an immediate value. */ with an immediate value. */
if (size > 4 && size <= 8 && (TARGET_H8300H || TARGET_H8300S)) if (size > 4 && size <= 8 && (TARGET_H8300H || TARGET_H8300S))
{ {
/* Crank the size down to <= 4 */ /* Crank the size down to <= 4. */
fprintf (file, "\t%ss\t#%d,sp\n", op, 4); fprintf (file, "\t%ss\t#%d,sp\n", op, 4);
size -= 4; size -= 4;
} }
...@@ -210,9 +210,9 @@ dosize (file, op, size) ...@@ -210,9 +210,9 @@ dosize (file, op, size)
/* Output assembly language code for the function prologue. */ /* Output assembly language code for the function prologue. */
static int push_order[FIRST_PSEUDO_REGISTER] = static int push_order[FIRST_PSEUDO_REGISTER] =
{0, 1, 2, 3, 4, 5, 6, -1, -1, -1}; { 0, 1, 2, 3, 4, 5, 6, -1, -1, -1 };
static int pop_order[FIRST_PSEUDO_REGISTER] = static int pop_order[FIRST_PSEUDO_REGISTER] =
{6, 5, 4, 3, 2, 1, 0, -1, -1, -1}; { 6, 5, 4, 3, 2, 1, 0, -1, -1, -1 };
/* This is what the stack looks like after the prolog of /* This is what the stack looks like after the prolog of
a function with a frame has been set up: a function with a frame has been set up:
...@@ -281,7 +281,7 @@ function_prologue (file, size) ...@@ -281,7 +281,7 @@ function_prologue (file, size)
if (frame_pointer_needed) if (frame_pointer_needed)
{ {
/* Push fp */ /* Push fp. */
fprintf (file, "\t%s\t%s\n", h8_push_op, fprintf (file, "\t%s\t%s\n", h8_push_op,
h8_reg_names[FRAME_POINTER_REGNUM]); h8_reg_names[FRAME_POINTER_REGNUM]);
fprintf (file, "\t%s\t%s,%s\n", h8_mov_op, fprintf (file, "\t%s\t%s,%s\n", h8_mov_op,
...@@ -289,10 +289,10 @@ function_prologue (file, size) ...@@ -289,10 +289,10 @@ function_prologue (file, size)
h8_reg_names[FRAME_POINTER_REGNUM]); h8_reg_names[FRAME_POINTER_REGNUM]);
} }
/* leave room for locals */ /* Leave room for locals. */
dosize (file, "sub", fsize); dosize (file, "sub", fsize);
/* Push the rest of the registers */ /* Push the rest of the registers. */
for (idx = 0; idx < FIRST_PSEUDO_REGISTER; idx++) for (idx = 0; idx < FIRST_PSEUDO_REGISTER; idx++)
{ {
int regno = push_order[idx]; int regno = push_order[idx];
...@@ -393,10 +393,10 @@ function_epilogue (file, size) ...@@ -393,10 +393,10 @@ function_epilogue (file, size)
goto out; goto out;
} }
/* monitor epilogues are the same as interrupt function epilogues. /* Monitor epilogues are the same as interrupt function epilogues.
Just make a note that we're in an monitor epilogue. */ Just make a note that we're in an monitor epilogue. */
if (monitor) if (monitor)
fprintf(file, ";monitor epilogue\n"); fprintf (file, ";monitor epilogue\n");
/* If the last insn was a BARRIER, we don't have to write any code. */ /* If the last insn was a BARRIER, we don't have to write any code. */
if (GET_CODE (insn) == NOTE) if (GET_CODE (insn) == NOTE)
...@@ -484,12 +484,13 @@ function_epilogue (file, size) ...@@ -484,12 +484,13 @@ function_epilogue (file, size)
} }
} }
/* deallocate locals */ /* Deallocate locals. */
dosize (file, "add", fsize); dosize (file, "add", fsize);
/* pop frame pointer if we had one. */ /* Pop frame pointer if we had one. */
if (frame_pointer_needed) if (frame_pointer_needed)
fprintf (file, "\t%s\t%s\n", h8_pop_op, h8_reg_names[FRAME_POINTER_REGNUM]); fprintf (file, "\t%s\t%s\n",
h8_pop_op, h8_reg_names[FRAME_POINTER_REGNUM]);
/* If this is a monitor function, there is one register still left on /* If this is a monitor function, there is one register still left on
the stack. */ the stack. */
...@@ -501,7 +502,7 @@ function_epilogue (file, size) ...@@ -501,7 +502,7 @@ function_epilogue (file, size)
else else
fprintf (file, "\trts\n"); fprintf (file, "\trts\n");
out: out:
interrupt_handler = 0; interrupt_handler = 0;
os_task = 0; os_task = 0;
monitor = 0; monitor = 0;
...@@ -789,15 +790,11 @@ bit_operand (op, mode) ...@@ -789,15 +790,11 @@ bit_operand (op, mode)
if (GET_CODE (op) == SUBREG) if (GET_CODE (op) == SUBREG)
return 1; return 1;
if (!rtx_equal_function_value_matters) if (!rtx_equal_function_value_matters)
{ /* We're building rtl. */
/* We're building rtl */
return GET_CODE (op) == MEM; return GET_CODE (op) == MEM;
}
else else
{
return (GET_CODE (op) == MEM return (GET_CODE (op) == MEM
&& EXTRA_CONSTRAINT (op, 'U')); && EXTRA_CONSTRAINT (op, 'U'));
}
} }
int int
...@@ -1540,8 +1537,8 @@ do_movsi (operands) ...@@ -1540,8 +1537,8 @@ do_movsi (operands)
} }
/* Function for INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET). /* Function for INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET).
Define the offset between two registers, one to be eliminated, and the other Define the offset between two registers, one to be eliminated, and
its replacement, at the start of a routine. */ the other its replacement, at the start of a routine. */
int int
initial_offset (from, to) initial_offset (from, to)
...@@ -1622,7 +1619,7 @@ notice_update_cc (body, insn) ...@@ -1622,7 +1619,7 @@ notice_update_cc (body, insn)
} }
} }
/* Recognize valid operators for bit instructions */ /* Recognize valid operators for bit instructions. */
int int
bit_operator (x, mode) bit_operator (x, mode)
...@@ -1668,7 +1665,6 @@ bit_operator (x, mode) ...@@ -1668,7 +1665,6 @@ bit_operator (x, mode)
* There other oddballs. Not worth explaining. SHIFT_SPECIAL * There other oddballs. Not worth explaining. SHIFT_SPECIAL
Here are some thoughts on what the absolutely positively best code is. Here are some thoughts on what the absolutely positively best code is.
"Best" here means some rational trade-off between code size and speed, "Best" here means some rational trade-off between code size and speed,
where speed is more preferred but not at the expense of generating 20 insns. where speed is more preferred but not at the expense of generating 20 insns.
...@@ -1725,7 +1721,6 @@ bit_operator (x, mode) ...@@ -1725,7 +1721,6 @@ bit_operator (x, mode)
7 - ASHIFT | LSHIFTRT: rotate, mask off other bits 7 - ASHIFT | LSHIFTRT: rotate, mask off other bits
ASHIFTRT: shll, subx (propagate carry bit to all bits) ASHIFTRT: shll, subx (propagate carry bit to all bits)
H8/300H HImode shifts H8/300H HImode shifts
1-4 - do them inline 1-4 - do them inline
5-6 - loop 5-6 - loop
...@@ -1834,8 +1829,8 @@ expand_a_shift (mode, code, operands) ...@@ -1834,8 +1829,8 @@ expand_a_shift (mode, code, operands)
{ {
emit_move_insn (operands[0], operands[1]); emit_move_insn (operands[0], operands[1]);
/* need a loop to get all the bits we want - we generate the /* Need a loop to get all the bits we want - we generate the
code at emit time, but need to allocate a scratch reg now */ code at emit time, but need to allocate a scratch reg now. */
emit_insn (gen_rtx_PARALLEL emit_insn (gen_rtx_PARALLEL
(VOIDmode, (VOIDmode,
...@@ -1895,8 +1890,7 @@ struct shift_insn ...@@ -1895,8 +1890,7 @@ struct shift_insn
/* Assembler instruction shift table. /* Assembler instruction shift table.
These tables are used to look up the basic shifts. These tables are used to look up the basic shifts.
They are indexed by cpu, shift_type, and mode. They are indexed by cpu, shift_type, and mode. */
*/
static const struct shift_insn shift_one[2][3][3] = static const struct shift_insn shift_one[2][3][3] =
{ {
...@@ -2610,7 +2604,7 @@ emit_a_shift (insn, operands) ...@@ -2610,7 +2604,7 @@ emit_a_shift (insn, operands)
if (GET_CODE (operands[2]) != CONST_INT) if (GET_CODE (operands[2]) != CONST_INT)
{ {
/* Indexing by reg, so have to loop and test at top */ /* Indexing by reg, so have to loop and test at top. */
output_asm_insn ("mov.b %X2,%X4", operands); output_asm_insn ("mov.b %X2,%X4", operands);
fprintf (asm_out_file, "\tble .Lle%d\n", loopend_lab); fprintf (asm_out_file, "\tble .Lle%d\n", loopend_lab);
......
...@@ -31,7 +31,7 @@ extern int cpu_type; ...@@ -31,7 +31,7 @@ extern int cpu_type;
/* Various globals defined in h8300.c. */ /* Various globals defined in h8300.c. */
extern const char *h8_push_op,*h8_pop_op,*h8_mov_op; extern const char *h8_push_op, *h8_pop_op, *h8_mov_op;
extern const char * const *h8_reg_names; extern const char * const *h8_reg_names;
/* Names to predefine in the preprocessor for this target machine. */ /* Names to predefine in the preprocessor for this target machine. */
...@@ -604,7 +604,11 @@ enum reg_class { ...@@ -604,7 +604,11 @@ enum reg_class {
function if any. */ function if any. */
#define CUMULATIVE_ARGS struct cum_arg #define CUMULATIVE_ARGS struct cum_arg
struct cum_arg { int nbytes; struct rtx_def * libcall; }; struct cum_arg
{
int nbytes;
struct rtx_def *libcall;
};
/* Initialize a variable CUM of type CUMULATIVE_ARGS /* Initialize a variable CUM of type CUMULATIVE_ARGS
for a call to a function whose data type is FNTYPE. for a call to a function whose data type is FNTYPE.
...@@ -1073,7 +1077,7 @@ h8300_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS) ...@@ -1073,7 +1077,7 @@ h8300_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
#define EXTRA_SECTION_FUNCTIONS \ #define EXTRA_SECTION_FUNCTIONS \
\ \
void \ void \
ctors_section() \ ctors_section () \
{ \ { \
if (in_section != in_ctors) \ if (in_section != in_ctors) \
{ \ { \
...@@ -1083,7 +1087,7 @@ ctors_section() \ ...@@ -1083,7 +1087,7 @@ ctors_section() \
} \ } \
\ \
void \ void \
dtors_section() \ dtors_section () \
{ \ { \
if (in_section != in_dtors) \ if (in_section != in_dtors) \
{ \ { \
...@@ -1093,7 +1097,7 @@ dtors_section() \ ...@@ -1093,7 +1097,7 @@ dtors_section() \
} \ } \
\ \
void \ void \
readonly_data() \ readonly_data () \
{ \ { \
if (in_section != in_readonly_data) \ if (in_section != in_readonly_data) \
{ \ { \
...@@ -1102,8 +1106,6 @@ readonly_data() \ ...@@ -1102,8 +1106,6 @@ readonly_data() \
} \ } \
} }
#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
do { ctors_section(); \ do { ctors_section(); \
fprintf(FILE, "\t%s\t_%s\n", ASM_WORD_OP, NAME); } while (0) fprintf(FILE, "\t%s\t_%s\n", ASM_WORD_OP, NAME); } while (0)
...@@ -1251,7 +1253,6 @@ do { char dstr[30]; \ ...@@ -1251,7 +1253,6 @@ do { char dstr[30]; \
fprintf (FILE, "\t.double %s\n", dstr); \ fprintf (FILE, "\t.double %s\n", dstr); \
} while (0) } while (0)
/* This is how to output an assembler line defining a `float' constant. */ /* This is how to output an assembler line defining a `float' constant. */
#define ASM_OUTPUT_FLOAT(FILE, VALUE) \ #define ASM_OUTPUT_FLOAT(FILE, VALUE) \
do { char dstr[30]; \ do { char dstr[30]; \
...@@ -1424,4 +1425,3 @@ do { char dstr[30]; \ ...@@ -1424,4 +1425,3 @@ do { char dstr[30]; \
} while (0) } while (0)
#define MOVE_RATIO 3 #define MOVE_RATIO 3
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