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
0d1416c6
Commit
0d1416c6
authored
Sep 15, 1999
by
Bernd Schmidt
Committed by
Bernd Schmidt
Sep 15, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove second arg from assign_parms
From-SVN: r29431
parent
dd42155e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
56 deletions
+47
-56
gcc/ChangeLog
+9
-0
gcc/function.c
+36
-54
gcc/objc/objc-act.c
+1
-1
gcc/tree.h
+1
-1
No files found.
gcc/ChangeLog
View file @
0d1416c6
Wed
Sep
15
11
:
04
:
43
1999
Bernd
Schmidt
<
bernds
@cygnus
.
co
.
uk
>
*
function
.
c
(
assign_parms
)
:
Delete
arg
SECOND_TIME
.
Don
'
t
test
it
,
behave
as
if
it
'
s
zero
in
all
cases
.
(
expand_function_start
)
:
Adjust
call
to
assign_parms
.
*
tree
.
h
(
assign_parms
)
:
Adjust
prototype
.
*
objc
/
objc
-
act
.
c
(
hack_method_prototype
)
:
Adjust
call
to
assign_parms
.
Tue
Sep
14
21
:
47
:
06
1999
Jeffrey
A
Law
(
law
@cygnus
.
com
)
*
cse
.
c
(
FIXED_BASE_PLUS_P
)
:
Do
not
consider
referneces
to
...
...
gcc/function.c
View file @
0d1416c6
...
...
@@ -3878,19 +3878,11 @@ aggregate_value_p (exp)
/* Assign RTL expressions to the function's parameters.
This may involve copying them into registers and using
those registers as the RTL for them.
If SECOND_TIME is non-zero it means that this function is being
called a second time. This is done by integrate.c when a function's
compilation is deferred. We need to come back here in case the
FUNCTION_ARG macro computes items needed for the rest of the compilation
(such as changing which registers are fixed or caller-saved). But suppress
writing any insns or setting DECL_RTL of anything in this case. */
those registers as the RTL for them. */
void
assign_parms
(
fndecl
,
second_time
)
assign_parms
(
fndecl
)
tree
fndecl
;
int
second_time
;
{
register
tree
parm
;
register
rtx
entry_parm
=
0
;
...
...
@@ -3944,8 +3936,7 @@ assign_parms (fndecl, second_time)
if
((
ARG_POINTER_REGNUM
==
STACK_POINTER_REGNUM
||
!
(
fixed_regs
[
ARG_POINTER_REGNUM
]
||
ARG_POINTER_REGNUM
==
FRAME_POINTER_REGNUM
))
&&
!
second_time
)
||
ARG_POINTER_REGNUM
==
FRAME_POINTER_REGNUM
)))
internal_arg_pointer
=
copy_to_reg
(
virtual_incoming_args_rtx
);
else
internal_arg_pointer
=
virtual_incoming_args_rtx
;
...
...
@@ -4093,8 +4084,7 @@ assign_parms (fndecl, second_time)
if
(
last_named
&&
!
varargs_setup
)
{
SETUP_INCOMING_VARARGS
(
args_so_far
,
promoted_mode
,
passed_type
,
current_function_pretend_args_size
,
second_time
);
current_function_pretend_args_size
,
0
);
varargs_setup
=
1
;
}
#endif
...
...
@@ -4129,25 +4119,24 @@ assign_parms (fndecl, second_time)
#endif
fndecl
,
&
stack_args_size
,
&
stack_offset
,
&
arg_size
);
if
(
!
second_time
)
{
rtx
offset_rtx
=
ARGS_SIZE_RTX
(
stack_offset
);
if
(
offset_rtx
==
const0_rtx
)
stack_parm
=
gen_rtx_MEM
(
promoted_mode
,
internal_arg_pointer
);
else
stack_parm
=
gen_rtx_MEM
(
promoted_mode
,
gen_rtx_PLUS
(
Pmode
,
internal_arg_pointer
,
offset_rtx
));
/* If this is a memory ref that contains aggregate components,
mark it as such for cse and loop optimize. Likewise if it
is readonly. */
MEM_SET_IN_STRUCT_P
(
stack_parm
,
aggregate
);
RTX_UNCHANGING_P
(
stack_parm
)
=
TREE_READONLY
(
parm
);
MEM_ALIAS_SET
(
stack_parm
)
=
get_alias_set
(
parm
);
}
{
rtx
offset_rtx
=
ARGS_SIZE_RTX
(
stack_offset
);
if
(
offset_rtx
==
const0_rtx
)
stack_parm
=
gen_rtx_MEM
(
promoted_mode
,
internal_arg_pointer
);
else
stack_parm
=
gen_rtx_MEM
(
promoted_mode
,
gen_rtx_PLUS
(
Pmode
,
internal_arg_pointer
,
offset_rtx
));
/* If this is a memory ref that contains aggregate components,
mark it as such for cse and loop optimize. Likewise if it
is readonly. */
MEM_SET_IN_STRUCT_P
(
stack_parm
,
aggregate
);
RTX_UNCHANGING_P
(
stack_parm
)
=
TREE_READONLY
(
parm
);
MEM_ALIAS_SET
(
stack_parm
)
=
get_alias_set
(
parm
);
}
/* If this parameter was passed both in registers and in the stack,
use the copy on the stack. */
...
...
@@ -4175,20 +4164,18 @@ assign_parms (fndecl, second_time)
/
(
PARM_BOUNDARY
/
BITS_PER_UNIT
)
*
(
PARM_BOUNDARY
/
BITS_PER_UNIT
));
if
(
!
second_time
)
{
/* Handle calls that pass values in multiple non-contiguous
locations. The Irix 6 ABI has examples of this. */
if
(
GET_CODE
(
entry_parm
)
==
PARALLEL
)
emit_group_store
(
validize_mem
(
stack_parm
),
entry_parm
,
int_size_in_bytes
(
TREE_TYPE
(
parm
)),
(
TYPE_ALIGN
(
TREE_TYPE
(
parm
))
/
BITS_PER_UNIT
));
else
move_block_from_reg
(
REGNO
(
entry_parm
),
validize_mem
(
stack_parm
),
nregs
,
int_size_in_bytes
(
TREE_TYPE
(
parm
)));
}
/* Handle calls that pass values in multiple non-contiguous
locations. The Irix 6 ABI has examples of this. */
if
(
GET_CODE
(
entry_parm
)
==
PARALLEL
)
emit_group_store
(
validize_mem
(
stack_parm
),
entry_parm
,
int_size_in_bytes
(
TREE_TYPE
(
parm
)),
(
TYPE_ALIGN
(
TREE_TYPE
(
parm
))
/
BITS_PER_UNIT
));
else
move_block_from_reg
(
REGNO
(
entry_parm
),
validize_mem
(
stack_parm
),
nregs
,
int_size_in_bytes
(
TREE_TYPE
(
parm
)));
entry_parm
=
stack_parm
;
}
}
...
...
@@ -4200,8 +4187,7 @@ assign_parms (fndecl, second_time)
entry_parm
=
stack_parm
;
/* Record permanently how this parm was passed. */
if
(
!
second_time
)
DECL_INCOMING_RTL
(
parm
)
=
entry_parm
;
DECL_INCOMING_RTL
(
parm
)
=
entry_parm
;
/* If there is actually space on the stack for this parm,
count it in stack_args_size; otherwise set stack_parm to 0
...
...
@@ -4237,10 +4223,6 @@ assign_parms (fndecl, second_time)
FUNCTION_ARG_ADVANCE
(
args_so_far
,
promoted_mode
,
passed_type
,
named_arg
);
/* If this is our second time through, we are done with this parm. */
if
(
second_time
)
continue
;
/* If we can't trust the parm stack slot to be aligned enough
for its ultimate type, don't use that slot after entry.
We'll make another stack slot, if we need one. */
...
...
@@ -5880,7 +5862,7 @@ expand_function_start (subr, parms_have_cleanups)
/* Initialize rtx for parameters and local variables.
In some cases this requires emitting insns. */
assign_parms
(
subr
,
0
);
assign_parms
(
subr
);
/* Copy the static chain now if it wasn't a register. The delay is to
avoid conflicts with the parameter passing registers. */
...
...
gcc/objc/objc-act.c
View file @
0d1416c6
...
...
@@ -3087,7 +3087,7 @@ hack_method_prototype (nst_methods, tmp_decl)
init_function_start
(
tmp_decl
,
"objc-act"
,
0
);
/* Typically called from expand_function_start for function definitions. */
assign_parms
(
tmp_decl
,
0
);
assign_parms
(
tmp_decl
);
/* install return type */
TREE_TYPE
(
TREE_TYPE
(
tmp_decl
))
=
groktypename
(
TREE_TYPE
(
nst_methods
));
...
...
gcc/tree.h
View file @
0d1416c6
...
...
@@ -2306,7 +2306,7 @@ extern void init_dummy_function_start PROTO ((void));
extern
void
expand_dummy_function_end
PROTO
((
void
));
extern
void
init_function_for_compilation
PROTO
((
void
));
extern
void
init_function_start
PROTO
((
tree
,
char
*
,
int
));
extern
void
assign_parms
PROTO
((
tree
,
int
));
extern
void
assign_parms
PROTO
((
tree
));
extern
void
put_var_into_stack
PROTO
((
tree
));
extern
void
uninitialized_vars_warning
PROTO
((
tree
));
extern
void
setjmp_args_warning
PROTO
((
void
));
...
...
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