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
d9ca49d5
Commit
d9ca49d5
authored
May 27, 1992
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r1103
parent
7d349561
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
15 deletions
+35
-15
gcc/config/i960/i960.c
+6
-6
gcc/config/sparc/sparc.h
+20
-7
gcc/function.c
+9
-2
No files found.
gcc/config/i960/i960.c
View file @
d9ca49d5
...
@@ -809,7 +809,7 @@ i960_function_name_declare (file, name, fndecl)
...
@@ -809,7 +809,7 @@ i960_function_name_declare (file, name, fndecl)
/* Even if nobody uses extra parms, can't have leafroc or tail calls if
/* Even if nobody uses extra parms, can't have leafroc or tail calls if
argblock, because argblock uses g14 implicitly. */
argblock, because argblock uses g14 implicitly. */
if
(
current_function_args_size
>
48
)
if
(
current_function_args_size
!=
0
)
{
{
tail_call_ok
=
0
;
tail_call_ok
=
0
;
leaf_proc_ok
=
0
;
leaf_proc_ok
=
0
;
...
@@ -1165,7 +1165,7 @@ i960_function_epilogue (file, size)
...
@@ -1165,7 +1165,7 @@ i960_function_epilogue (file, size)
/* Must clear g14 on return. */
/* Must clear g14 on return. */
if
(
current_function_args_size
>
48
)
if
(
current_function_args_size
!=
0
)
fprintf
(
file
,
"
\t
mov 0,g14
\n
"
);
fprintf
(
file
,
"
\t
mov 0,g14
\n
"
);
fprintf
(
file
,
"
\t
ret
\n
"
);
fprintf
(
file
,
"
\t
ret
\n
"
);
...
@@ -1221,7 +1221,7 @@ i960_output_ret_insn (insn)
...
@@ -1221,7 +1221,7 @@ i960_output_ret_insn (insn)
return
lbuf
;
return
lbuf
;
}
}
if
(
current_function_args_size
>
48
)
if
(
current_function_args_size
!=
0
)
output_asm_insn
(
"mov 0,g14"
,
0
);
output_asm_insn
(
"mov 0,g14"
,
0
);
if
(
i960_leaf_ret_reg
>=
0
)
if
(
i960_leaf_ret_reg
>=
0
)
...
@@ -2135,7 +2135,7 @@ i960_reg_parm_stack_space (fndecl)
...
@@ -2135,7 +2135,7 @@ i960_reg_parm_stack_space (fndecl)
/* Otherwise, we have an arg block if the current function has more than
/* Otherwise, we have an arg block if the current function has more than
48 bytes of parameters. */
48 bytes of parameters. */
if
(
current_function_args_size
>
48
)
if
(
current_function_args_size
!=
0
)
return
48
;
return
48
;
else
else
return
0
;
return
0
;
...
@@ -2195,7 +2195,7 @@ i960_expand_call (first_operand, second_operand, target)
...
@@ -2195,7 +2195,7 @@ i960_expand_call (first_operand, second_operand, target)
function call. If the current function has no argument block,
function call. If the current function has no argument block,
then g14 is zero before and after the call. */
then g14 is zero before and after the call. */
if
(
current_function_args_size
>
48
)
if
(
current_function_args_size
!=
0
)
{
{
start_sequence
();
start_sequence
();
seq_stack
=
sequence_stack
;
seq_stack
=
sequence_stack
;
...
@@ -2209,7 +2209,7 @@ i960_expand_call (first_operand, second_operand, target)
...
@@ -2209,7 +2209,7 @@ i960_expand_call (first_operand, second_operand, target)
}
}
}
}
if
(
current_function_args_size
>
48
)
if
(
current_function_args_size
!=
0
)
frob_g14
=
1
;
frob_g14
=
1
;
if
(
GET_CODE
(
second_operand
)
!=
CONST_INT
||
INTVAL
(
second_operand
)
>
48
)
if
(
GET_CODE
(
second_operand
)
!=
CONST_INT
||
INTVAL
(
second_operand
)
>
48
)
...
...
gcc/config/sparc/sparc.h
View file @
d9ca49d5
...
@@ -38,6 +38,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
...
@@ -38,6 +38,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define CC1_SPEC "%{sun4:} %{target:}"
#define CC1_SPEC "%{sun4:} %{target:}"
#if 0
/* Sparc ABI says that long double is 4 words.
??? This doesn't work yet. */
#define LONG_DOUBLE_TYPE_SIZE 128
#endif
#define PTRDIFF_TYPE "int"
#define PTRDIFF_TYPE "int"
#define SIZE_TYPE "int"
#define SIZE_TYPE "int"
#define WCHAR_TYPE "short unsigned int"
#define WCHAR_TYPE "short unsigned int"
...
@@ -239,11 +245,10 @@ extern int target_flags;
...
@@ -239,11 +245,10 @@ extern int target_flags;
and are not available for the register allocator.
and are not available for the register allocator.
0 is used for the condition code and not to represent %g0, which is
0 is used for the condition code and not to represent %g0, which is
hardwired to 0, so reg 0 is *not* fixed.
hardwired to 0, so reg 0 is *not* fixed.
2 and 3 are free to use as temporaries.
g1 through g4 are free to use as temporaries.
4 through 7 are expected to become usefully defined in the future.
g5 through g7 are reserved for the operating system. */
Your milage may vary. */
#define FIXED_REGISTERS \
#define FIXED_REGISTERS \
{0, 0, 0, 0,
1
, 1, 1, 1, \
{0, 0, 0, 0,
0
, 1, 1, 1, \
0, 0, 0, 0, 0, 0, 1, 0, \
0, 0, 0, 0, 0, 0, 1, 0, \
0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 1, 1, \
0, 0, 0, 0, 0, 0, 1, 1, \
...
@@ -361,6 +366,12 @@ extern int leaf_function;
...
@@ -361,6 +366,12 @@ extern int leaf_function;
#define INITIALIZE_PIC initialize_pic ()
#define INITIALIZE_PIC initialize_pic ()
#define FINALIZE_PIC finalize_pic ()
#define FINALIZE_PIC finalize_pic ()
/* Sparc ABI says that quad-precision floats and all structures are returned
in memory. */
#define RETURN_IN_MEMORY(TYPE) \
(TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE (TYPE) == UNION_TYPE \
|| TYPE_MODE (TYPE) == TFmode)
/* Functions which return large structures get the address
/* Functions which return large structures get the address
to place the wanted value at offset 64 from the frame.
to place the wanted value at offset 64 from the frame.
Must reserve 64 bytes for the in and local registers. */
Must reserve 64 bytes for the in and local registers. */
...
@@ -726,10 +737,12 @@ extern char leaf_reg_backmap[];
...
@@ -726,10 +737,12 @@ extern char leaf_reg_backmap[];
? (NPARM_REGS - ROUND_REG ((CUM), (MODE))) \
? (NPARM_REGS - ROUND_REG ((CUM), (MODE))) \
: 0)
: 0)
/* The SPARC ABI stipulates passing struct arguments (of any size)
/* The SPARC ABI stipulates passing struct arguments (of any size)
and
by invisible reference. */
quad-precision floats
by invisible reference. */
#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
(TYPE && (TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE (TYPE) == UNION_TYPE))
((TYPE && (TREE_CODE (TYPE) == RECORD_TYPE \
|| TREE_CODE (TYPE) == UNION_TYPE)) \
|| (MODE == TFmode))
/* If defined, a C expression that gives the alignment boundary, in
/* If defined, a C expression that gives the alignment boundary, in
bits, of an argument with the specified mode and type. If it is
bits, of an argument with the specified mode and type. If it is
...
...
gcc/function.c
View file @
d9ca49d5
...
@@ -2686,9 +2686,16 @@ assign_parms (fndecl, second_time)
...
@@ -2686,9 +2686,16 @@ assign_parms (fndecl, second_time)
to indicate there is no preallocated stack slot for the parm. */
to indicate there is no preallocated stack slot for the parm. */
if
(
entry_parm
==
stack_parm
if
(
entry_parm
==
stack_parm
#if
def REG_PARM_STACK_SPACE
#if
defined (REG_PARM_STACK_SPACE) && ! defined (MAYBE_REG_PARM_STACK_SPACE)
/* On some machines, even if a parm value arrives in a register
/* On some machines, even if a parm value arrives in a register
there is still an (uninitialized) stack slot allocated for it. */
there is still an (uninitialized) stack slot allocated for it.
??? When MAYBE_REG_PARM_STACK_SPACE is defined, we can't tell
whether this parameter already has a stack slot allocated,
because an arg block exists only if current_function_args_size
is larger than some threshhold, and we haven't calculated that
yet. So, for now, we just assume that stack slots never exist
in this case. */
||
REG_PARM_STACK_SPACE
(
fndecl
)
>
0
||
REG_PARM_STACK_SPACE
(
fndecl
)
>
0
#endif
#endif
)
)
...
...
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