Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
f27cd94d
Commit
f27cd94d
authored
Sep 21, 2000
by
Nick Clifton
Committed by
Nick Clifton
Sep 21, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compile time warnings
From-SVN: r36562
parent
1d5d6f3f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
141 additions
and
121 deletions
+141
-121
gcc/ChangeLog
+5
-0
gcc/config/mcore/mcore-protos.h
+67
-67
gcc/config/mcore/mcore.c
+69
-54
No files found.
gcc/ChangeLog
View file @
f27cd94d
2000-09-21 Nick Clifton <nickc@redhat.com>
* config/mcore/mcore.c: Fix compile time warnings.
* config/mcore/mcore-protos.h: Fix compile time warnings.
2000-09-20 J. David Anglin <dave@hiauly1.hia.nrc.ca>
2000-09-20 J. David Anglin <dave@hiauly1.hia.nrc.ca>
* configure.in: Correct test of gcc_cv_glibc.
* configure.in: Correct test of gcc_cv_glibc.
...
...
gcc/config/mcore/mcore-protos.h
View file @
f27cd94d
/* Prototypes for exported functions defined in mcore.c
/* Prototypes for exported functions defined in mcore.c
Copyright (C) 2000 Free Software Foundation, Inc.
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Nick Clifton (nickc@
cygnus
.com)
Contributed by Nick Clifton (nickc@
redhat
.com)
This file is part of GNU CC.
This file is part of GNU CC.
...
@@ -19,36 +19,36 @@ along with GNU CC; see the file COPYING. If not, write to
...
@@ -19,36 +19,36 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
Boston, MA 02111-1307, USA. */
extern
char
*
mcore_output_jump_label_table
PARAMS
((
void
));
extern
c
onst
c
har
*
mcore_output_jump_label_table
PARAMS
((
void
));
extern
void
mcore_expand_prolog
PARAMS
((
void
));
extern
void
mcore_expand_prolog
PARAMS
((
void
));
extern
void
mcore_expand_epilog
PARAMS
((
void
));
extern
void
mcore_expand_epilog
PARAMS
((
void
));
extern
int
mcore_const_ok_for_inline
PARAMS
((
long
));
extern
int
mcore_const_ok_for_inline
PARAMS
((
long
));
extern
int
mcore_num_ones
PARAMS
((
int
));
extern
int
mcore_num_ones
PARAMS
((
int
));
extern
int
mcore_num_zeros
PARAMS
((
int
));
extern
int
mcore_num_zeros
PARAMS
((
int
));
extern
int
mcore_initial_elimination_offset
PARAMS
((
int
,
int
));
extern
int
mcore_initial_elimination_offset
PARAMS
((
int
,
int
));
extern
int
mcore_byte_offset
PARAMS
((
unsigned
int
));
extern
int
mcore_byte_offset
PARAMS
((
unsigned
int
));
extern
int
mcore_halfword_offset
PARAMS
((
unsigned
int
));
extern
int
mcore_halfword_offset
PARAMS
((
unsigned
int
));
extern
int
mcore_const_trick_uses_not
PARAMS
((
long
));
extern
int
mcore_const_trick_uses_not
PARAMS
((
long
));
extern
void
mcore_override_options
PARAMS
((
void
));
extern
void
mcore_override_options
PARAMS
((
void
));
extern
int
mcore_dllexport_name_p
PARAMS
((
const
char
*
));
extern
int
mcore_dllexport_name_p
PARAMS
((
const
char
*
));
extern
int
mcore_dllimport_name_p
PARAMS
((
const
char
*
));
extern
int
mcore_dllimport_name_p
PARAMS
((
const
char
*
));
extern
int
mcore_naked_function_p
PARAMS
((
void
));
extern
int
mcore_naked_function_p
PARAMS
((
void
));
#ifdef TREE_CODE
#ifdef TREE_CODE
extern
void
mcore_unique_section
PARAMS
((
tree
,
int
));
extern
void
mcore_unique_section
PARAMS
((
tree
,
int
));
extern
void
mcore_encode_section_info
PARAMS
((
tree
));
extern
void
mcore_encode_section_info
PARAMS
((
tree
));
extern
int
mcore_valid_machine_decl_attribute
PARAMS
((
tree
,
tree
,
tree
,
tree
));
extern
int
mcore_valid_machine_decl_attribute
PARAMS
((
tree
,
tree
,
tree
,
tree
));
extern
tree
mcore_merge_machine_decl_attributes
PARAMS
((
tree
,
tree
));
extern
tree
mcore_merge_machine_decl_attributes
PARAMS
((
tree
,
tree
));
#ifdef HAVE_MACHINE_MODES
#ifdef HAVE_MACHINE_MODES
extern
int
mcore_function_arg_partial_nregs
PARAMS
((
CUMULATIVE_ARGS
,
enum
machine_mode
,
tree
,
int
));
extern
int
mcore_function_arg_partial_nregs
PARAMS
((
CUMULATIVE_ARGS
,
enum
machine_mode
,
tree
,
int
));
extern
void
mcore_setup_incoming_varargs
PARAMS
((
CUMULATIVE_ARGS
,
enum
machine_mode
,
tree
,
int
*
));
extern
void
mcore_setup_incoming_varargs
PARAMS
((
CUMULATIVE_ARGS
,
enum
machine_mode
,
tree
,
int
*
));
extern
int
mcore_num_arg_regs
PARAMS
((
enum
machine_mode
,
tree
));
extern
int
mcore_num_arg_regs
PARAMS
((
enum
machine_mode
,
tree
));
extern
int
mcore_must_pass_on_stack
PARAMS
((
enum
machine_mode
,
tree
));
extern
int
mcore_must_pass_on_stack
PARAMS
((
enum
machine_mode
,
tree
));
#endif
/* HAVE_MACHINE_MODES */
#endif
/* HAVE_MACHINE_MODES */
#ifdef RTX_CODE
#ifdef RTX_CODE
extern
rtx
mcore_function_value
PARAMS
((
tree
,
tree
));
extern
rtx
mcore_function_value
PARAMS
((
tree
,
tree
));
#endif
/* RTX_CODE */
#endif
/* RTX_CODE */
#endif
/* TREE_CODE */
#endif
/* TREE_CODE */
...
@@ -57,53 +57,53 @@ extern rtx mcore_function_value PARAMS ((tree, tree));
...
@@ -57,53 +57,53 @@ extern rtx mcore_function_value PARAMS ((tree, tree));
extern
rtx
arch_compare_op0
;
extern
rtx
arch_compare_op0
;
extern
rtx
arch_compare_op1
;
extern
rtx
arch_compare_op1
;
extern
c
har
*
mcore_output_bclri
PARAMS
((
rtx
,
int
));
extern
c
onst
char
*
mcore_output_bclri
PARAMS
((
rtx
,
int
));
extern
c
har
*
mcore_output_bseti
PARAMS
((
rtx
,
int
));
extern
c
onst
char
*
mcore_output_bseti
PARAMS
((
rtx
,
int
));
extern
c
har
*
mcore_output_cmov
PARAMS
((
rtx
*
,
int
,
char
*
));
extern
c
onst
char
*
mcore_output_cmov
PARAMS
((
rtx
*
,
int
,
char
*
));
extern
char
*
mcore_output_call
PARAMS
((
rtx
*
,
int
));
extern
char
*
mcore_output_call
PARAMS
((
rtx
*
,
int
));
extern
int
mcore_is_dead
PARAMS
((
rtx
,
rtx
));
extern
int
mcore_is_dead
PARAMS
((
rtx
,
rtx
));
extern
int
mcore_expand_insv
PARAMS
((
rtx
*
));
extern
int
mcore_expand_insv
PARAMS
((
rtx
*
));
extern
int
mcore_modify_comparison
PARAMS
((
RTX_CODE
));
extern
int
mcore_modify_comparison
PARAMS
((
RTX_CODE
));
extern
void
mcore_expand_block_move
PARAMS
((
rtx
,
rtx
,
rtx
*
));
extern
void
mcore_expand_block_move
PARAMS
((
rtx
,
rtx
,
rtx
*
));
extern
rtx
mcore_dependent_simplify_rtx
PARAMS
((
rtx
,
int
,
int
,
int
,
int
*
));
extern
rtx
mcore_dependent_simplify_rtx
PARAMS
((
rtx
,
int
,
int
,
int
,
int
*
));
extern
void
mcore_dependent_reorg
PARAMS
((
rtx
));
extern
void
mcore_dependent_reorg
PARAMS
((
rtx
));
extern
int
mcore_const_costs
PARAMS
((
rtx
,
RTX_CODE
));
extern
int
mcore_const_costs
PARAMS
((
rtx
,
RTX_CODE
));
extern
int
mcore_and_cost
PARAMS
((
rtx
));
extern
int
mcore_and_cost
PARAMS
((
rtx
));
extern
int
mcore_ior_cost
PARAMS
((
rtx
));
extern
int
mcore_ior_cost
PARAMS
((
rtx
));
extern
c
har
*
mcore_output_andn
PARAMS
((
rtx
,
rtx
*
));
extern
c
onst
char
*
mcore_output_andn
PARAMS
((
rtx
,
rtx
*
));
extern
void
mcore_print_operand_address
PARAMS
((
FILE
*
,
rtx
));
extern
void
mcore_print_operand_address
PARAMS
((
FILE
*
,
rtx
));
extern
void
mcore_print_operand
PARAMS
((
FILE
*
,
rtx
,
int
));
extern
void
mcore_print_operand
PARAMS
((
FILE
*
,
rtx
,
int
));
extern
rtx
mcore_gen_compare_reg
PARAMS
((
RTX_CODE
));
extern
rtx
mcore_gen_compare_reg
PARAMS
((
RTX_CODE
));
extern
int
mcore_symbolic_address_p
PARAMS
((
rtx
));
extern
int
mcore_symbolic_address_p
PARAMS
((
rtx
));
extern
enum
reg_class
mcore_reload_class
PARAMS
((
rtx
,
enum
reg_class
));
extern
enum
reg_class
mcore_reload_class
PARAMS
((
rtx
,
enum
reg_class
));
extern
int
mcore_is_same_reg
PARAMS
((
rtx
,
rtx
));
extern
int
mcore_is_same_reg
PARAMS
((
rtx
,
rtx
));
extern
int
mcore_arith_S_operand
PARAMS
((
rtx
));
extern
int
mcore_arith_S_operand
PARAMS
((
rtx
));
#ifdef HAVE_MACHINE_MODES
#ifdef HAVE_MACHINE_MODES
extern
c
har
*
mcore_output_move
PARAMS
((
rtx
,
rtx
*
,
enum
machine_mode
));
extern
c
onst
char
*
mcore_output_move
PARAMS
((
rtx
,
rtx
*
,
enum
machine_mode
));
extern
c
har
*
mcore_output_movedouble
PARAMS
((
rtx
*
,
enum
machine_mode
));
extern
c
onst
char
*
mcore_output_movedouble
PARAMS
((
rtx
*
,
enum
machine_mode
));
extern
char
*
mcore_output_inline_const_forced
PARAMS
((
rtx
,
rtx
*
,
enum
machine_mode
));
extern
c
onst
c
har
*
mcore_output_inline_const_forced
PARAMS
((
rtx
,
rtx
*
,
enum
machine_mode
));
extern
int
mcore_arith_reg_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_reg_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_general_movsrc_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_general_movsrc_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_general_movdst_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_general_movdst_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_reload_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_reload_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_J_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_J_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_K_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_K_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_K_operand_not_0
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_K_operand_not_0
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_M_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_M_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_K_S_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_K_S_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_imm_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_imm_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_any_imm_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_any_imm_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_O_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_arith_O_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_literal_K_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_literal_K_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_addsub_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_addsub_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_compare_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_compare_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_load_multiple_operation
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_load_multiple_operation
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_store_multiple_operation
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_store_multiple_operation
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_call_address_operand
PARAMS
((
rtx
,
enum
machine_mode
));
extern
int
mcore_call_address_operand
PARAMS
((
rtx
,
enum
machine_mode
));
#ifdef TREE_CODE
#ifdef TREE_CODE
extern
rtx
mcore_function_arg
PARAMS
((
CUMULATIVE_ARGS
,
enum
machine_mode
,
tree
,
int
));
extern
rtx
mcore_function_arg
PARAMS
((
CUMULATIVE_ARGS
,
enum
machine_mode
,
tree
,
int
));
#endif
/* TREE_CODE */
#endif
/* TREE_CODE */
#endif
/* HAVE_MACHINE_MODES */
#endif
/* HAVE_MACHINE_MODES */
#endif
/* RTX_CODE */
#endif
/* RTX_CODE */
gcc/config/mcore/mcore.c
View file @
f27cd94d
...
@@ -44,9 +44,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
...
@@ -44,9 +44,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "toplev.h"
#include "toplev.h"
#include "mcore-protos.h"
#include "mcore-protos.h"
static
int
const_ok_for_mcore
PARAMS
((
int
));
static
int
try_constant_tricks
PARAMS
((
long
,
int
*
,
int
*
));
/* Maximum size we are allowed to grow the stack in a single operation.
/* Maximum size we are allowed to grow the stack in a single operation.
If we want more, we must do it in increments of at most this size.
If we want more, we must do it in increments of at most this size.
If this value is 0, we don't check at all. */
If this value is 0, we don't check at all. */
...
@@ -88,6 +85,54 @@ enum reg_class reg_class_from_letter[] =
...
@@ -88,6 +85,54 @@ enum reg_class reg_class_from_letter[] =
/* y */
NO_REGS
,
/* z */
NO_REGS
/* y */
NO_REGS
,
/* z */
NO_REGS
};
};
struct
mcore_frame
{
int
arg_size
;
/* stdarg spills (bytes) */
int
reg_size
;
/* non-volatile reg saves (bytes) */
int
reg_mask
;
/* non-volatile reg saves */
int
local_size
;
/* locals */
int
outbound_size
;
/* arg overflow on calls out */
int
pad_outbound
;
int
pad_local
;
int
pad_reg
;
/* Describe the steps we'll use to grow it. */
#define MAX_STACK_GROWS 4
/* gives us some spare space */
int
growth
[
MAX_STACK_GROWS
];
int
arg_offset
;
int
reg_offset
;
int
reg_growth
;
int
local_growth
;
};
typedef
enum
{
COND_NO
,
COND_MOV_INSN
,
COND_CLR_INSN
,
COND_INC_INSN
,
COND_DEC_INSN
,
COND_BRANCH_INSN
}
cond_type
;
static
void
output_stack_adjust
PARAMS
((
int
,
int
));
static
int
calc_live_regs
PARAMS
((
int
*
));
static
int
const_ok_for_mcore
PARAMS
((
int
));
static
int
try_constant_tricks
PARAMS
((
long
,
int
*
,
int
*
));
static
const
char
*
output_inline_const
PARAMS
((
enum
machine_mode
,
rtx
*
));
static
void
block_move_sequence
PARAMS
((
rtx
,
rtx
,
rtx
,
rtx
,
int
,
int
,
int
));
static
void
layout_mcore_frame
PARAMS
((
struct
mcore_frame
*
));
static
cond_type
is_cond_candidate
PARAMS
((
rtx
));
static
rtx
emit_new_cond_insn
PARAMS
((
rtx
,
int
));
static
rtx
conditionalize_block
PARAMS
((
rtx
));
static
void
conditionalize_optimization
PARAMS
((
rtx
));
static
void
mcore_add_gc_roots
PARAMS
((
void
));
static
rtx
handle_structs_in_regs
PARAMS
((
enum
machine_mode
,
tree
,
int
));
static
void
mcore_mark_dllexport
PARAMS
((
tree
));
static
void
mcore_mark_dllimport
PARAMS
((
tree
));
static
int
mcore_dllexport_p
PARAMS
((
tree
));
static
int
mcore_dllimport_p
PARAMS
((
tree
));
/* Adjust the stack and return the number of bytes taken to do it. */
/* Adjust the stack and return the number of bytes taken to do it. */
static
void
static
void
output_stack_adjust
(
direction
,
size
)
output_stack_adjust
(
direction
,
size
)
...
@@ -507,6 +552,7 @@ mcore_call_address_operand (x, mode)
...
@@ -507,6 +552,7 @@ mcore_call_address_operand (x, mode)
}
}
/* Functions to output assembly code for a function call. */
/* Functions to output assembly code for a function call. */
char
*
char
*
mcore_output_call
(
operands
,
index
)
mcore_output_call
(
operands
,
index
)
rtx
operands
[];
rtx
operands
[];
...
@@ -831,7 +877,7 @@ mcore_halfword_offset (mask)
...
@@ -831,7 +877,7 @@ mcore_halfword_offset (mask)
}
}
/* Output a series of bseti's corresponding to mask. */
/* Output a series of bseti's corresponding to mask. */
char
*
c
onst
c
har
*
mcore_output_bseti
(
dst
,
mask
)
mcore_output_bseti
(
dst
,
mask
)
rtx
dst
;
rtx
dst
;
int
mask
;
int
mask
;
...
@@ -856,7 +902,7 @@ mcore_output_bseti (dst, mask)
...
@@ -856,7 +902,7 @@ mcore_output_bseti (dst, mask)
}
}
/* Output a series of bclri's corresponding to mask. */
/* Output a series of bclri's corresponding to mask. */
char
*
c
onst
c
har
*
mcore_output_bclri
(
dst
,
mask
)
mcore_output_bclri
(
dst
,
mask
)
rtx
dst
;
rtx
dst
;
int
mask
;
int
mask
;
...
@@ -884,7 +930,7 @@ mcore_output_bclri (dst, mask)
...
@@ -884,7 +930,7 @@ mcore_output_bclri (dst, mask)
/* Output a conditional move of two constants that are +/- 1 within each
/* Output a conditional move of two constants that are +/- 1 within each
other. See the "movtK" patterns in mcore.md. I'm not sure this is
other. See the "movtK" patterns in mcore.md. I'm not sure this is
really worth the effort. */
really worth the effort. */
char
*
c
onst
c
har
*
mcore_output_cmov
(
operands
,
cmp_t
,
test
)
mcore_output_cmov
(
operands
,
cmp_t
,
test
)
rtx
operands
[];
rtx
operands
[];
int
cmp_t
;
int
cmp_t
;
...
@@ -953,14 +999,14 @@ mcore_output_cmov (operands, cmp_t, test)
...
@@ -953,14 +999,14 @@ mcore_output_cmov (operands, cmp_t, test)
/* Outputs the peephole for moving a constant that gets not'ed followed
/* Outputs the peephole for moving a constant that gets not'ed followed
by an and (i.e. combine the not and the and into andn) BRC */
by an and (i.e. combine the not and the and into andn) BRC */
char
*
c
onst
c
har
*
mcore_output_andn
(
insn
,
operands
)
mcore_output_andn
(
insn
,
operands
)
rtx
insn
ATTRIBUTE_UNUSED
;
rtx
insn
ATTRIBUTE_UNUSED
;
rtx
operands
[];
rtx
operands
[];
{
{
int
x
,
y
;
int
x
,
y
;
rtx
out_operands
[
3
];
rtx
out_operands
[
3
];
char
*
load_op
;
c
onst
c
har
*
load_op
;
char
buf
[
256
];
char
buf
[
256
];
if
(
try_constant_tricks
(
INTVAL
(
operands
[
1
]),
&
x
,
&
y
)
!=
2
)
if
(
try_constant_tricks
(
INTVAL
(
operands
[
1
]),
&
x
,
&
y
)
!=
2
)
...
@@ -988,7 +1034,7 @@ mcore_output_andn (insn, operands)
...
@@ -988,7 +1034,7 @@ mcore_output_andn (insn, operands)
}
}
/* Output an inline constant. */
/* Output an inline constant. */
static
char
*
static
c
onst
c
har
*
output_inline_const
(
mode
,
operands
)
output_inline_const
(
mode
,
operands
)
enum
machine_mode
mode
;
enum
machine_mode
mode
;
rtx
operands
[];
rtx
operands
[];
...
@@ -998,7 +1044,7 @@ output_inline_const (mode, operands)
...
@@ -998,7 +1044,7 @@ output_inline_const (mode, operands)
rtx
out_operands
[
3
];
rtx
out_operands
[
3
];
char
buf
[
256
];
char
buf
[
256
];
char
load_op
[
256
];
char
load_op
[
256
];
char
*
dst_fmt
;
c
onst
c
har
*
dst_fmt
;
int
value
;
int
value
;
value
=
INTVAL
(
operands
[
1
]);
value
=
INTVAL
(
operands
[
1
]);
...
@@ -1086,7 +1132,7 @@ output_inline_const (mode, operands)
...
@@ -1086,7 +1132,7 @@ output_inline_const (mode, operands)
}
}
/* Output a move of a word or less value. */
/* Output a move of a word or less value. */
char
*
c
onst
c
har
*
mcore_output_move
(
insn
,
operands
,
mode
)
mcore_output_move
(
insn
,
operands
,
mode
)
rtx
insn
ATTRIBUTE_UNUSED
;
rtx
insn
ATTRIBUTE_UNUSED
;
rtx
operands
[];
rtx
operands
[];
...
@@ -1139,7 +1185,7 @@ mcore_output_move (insn, operands, mode)
...
@@ -1139,7 +1185,7 @@ mcore_output_move (insn, operands, mode)
Useful for things where we've gotten into trouble and think we'd
Useful for things where we've gotten into trouble and think we'd
be doing an lrw into r15 (forbidden). This lets us get out of
be doing an lrw into r15 (forbidden). This lets us get out of
that pickle even after register allocation. */
that pickle even after register allocation. */
char
*
c
onst
c
har
*
mcore_output_inline_const_forced
(
insn
,
operands
,
mode
)
mcore_output_inline_const_forced
(
insn
,
operands
,
mode
)
rtx
insn
ATTRIBUTE_UNUSED
;
rtx
insn
ATTRIBUTE_UNUSED
;
rtx
operands
[];
rtx
operands
[];
...
@@ -1226,7 +1272,7 @@ mcore_output_inline_const_forced (insn, operands, mode)
...
@@ -1226,7 +1272,7 @@ mcore_output_inline_const_forced (insn, operands, mode)
/* Return a sequence of instructions to perform DI or DF move.
/* Return a sequence of instructions to perform DI or DF move.
Since the MCORE cannot move a DI or DF in one instruction, we have
Since the MCORE cannot move a DI or DF in one instruction, we have
to take care when we see overlapping source and dest registers. */
to take care when we see overlapping source and dest registers. */
char
*
c
onst
c
har
*
mcore_output_movedouble
(
operands
,
mode
)
mcore_output_movedouble
(
operands
,
mode
)
rtx
operands
[];
rtx
operands
[];
enum
machine_mode
mode
ATTRIBUTE_UNUSED
;
enum
machine_mode
mode
ATTRIBUTE_UNUSED
;
...
@@ -1658,7 +1704,7 @@ mcore_expand_insv (operands)
...
@@ -1658,7 +1704,7 @@ mcore_expand_insv (operands)
We don't have to mask if we're shifting this up against the
We don't have to mask if we're shifting this up against the
MSB of the register (e.g., the shift will push out any hi-order
MSB of the register (e.g., the shift will push out any hi-order
bits. */
bits. */
if
(
width
+
posn
!=
GET_MODE_SIZE
(
SImode
))
if
(
width
+
posn
!=
(
int
)
GET_MODE_SIZE
(
SImode
))
{
{
ereg
=
force_reg
(
SImode
,
GEN_INT
((
1
<<
width
)
-
1
));
ereg
=
force_reg
(
SImode
,
GEN_INT
((
1
<<
width
)
-
1
));
emit_insn
(
gen_rtx
(
SET
,
SImode
,
sreg
,
emit_insn
(
gen_rtx
(
SET
,
SImode
,
sreg
,
...
@@ -1705,9 +1751,9 @@ mcore_load_multiple_operation (op, mode)
...
@@ -1705,9 +1751,9 @@ mcore_load_multiple_operation (op, mode)
if
(
GET_CODE
(
elt
)
!=
SET
if
(
GET_CODE
(
elt
)
!=
SET
||
GET_CODE
(
SET_DEST
(
elt
))
!=
REG
||
GET_CODE
(
SET_DEST
(
elt
))
!=
REG
||
GET_MODE
(
SET_DEST
(
elt
))
!=
SImode
||
GET_MODE
(
SET_DEST
(
elt
))
!=
SImode
||
REGNO
(
SET_DEST
(
elt
))
!=
dest_regno
+
i
||
REGNO
(
SET_DEST
(
elt
))
!=
(
unsigned
)
(
dest_regno
+
i
)
||
GET_CODE
(
SET_SRC
(
elt
))
!=
MEM
||
GET_CODE
(
SET_SRC
(
elt
))
!=
MEM
||
GET_MODE
(
SET_SRC
(
elt
))
!=
SImode
||
GET_MODE
(
SET_SRC
(
elt
))
!=
SImode
||
GET_CODE
(
XEXP
(
SET_SRC
(
elt
),
0
))
!=
PLUS
||
GET_CODE
(
XEXP
(
SET_SRC
(
elt
),
0
))
!=
PLUS
||
!
rtx_equal_p
(
XEXP
(
XEXP
(
SET_SRC
(
elt
),
0
),
0
),
src_addr
)
||
!
rtx_equal_p
(
XEXP
(
XEXP
(
SET_SRC
(
elt
),
0
),
0
),
src_addr
)
||
GET_CODE
(
XEXP
(
XEXP
(
SET_SRC
(
elt
),
0
),
1
))
!=
CONST_INT
||
GET_CODE
(
XEXP
(
XEXP
(
SET_SRC
(
elt
),
0
),
1
))
!=
CONST_INT
...
@@ -1746,7 +1792,7 @@ mcore_store_multiple_operation (op, mode)
...
@@ -1746,7 +1792,7 @@ mcore_store_multiple_operation (op, mode)
if
(
GET_CODE
(
elt
)
!=
SET
if
(
GET_CODE
(
elt
)
!=
SET
||
GET_CODE
(
SET_SRC
(
elt
))
!=
REG
||
GET_CODE
(
SET_SRC
(
elt
))
!=
REG
||
GET_MODE
(
SET_SRC
(
elt
))
!=
SImode
||
GET_MODE
(
SET_SRC
(
elt
))
!=
SImode
||
REGNO
(
SET_SRC
(
elt
))
!=
src_regno
+
i
||
REGNO
(
SET_SRC
(
elt
))
!=
(
unsigned
)
(
src_regno
+
i
)
||
GET_CODE
(
SET_DEST
(
elt
))
!=
MEM
||
GET_CODE
(
SET_DEST
(
elt
))
!=
MEM
||
GET_MODE
(
SET_DEST
(
elt
))
!=
SImode
||
GET_MODE
(
SET_DEST
(
elt
))
!=
SImode
||
GET_CODE
(
XEXP
(
SET_DEST
(
elt
),
0
))
!=
PLUS
||
GET_CODE
(
XEXP
(
SET_DEST
(
elt
),
0
))
!=
PLUS
...
@@ -1916,31 +1962,10 @@ static int number_of_regs_before_varargs;
...
@@ -1916,31 +1962,10 @@ static int number_of_regs_before_varargs;
for a varargs function. */
for a varargs function. */
static
int
current_function_anonymous_args
;
static
int
current_function_anonymous_args
;
#define STACK_BYTES (STACK_BOUNDARY/BITS_PER_UNIT)
#define STACK_BYTES (STACK_BOUNDARY/BITS_PER_UNIT)
#define STORE_REACH (64)
/* Maximum displace of word store + 4. */
#define STORE_REACH (64)
/* Maximum displace of word store + 4. */
#define ADDI_REACH (32)
/* Maximum addi operand. */
#define ADDI_REACH (32)
/* Maximum addi operand. */
struct
mcore_frame
{
int
arg_size
;
/* stdarg spills (bytes) */
int
reg_size
;
/* non-volatile reg saves (bytes) */
int
reg_mask
;
/* non-volatile reg saves */
int
local_size
;
/* locals */
int
outbound_size
;
/* arg overflow on calls out */
int
pad_outbound
;
int
pad_local
;
int
pad_reg
;
/* describe the steps we'll use to grow it */
#define MAX_STACK_GROWS 4
/* gives us some spare space */
int
growth
[
MAX_STACK_GROWS
];
int
arg_offset
;
int
reg_offset
;
int
reg_growth
;
int
local_growth
;
};
static
void
static
void
layout_mcore_frame
(
infp
)
layout_mcore_frame
(
infp
)
struct
mcore_frame
*
infp
;
struct
mcore_frame
*
infp
;
...
@@ -2150,7 +2175,7 @@ layout_mcore_frame (infp)
...
@@ -2150,7 +2175,7 @@ layout_mcore_frame (infp)
infp
->
local_growth
=
growths
;
infp
->
local_growth
=
growths
;
}
}
/* Anything else that we've forgotten?, plus a few consistency checks. */
/* Anything else that we've forgotten?, plus a few consistency checks.
*/
finish
:
finish
:
assert
(
infp
->
reg_offset
>=
0
);
assert
(
infp
->
reg_offset
>=
0
);
assert
(
growths
<=
MAX_STACK_GROWS
);
assert
(
growths
<=
MAX_STACK_GROWS
);
...
@@ -2369,12 +2394,13 @@ mcore_expand_epilog ()
...
@@ -2369,12 +2394,13 @@ mcore_expand_epilog ()
int
offs
;
int
offs
;
int
growth
=
MAX_STACK_GROWS
-
1
;
int
growth
=
MAX_STACK_GROWS
-
1
;
/* Find out what we're doing. */
/* Find out what we're doing. */
layout_mcore_frame
(
&
fi
);
layout_mcore_frame
(
&
fi
);
if
(
mcore_naked_function_p
())
if
(
mcore_naked_function_p
())
return
;
return
;
/* If we had a frame pointer, restore the sp from that. */
/* If we had a frame pointer, restore the sp from that. */
if
(
frame_pointer_needed
)
if
(
frame_pointer_needed
)
{
{
...
@@ -2508,7 +2534,7 @@ static int pool_size;
...
@@ -2508,7 +2534,7 @@ static int pool_size;
/* Dump out any constants accumulated in the final pass. These
/* Dump out any constants accumulated in the final pass. These
will only be labels. */
will only be labels. */
char
*
c
onst
c
har
*
mcore_output_jump_label_table
()
mcore_output_jump_label_table
()
{
{
int
i
;
int
i
;
...
@@ -2597,17 +2623,6 @@ mcore_dependent_simplify_rtx (x, int_op0_mode, last, in_dest, general_simplify)
...
@@ -2597,17 +2623,6 @@ mcore_dependent_simplify_rtx (x, int_op0_mode, last, in_dest, general_simplify)
}
}
#endif
#endif
typedef
enum
{
COND_NO
,
COND_MOV_INSN
,
COND_CLR_INSN
,
COND_INC_INSN
,
COND_DEC_INSN
,
COND_BRANCH_INSN
}
cond_type
;
/* Check whether insn is a candidate for a conditional. */
/* Check whether insn is a candidate for a conditional. */
static
cond_type
static
cond_type
is_cond_candidate
(
insn
)
is_cond_candidate
(
insn
)
...
@@ -3540,7 +3555,7 @@ mcore_unique_section (decl, reloc)
...
@@ -3540,7 +3555,7 @@ mcore_unique_section (decl, reloc)
int
len
;
int
len
;
char
*
name
;
char
*
name
;
char
*
string
;
char
*
string
;
char
*
prefix
;
c
onst
c
har
*
prefix
;
name
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
decl
));
name
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
decl
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment