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
3cb66fd7
Commit
3cb66fd7
authored
Feb 04, 2002
by
Nick Clifton
Committed by
Nick Clifton
Feb 04, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace current_function_anonymous_args with cfun->machine->uses_anonymous_args
From-SVN: r49490
parent
53804e7c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
30 deletions
+24
-30
gcc/ChangeLog
+12
-0
gcc/config/arm/arm.c
+9
-26
gcc/config/arm/arm.h
+3
-4
No files found.
gcc/ChangeLog
View file @
3cb66fd7
2002-02-04 Nick Clifton <nickc@cambridge.redhat.com>
* config/arm/arm.h (machine_function): Add uses_anonymous_args
field.
(SETUP_INCOMING_VARARGS): Set uses_anonymous_args.
* config/arm/arm.c (current_function_anonymous_args): Delete,
replace uses with cfun->machine->uses_anonymous_args.
(arm_reorg): Do not reset uses_anonymous_args.
* config/arm/arm.c (arm_hard_regno_mode_ok): Allow any value in
any geenral register.
2001-02-04 Bernd Schmidt <bernds@redhat.com>
2001-02-04 Bernd Schmidt <bernds@redhat.com>
* cfgrtl.c (force_nonfallthru_and_redirect): Don't try to redirect
* cfgrtl.c (force_nonfallthru_and_redirect): Don't try to redirect
...
...
gcc/config/arm/arm.c
View file @
3cb66fd7
...
@@ -266,9 +266,6 @@ int thumb_code = 0;
...
@@ -266,9 +266,6 @@ int thumb_code = 0;
PRINT_OPERAND_ADDRESS. */
PRINT_OPERAND_ADDRESS. */
enum
machine_mode
output_memory_reference_mode
;
enum
machine_mode
output_memory_reference_mode
;
/* Nonzero if the prologue must setup `fp'. */
int
current_function_anonymous_args
;
/* The register number to be used for the PIC offset register. */
/* The register number to be used for the PIC offset register. */
const
char
*
arm_pic_register_string
=
NULL
;
const
char
*
arm_pic_register_string
=
NULL
;
int
arm_pic_register
=
9
;
int
arm_pic_register
=
9
;
...
@@ -909,7 +906,7 @@ use_return_insn (iscond)
...
@@ -909,7 +906,7 @@ use_return_insn (iscond)
/* As do variadic functions. */
/* As do variadic functions. */
if
(
current_function_pretend_args_size
if
(
current_function_pretend_args_size
||
c
urrent_function
_anonymous_args
||
c
fun
->
machine
->
uses
_anonymous_args
/* Of if the function calls __builtin_eh_return () */
/* Of if the function calls __builtin_eh_return () */
||
ARM_FUNC_TYPE
(
func_type
)
==
ARM_FT_EXCEPTION_HANDLER
||
ARM_FUNC_TYPE
(
func_type
)
==
ARM_FT_EXCEPTION_HANDLER
/* Or if there is no frame pointer and there is a stack adjustment. */
/* Or if there is no frame pointer and there is a stack adjustment. */
...
@@ -7457,9 +7454,9 @@ arm_output_function_prologue (f, frame_size)
...
@@ -7457,9 +7454,9 @@ arm_output_function_prologue (f, frame_size)
current_function_args_size
,
current_function_args_size
,
current_function_pretend_args_size
,
frame_size
);
current_function_pretend_args_size
,
frame_size
);
asm_fprintf
(
f
,
"
\t
%@ frame_needed = %d,
current_function
_anonymous_args = %d
\n
"
,
asm_fprintf
(
f
,
"
\t
%@ frame_needed = %d,
uses
_anonymous_args = %d
\n
"
,
frame_pointer_needed
,
frame_pointer_needed
,
c
urrent_function
_anonymous_args
);
c
fun
->
machine
->
uses
_anonymous_args
);
if
(
cfun
->
machine
->
lr_save_eliminated
)
if
(
cfun
->
machine
->
lr_save_eliminated
)
asm_fprintf
(
f
,
"
\t
%@ link register save eliminated.
\n
"
);
asm_fprintf
(
f
,
"
\t
%@ link register save eliminated.
\n
"
);
...
@@ -7754,7 +7751,6 @@ arm_output_function_epilogue (file, frame_size)
...
@@ -7754,7 +7751,6 @@ arm_output_function_epilogue (file, frame_size)
abort
();
abort
();
/* Reset the ARM-specific per-function variables. */
/* Reset the ARM-specific per-function variables. */
current_function_anonymous_args
=
0
;
after_arm_reorg
=
0
;
after_arm_reorg
=
0
;
}
}
}
}
...
@@ -8068,7 +8064,7 @@ arm_compute_initial_elimination_offset (from, to)
...
@@ -8068,7 +8064,7 @@ arm_compute_initial_elimination_offset (from, to)
/* FIXME: Not sure about this. Maybe we should always return 0 ? */
/* FIXME: Not sure about this. Maybe we should always return 0 ? */
return
(
frame_pointer_needed
return
(
frame_pointer_needed
&&
current_function_needs_context
&&
current_function_needs_context
&&
!
c
urrent_function
_anonymous_args
)
?
4
:
0
;
&&
!
c
fun
->
machine
->
uses
_anonymous_args
)
?
4
:
0
;
case
STACK_POINTER_REGNUM
:
case
STACK_POINTER_REGNUM
:
/* If nothing has been pushed on the stack at all
/* If nothing has been pushed on the stack at all
...
@@ -8209,7 +8205,7 @@ arm_expand_prologue ()
...
@@ -8209,7 +8205,7 @@ arm_expand_prologue ()
else
else
{
{
/* Store the args on the stack. */
/* Store the args on the stack. */
if
(
c
urrent_function
_anonymous_args
)
if
(
c
fun
->
machine
->
uses
_anonymous_args
)
insn
=
emit_multi_reg_push
insn
=
emit_multi_reg_push
((
0xf0
>>
(
args_to_push
/
4
))
&
0xf
);
((
0xf0
>>
(
args_to_push
/
4
))
&
0xf
);
else
else
...
@@ -8245,7 +8241,7 @@ arm_expand_prologue ()
...
@@ -8245,7 +8241,7 @@ arm_expand_prologue ()
if
(
args_to_push
)
if
(
args_to_push
)
{
{
/* Push the argument registers, or reserve space for them. */
/* Push the argument registers, or reserve space for them. */
if
(
c
urrent_function
_anonymous_args
)
if
(
c
fun
->
machine
->
uses
_anonymous_args
)
insn
=
emit_multi_reg_push
insn
=
emit_multi_reg_push
((
0xf0
>>
(
args_to_push
/
4
))
&
0xf
);
((
0xf0
>>
(
args_to_push
/
4
))
&
0xf
);
else
else
...
@@ -9139,20 +9135,8 @@ arm_hard_regno_mode_ok (regno, mode)
...
@@ -9139,20 +9135,8 @@ arm_hard_regno_mode_ok (regno, mode)
return
(
NUM_REGS
(
mode
)
<
2
)
||
(
regno
<
LAST_LO_REGNUM
);
return
(
NUM_REGS
(
mode
)
<
2
)
||
(
regno
<
LAST_LO_REGNUM
);
if
(
regno
<=
LAST_ARM_REGNUM
)
if
(
regno
<=
LAST_ARM_REGNUM
)
/* We allow an SImode or smaller value to be stored in any
/* We allow any value to be stored in the general regisetrs. */
general purpose register. This does not mean, for example
return
1
;
that GCC will choose to store a variable in the stack pointer
since it is a fixed register. But it is important to allow
access to these special registers, so that they can be
referenced from C code via the asm assembler alias, eg:
register char * stack_ptr asm ("sp");
For any mode requiring more than one register to hold the
value we restrict the choice so that r13, r14, and r15
cannot be part of the register set. */
return
(
NUM_REGS
(
mode
)
<=
1
)
||
(
regno
<
(
SP_REGNUM
-
(
unsigned
)
NUM_REGS
(
mode
)));
if
(
regno
==
FRAME_POINTER_REGNUM
if
(
regno
==
FRAME_POINTER_REGNUM
||
regno
==
ARG_POINTER_REGNUM
)
||
regno
==
ARG_POINTER_REGNUM
)
...
@@ -10187,7 +10171,6 @@ thumb_expand_prologue ()
...
@@ -10187,7 +10171,6 @@ thumb_expand_prologue ()
if
(
regno
>
LAST_LO_REGNUM
)
/* Very unlikely */
if
(
regno
>
LAST_LO_REGNUM
)
/* Very unlikely */
{
{
rtx
spare
=
gen_rtx
(
REG
,
SImode
,
IP_REGNUM
);
rtx
spare
=
gen_rtx
(
REG
,
SImode
,
IP_REGNUM
);
rtx
insn
;
/* Choose an arbitary, non-argument low register. */
/* Choose an arbitary, non-argument low register. */
reg
=
gen_rtx
(
REG
,
SImode
,
LAST_LO_REGNUM
);
reg
=
gen_rtx
(
REG
,
SImode
,
LAST_LO_REGNUM
);
...
@@ -10312,7 +10295,7 @@ thumb_output_function_prologue (f, size)
...
@@ -10312,7 +10295,7 @@ thumb_output_function_prologue (f, size)
if
(
current_function_pretend_args_size
)
if
(
current_function_pretend_args_size
)
{
{
if
(
c
urrent_function
_anonymous_args
)
if
(
c
fun
->
machine
->
uses
_anonymous_args
)
{
{
int
num_pushes
;
int
num_pushes
;
...
...
gcc/config/arm/arm.h
View file @
3cb66fd7
...
@@ -81,8 +81,6 @@ extern struct rtx_def * pool_vector_label;
...
@@ -81,8 +81,6 @@ extern struct rtx_def * pool_vector_label;
/* Set to 1 when a return insn is output, this means that the epilogue
/* Set to 1 when a return insn is output, this means that the epilogue
is not needed. */
is not needed. */
extern
int
return_used_this_function
;
extern
int
return_used_this_function
;
/* Nonzero if the prologue must setup `fp'. */
extern
int
current_function_anonymous_args
;
/* Just in case configure has failed to define anything. */
/* Just in case configure has failed to define anything. */
#ifndef TARGET_CPU_DEFAULT
#ifndef TARGET_CPU_DEFAULT
...
@@ -1454,6 +1452,8 @@ typedef struct machine_function
...
@@ -1454,6 +1452,8 @@ typedef struct machine_function
int
lr_save_eliminated
;
int
lr_save_eliminated
;
/* Records the type of the current function. */
/* Records the type of the current function. */
unsigned
long
func_type
;
unsigned
long
func_type
;
/* Record if the function has a variable argument list. */
int
uses_anonymous_args
;
}
}
machine_function
;
machine_function
;
...
@@ -1536,8 +1536,7 @@ typedef struct
...
@@ -1536,8 +1536,7 @@ typedef struct
that way. */
that way. */
#define SETUP_INCOMING_VARARGS(CUM, MODE, TYPE, PRETEND_SIZE, NO_RTL) \
#define SETUP_INCOMING_VARARGS(CUM, MODE, TYPE, PRETEND_SIZE, NO_RTL) \
{ \
{ \
extern int current_function_anonymous_args; \
cfun->machine->uses_anonymous_args = 1; \
current_function_anonymous_args = 1; \
if ((CUM).nregs < NUM_ARG_REGS) \
if ((CUM).nregs < NUM_ARG_REGS) \
(PRETEND_SIZE) = (NUM_ARG_REGS - (CUM).nregs) * UNITS_PER_WORD; \
(PRETEND_SIZE) = (NUM_ARG_REGS - (CUM).nregs) * UNITS_PER_WORD; \
}
}
...
...
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