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
718fe406
Commit
718fe406
authored
Aug 14, 2000
by
Kazu Hirata
Committed by
Jeff Law
Aug 14, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* cse.c: Fix formatting.
From-SVN: r35676
parent
ddc356e8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
34 deletions
+31
-34
gcc/ChangeLog
+2
-0
gcc/function.c
+29
-34
No files found.
gcc/ChangeLog
View file @
718fe406
2000-08-13 Kazu Hirata <kazu@hxi.com>
2000-08-13 Kazu Hirata <kazu@hxi.com>
* function.c: Fix formatting.
* cse.c: Fix formatting.
* cse.c: Fix formatting.
2000-08-13 Geoff Keating <geoffk@cygnus.com>
2000-08-13 Geoff Keating <geoffk@cygnus.com>
...
...
gcc/function.c
View file @
718fe406
...
@@ -19,7 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
...
@@ -19,7 +19,6 @@ 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. */
/* This file handles the generation of rtl code from tree structure
/* This file handles the generation of rtl code from tree structure
at the level of the function as a whole.
at the level of the function as a whole.
It creates the rtl expressions for parameters and auto variables
It creates the rtl expressions for parameters and auto variables
...
@@ -493,7 +492,6 @@ free_after_compilation (f)
...
@@ -493,7 +492,6 @@ free_after_compilation (f)
f
->
epilogue_delay_list
=
NULL
;
f
->
epilogue_delay_list
=
NULL
;
}
}
/* Allocate fixed slots in the stack frame of the current function. */
/* Allocate fixed slots in the stack frame of the current function. */
/* Return size needed for stack frame based on slots so far allocated in
/* Return size needed for stack frame based on slots so far allocated in
...
@@ -1581,16 +1579,14 @@ fixup_var_refs (var, promoted_mode, unsignedp, ht)
...
@@ -1581,16 +1579,14 @@ fixup_var_refs (var, promoted_mode, unsignedp, ht)
if
(
seq
!=
const0_rtx
&&
seq
!=
0
)
if
(
seq
!=
const0_rtx
&&
seq
!=
0
)
{
{
push_to_sequence
(
seq
);
push_to_sequence
(
seq
);
fixup_var_refs_insns
(
var
,
promoted_mode
,
unsignedp
,
seq
,
0
,
fixup_var_refs_insns
(
var
,
promoted_mode
,
unsignedp
,
seq
,
0
,
0
);
0
);
end_sequence
();
end_sequence
();
}
}
}
}
/* Scan the catch clauses for exception handling too. */
/* Scan the catch clauses for exception handling too. */
push_to_full_sequence
(
catch_clauses
,
catch_clauses_last
);
push_to_full_sequence
(
catch_clauses
,
catch_clauses_last
);
fixup_var_refs_insns
(
var
,
promoted_mode
,
unsignedp
,
catch_clauses
,
fixup_var_refs_insns
(
var
,
promoted_mode
,
unsignedp
,
catch_clauses
,
0
,
0
);
0
,
0
);
end_full_sequence
(
&
catch_clauses
,
&
catch_clauses_last
);
end_full_sequence
(
&
catch_clauses
,
&
catch_clauses_last
);
/* Scan sequences saved in CALL_PLACEHOLDERS too. */
/* Scan sequences saved in CALL_PLACEHOLDERS too. */
...
@@ -2801,7 +2797,6 @@ static int cfa_offset;
...
@@ -2801,7 +2797,6 @@ static int cfa_offset;
#define ARG_POINTER_CFA_OFFSET(FNDECL) FIRST_PARM_OFFSET (FNDECL)
#define ARG_POINTER_CFA_OFFSET(FNDECL) FIRST_PARM_OFFSET (FNDECL)
#endif
#endif
/* Build up a (MEM (ADDRESSOF (REG))) rtx for a register REG that just had
/* Build up a (MEM (ADDRESSOF (REG))) rtx for a register REG that just had
its address taken. DECL is the decl for the object stored in the
its address taken. DECL is the decl for the object stored in the
register, for later use if we do need to force REG into the stack.
register, for later use if we do need to force REG into the stack.
...
@@ -3308,10 +3303,10 @@ compute_insns_for_mem (insns, last_insn, ht)
...
@@ -3308,10 +3303,10 @@ compute_insns_for_mem (insns, last_insn, ht)
Returns true iff the rtl is an ADDRESSOF. */
Returns true iff the rtl is an ADDRESSOF. */
static
int
static
int
is_addressof
(
rtl
,
data
)
is_addressof
(
rtl
,
data
)
rtx
*
rtl
;
rtx
*
rtl
;
void
*
data
ATTRIBUTE_UNUSED
;
void
*
data
ATTRIBUTE_UNUSED
;
{
{
return
GET_CODE
(
*
rtl
)
==
ADDRESSOF
;
return
GET_CODE
(
*
rtl
)
==
ADDRESSOF
;
}
}
/* Eliminate all occurrences of ADDRESSOF from INSNS. Elide any remaining
/* Eliminate all occurrences of ADDRESSOF from INSNS. Elide any remaining
...
@@ -3362,7 +3357,7 @@ purge_addressof (insns)
...
@@ -3362,7 +3357,7 @@ purge_addressof (insns)
safe to delete the notes here, and instead we abort. */
safe to delete the notes here, and instead we abort. */
if
(
REG_NOTE_KIND
(
note
)
==
REG_RETVAL
)
if
(
REG_NOTE_KIND
(
note
)
==
REG_RETVAL
)
abort
();
abort
();
if
(
for_each_rtx
(
&
note
,
is_addressof
,
NULL
))
if
(
for_each_rtx
(
&
note
,
is_addressof
,
NULL
))
remove_note
(
insn
,
note
);
remove_note
(
insn
,
note
);
}
}
}
}
...
@@ -3633,15 +3628,15 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
...
@@ -3633,15 +3628,15 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
appropriate offset. This is used, for example, in the handling
appropriate offset. This is used, for example, in the handling
of non-local gotos. */
of non-local gotos. */
if
(
SET_DEST
(
x
)
==
virtual_incoming_args_rtx
)
if
(
SET_DEST
(
x
)
==
virtual_incoming_args_rtx
)
new
=
arg_pointer_rtx
,
offset
=
-
in_arg_offset
;
new
=
arg_pointer_rtx
,
offset
=
-
in_arg_offset
;
else
if
(
SET_DEST
(
x
)
==
virtual_stack_vars_rtx
)
else
if
(
SET_DEST
(
x
)
==
virtual_stack_vars_rtx
)
new
=
frame_pointer_rtx
,
offset
=
-
var_offset
;
new
=
frame_pointer_rtx
,
offset
=
-
var_offset
;
else
if
(
SET_DEST
(
x
)
==
virtual_stack_dynamic_rtx
)
else
if
(
SET_DEST
(
x
)
==
virtual_stack_dynamic_rtx
)
new
=
stack_pointer_rtx
,
offset
=
-
dynamic_offset
;
new
=
stack_pointer_rtx
,
offset
=
-
dynamic_offset
;
else
if
(
SET_DEST
(
x
)
==
virtual_outgoing_args_rtx
)
else
if
(
SET_DEST
(
x
)
==
virtual_outgoing_args_rtx
)
new
=
stack_pointer_rtx
,
offset
=
-
out_arg_offset
;
new
=
stack_pointer_rtx
,
offset
=
-
out_arg_offset
;
else
if
(
SET_DEST
(
x
)
==
virtual_cfa_rtx
)
else
if
(
SET_DEST
(
x
)
==
virtual_cfa_rtx
)
new
=
arg_pointer_rtx
,
offset
=
-
cfa_offset
;
new
=
arg_pointer_rtx
,
offset
=
-
cfa_offset
;
if
(
new
)
if
(
new
)
{
{
...
@@ -5053,7 +5048,7 @@ locate_and_pad_parm (passed_mode, type, in_regs, fndecl,
...
@@ -5053,7 +5048,7 @@ locate_and_pad_parm (passed_mode, type, in_regs, fndecl,
}
}
else
else
{
{
offset_ptr
->
constant
=
-
initial_offset_ptr
->
constant
;
offset_ptr
->
constant
=
-
initial_offset_ptr
->
constant
;
offset_ptr
->
var
=
0
;
offset_ptr
->
var
=
0
;
}
}
if
(
where_pad
!=
none
if
(
where_pad
!=
none
...
@@ -5071,7 +5066,7 @@ locate_and_pad_parm (passed_mode, type, in_regs, fndecl,
...
@@ -5071,7 +5066,7 @@ locate_and_pad_parm (passed_mode, type, in_regs, fndecl,
offset_ptr
->
var
);
offset_ptr
->
var
);
else
else
arg_size_ptr
->
constant
=
(
-
initial_offset_ptr
->
constant
arg_size_ptr
->
constant
=
(
-
initial_offset_ptr
->
constant
-
offset_ptr
->
constant
);
-
offset_ptr
->
constant
);
#else
/* !ARGS_GROW_DOWNWARD */
#else
/* !ARGS_GROW_DOWNWARD */
...
@@ -5240,7 +5235,8 @@ setjmp_args_warning ()
...
@@ -5240,7 +5235,8 @@ setjmp_args_warning ()
if
(
DECL_RTL
(
decl
)
!=
0
if
(
DECL_RTL
(
decl
)
!=
0
&&
GET_CODE
(
DECL_RTL
(
decl
))
==
REG
&&
GET_CODE
(
DECL_RTL
(
decl
))
==
REG
&&
regno_clobbered_at_setjmp
(
REGNO
(
DECL_RTL
(
decl
))))
&&
regno_clobbered_at_setjmp
(
REGNO
(
DECL_RTL
(
decl
))))
warning_with_decl
(
decl
,
"argument `%s' might be clobbered by `longjmp' or `vfork'"
);
warning_with_decl
(
decl
,
"argument `%s' might be clobbered by `longjmp' or `vfork'"
);
}
}
/* If this function call setjmp, put all vars into the stack
/* If this function call setjmp, put all vars into the stack
...
@@ -5520,7 +5516,7 @@ round_trampoline_addr (tramp)
...
@@ -5520,7 +5516,7 @@ round_trampoline_addr (tramp)
GEN_INT
(
TRAMPOLINE_ALIGNMENT
/
BITS_PER_UNIT
-
1
),
GEN_INT
(
TRAMPOLINE_ALIGNMENT
/
BITS_PER_UNIT
-
1
),
temp
,
0
,
OPTAB_LIB_WIDEN
);
temp
,
0
,
OPTAB_LIB_WIDEN
);
tramp
=
expand_binop
(
Pmode
,
and_optab
,
temp
,
tramp
=
expand_binop
(
Pmode
,
and_optab
,
temp
,
GEN_INT
(
-
TRAMPOLINE_ALIGNMENT
/
BITS_PER_UNIT
),
GEN_INT
(
-
TRAMPOLINE_ALIGNMENT
/
BITS_PER_UNIT
),
temp
,
0
,
OPTAB_LIB_WIDEN
);
temp
,
0
,
OPTAB_LIB_WIDEN
);
#endif
#endif
return
tramp
;
return
tramp
;
...
@@ -5650,8 +5646,7 @@ reorder_blocks ()
...
@@ -5650,8 +5646,7 @@ reorder_blocks ()
reorder_blocks_1
(
get_insns
(),
block
,
&
block_stack
);
reorder_blocks_1
(
get_insns
(),
block
,
&
block_stack
);
BLOCK_SUBBLOCKS
(
block
)
BLOCK_SUBBLOCKS
(
block
)
=
blocks_nreverse
(
BLOCK_SUBBLOCKS
(
block
));
=
blocks_nreverse
(
BLOCK_SUBBLOCKS
(
block
));
VARRAY_FREE
(
block_stack
);
VARRAY_FREE
(
block_stack
);
}
}
...
@@ -5809,7 +5804,6 @@ number_blocks (fn)
...
@@ -5809,7 +5804,6 @@ number_blocks (fn)
return
;
return
;
}
}
/* Allocate a function structure and reset its contents to the defaults. */
/* Allocate a function structure and reset its contents to the defaults. */
static
void
static
void
prepare_function_start
()
prepare_function_start
()
...
@@ -6237,7 +6231,7 @@ expand_function_start (subr, parms_have_cleanups)
...
@@ -6237,7 +6231,7 @@ expand_function_start (subr, parms_have_cleanups)
/* Chain thru stack frames, assuming pointer to next lexical frame
/* Chain thru stack frames, assuming pointer to next lexical frame
is found at the place we always store it. */
is found at the place we always store it. */
#ifdef FRAME_GROWS_DOWNWARD
#ifdef FRAME_GROWS_DOWNWARD
last_ptr
=
plus_constant
(
last_ptr
,
-
GET_MODE_SIZE
(
Pmode
));
last_ptr
=
plus_constant
(
last_ptr
,
-
GET_MODE_SIZE
(
Pmode
));
#endif
#endif
last_ptr
=
gen_rtx_MEM
(
Pmode
,
memory_address
(
Pmode
,
last_ptr
));
last_ptr
=
gen_rtx_MEM
(
Pmode
,
memory_address
(
Pmode
,
last_ptr
));
MEM_ALIAS_SET
(
last_ptr
)
=
get_frame_alias_set
();
MEM_ALIAS_SET
(
last_ptr
)
=
get_frame_alias_set
();
...
@@ -6658,7 +6652,8 @@ expand_function_end (filename, line, end_bindings)
...
@@ -6658,7 +6652,8 @@ expand_function_end (filename, line, end_bindings)
if
(
current_function_returns_struct
if
(
current_function_returns_struct
||
current_function_returns_pcc_struct
)
||
current_function_returns_pcc_struct
)
{
{
rtx
value_address
=
XEXP
(
DECL_RTL
(
DECL_RESULT
(
current_function_decl
)),
0
);
rtx
value_address
=
XEXP
(
DECL_RTL
(
DECL_RESULT
(
current_function_decl
)),
0
);
tree
type
=
TREE_TYPE
(
DECL_RESULT
(
current_function_decl
));
tree
type
=
TREE_TYPE
(
DECL_RESULT
(
current_function_decl
));
#ifdef FUNCTION_OUTGOING_VALUE
#ifdef FUNCTION_OUTGOING_VALUE
rtx
outgoing
rtx
outgoing
...
@@ -6835,7 +6830,7 @@ thread_prologue_and_epilogue_insns (f)
...
@@ -6835,7 +6830,7 @@ thread_prologue_and_epilogue_insns (f)
if
(
HAVE_prologue
)
if
(
HAVE_prologue
)
{
{
start_sequence
();
start_sequence
();
seq
=
gen_prologue
();
seq
=
gen_prologue
();
emit_insn
(
seq
);
emit_insn
(
seq
);
/* Retain a map of the prologue insns. */
/* Retain a map of the prologue insns. */
...
@@ -6865,7 +6860,7 @@ thread_prologue_and_epilogue_insns (f)
...
@@ -6865,7 +6860,7 @@ thread_prologue_and_epilogue_insns (f)
/* If the exit block has no non-fake predecessors, we don't need
/* If the exit block has no non-fake predecessors, we don't need
an epilogue. */
an epilogue. */
for
(
e
=
EXIT_BLOCK_PTR
->
pred
;
e
;
e
=
e
->
pred_next
)
for
(
e
=
EXIT_BLOCK_PTR
->
pred
;
e
;
e
=
e
->
pred_next
)
if
((
e
->
flags
&
EDGE_FAKE
)
==
0
)
if
((
e
->
flags
&
EDGE_FAKE
)
==
0
)
break
;
break
;
if
(
e
==
NULL
)
if
(
e
==
NULL
)
...
@@ -6884,7 +6879,7 @@ thread_prologue_and_epilogue_insns (f)
...
@@ -6884,7 +6879,7 @@ thread_prologue_and_epilogue_insns (f)
edge
e_next
;
edge
e_next
;
rtx
label
;
rtx
label
;
for
(
e
=
EXIT_BLOCK_PTR
->
pred
;
e
;
e
=
e
->
pred_next
)
for
(
e
=
EXIT_BLOCK_PTR
->
pred
;
e
;
e
=
e
->
pred_next
)
if
(
e
->
flags
&
EDGE_FALLTHRU
)
if
(
e
->
flags
&
EDGE_FALLTHRU
)
break
;
break
;
if
(
e
==
NULL
)
if
(
e
==
NULL
)
...
@@ -6915,7 +6910,7 @@ thread_prologue_and_epilogue_insns (f)
...
@@ -6915,7 +6910,7 @@ thread_prologue_and_epilogue_insns (f)
break
;
break
;
}
}
for
(
e
=
last
->
pred
;
e
;
e
=
e_next
)
for
(
e
=
last
->
pred
;
e
;
e
=
e_next
)
{
{
basic_block
bb
=
e
->
src
;
basic_block
bb
=
e
->
src
;
rtx
jump
;
rtx
jump
;
...
@@ -6985,7 +6980,7 @@ thread_prologue_and_epilogue_insns (f)
...
@@ -6985,7 +6980,7 @@ thread_prologue_and_epilogue_insns (f)
There really shouldn't be a mixture -- either all should have
There really shouldn't be a mixture -- either all should have
been converted or none, however... */
been converted or none, however... */
for
(
e
=
EXIT_BLOCK_PTR
->
pred
;
e
;
e
=
e
->
pred_next
)
for
(
e
=
EXIT_BLOCK_PTR
->
pred
;
e
;
e
=
e
->
pred_next
)
if
(
e
->
flags
&
EDGE_FALLTHRU
)
if
(
e
->
flags
&
EDGE_FALLTHRU
)
break
;
break
;
if
(
e
==
NULL
)
if
(
e
==
NULL
)
...
@@ -7003,7 +6998,7 @@ thread_prologue_and_epilogue_insns (f)
...
@@ -7003,7 +6998,7 @@ thread_prologue_and_epilogue_insns (f)
record_insns
(
seq
,
&
epilogue
);
record_insns
(
seq
,
&
epilogue
);
seq
=
gen_sequence
();
seq
=
gen_sequence
();
end_sequence
();
end_sequence
();
insert_insn_on_edge
(
seq
,
e
);
insert_insn_on_edge
(
seq
,
e
);
inserted
=
1
;
inserted
=
1
;
...
@@ -7016,7 +7011,7 @@ epilogue_done:
...
@@ -7016,7 +7011,7 @@ epilogue_done:
#ifdef HAVE_sibcall_epilogue
#ifdef HAVE_sibcall_epilogue
/* Emit sibling epilogues before any sibling call sites. */
/* Emit sibling epilogues before any sibling call sites. */
for
(
e
=
EXIT_BLOCK_PTR
->
pred
;
e
;
e
=
e
->
pred_next
)
for
(
e
=
EXIT_BLOCK_PTR
->
pred
;
e
;
e
=
e
->
pred_next
)
{
{
basic_block
bb
=
e
->
src
;
basic_block
bb
=
e
->
src
;
rtx
insn
=
bb
->
end
;
rtx
insn
=
bb
->
end
;
...
@@ -7057,7 +7052,7 @@ epilogue_done:
...
@@ -7057,7 +7052,7 @@ epilogue_done:
note before the end of the first basic block, if there isn't
note before the end of the first basic block, if there isn't
one already there. */
one already there. */
for
(
insn
=
prologue_end
;
insn
;
insn
=
prev
)
for
(
insn
=
prologue_end
;
insn
;
insn
=
prev
)
{
{
prev
=
PREV_INSN
(
insn
);
prev
=
PREV_INSN
(
insn
);
if
(
GET_CODE
(
insn
)
==
NOTE
&&
NOTE_LINE_NUMBER
(
insn
)
>
0
)
if
(
GET_CODE
(
insn
)
==
NOTE
&&
NOTE_LINE_NUMBER
(
insn
)
>
0
)
...
@@ -7103,7 +7098,7 @@ epilogue_done:
...
@@ -7103,7 +7098,7 @@ epilogue_done:
/* Similarly, move any line notes that appear after the epilogue.
/* Similarly, move any line notes that appear after the epilogue.
There is no need, however, to be quite so anal about the existance
There is no need, however, to be quite so anal about the existance
of such a note. */
of such a note. */
for
(
insn
=
epilogue_end
;
insn
;
insn
=
next
)
for
(
insn
=
epilogue_end
;
insn
;
insn
=
next
)
{
{
next
=
NEXT_INSN
(
insn
);
next
=
NEXT_INSN
(
insn
);
if
(
GET_CODE
(
insn
)
==
NOTE
&&
NOTE_LINE_NUMBER
(
insn
)
>
0
)
if
(
GET_CODE
(
insn
)
==
NOTE
&&
NOTE_LINE_NUMBER
(
insn
)
>
0
)
...
...
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