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
8839fca4
Commit
8839fca4
authored
Jan 14, 1997
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for new target macro CONSTANT_AFTER_FUNCTION_P
From-SVN: r13489
parent
686fc141
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
4 deletions
+45
-4
gcc/varasm.c
+45
-4
No files found.
gcc/varasm.c
View file @
8839fca4
/* Output variables, constants and external declarations, for GNU compiler.
Copyright (C) 1987, 88, 89, 92-
5, 1996
Free Software Foundation, Inc.
Copyright (C) 1987, 88, 89, 92-
6, 1997
Free Software Foundation, Inc.
This file is part of GNU CC.
...
...
@@ -144,6 +144,7 @@ static struct constant_descriptor *record_constant_rtx PROTO((enum machine_mode,
rtx
));
static
struct
pool_constant
*
find_pool_constant
PROTO
((
rtx
));
static
int
output_addressed_constants
PROTO
((
tree
));
static
void
output_after_function_constants
PROTO
((
void
));
static
void
bc_assemble_integer
PROTO
((
tree
,
int
));
static
void
output_constructor
PROTO
((
tree
,
int
));
...
...
@@ -1025,6 +1026,9 @@ assemble_end_function (decl, fnname)
#endif
if
(
!
CONSTANT_POOL_BEFORE_FUNCTION
)
output_constant_pool
(
fnname
,
decl
);
/* Output any constants which should appear after the function. */
output_after_function_constants
();
}
/* Assemble code to leave SIZE bytes of zeros. */
...
...
@@ -2737,6 +2741,10 @@ struct deferred_constant
static
struct
deferred_constant
*
deferred_constants
;
/* Another list of constants which should be output after the
function. */
static
struct
deferred_constant
*
after_function_constants
;
/* Nonzero means defer output of addressed subconstants
(i.e., those for which output_constant_def is called.) */
static
int
defer_addressed_constants_flag
;
...
...
@@ -2772,6 +2780,23 @@ output_deferred_addressed_constants ()
deferred_constants
=
0
;
}
/* Output any constants which should appear after a function. */
static
void
output_after_function_constants
()
{
struct
deferred_constant
*
p
,
*
next
;
for
(
p
=
after_function_constants
;
p
;
p
=
next
)
{
output_constant_def_contents
(
p
->
exp
,
p
->
reloc
,
p
->
labelno
);
next
=
p
->
next
;
free
(
p
);
}
after_function_constants
=
0
;
}
/* Make a copy of the whole tree structure for a constant.
This handles the same types of nodes that compare_constant
and record_constant handle. */
...
...
@@ -2925,7 +2950,15 @@ output_constant_def (exp)
output it (or defer its output for later). */
if
(
found
==
0
)
{
if
(
defer_addressed_constants_flag
)
int
after_function
=
0
;
#ifdef CONSTANT_AFTER_FUNCTION_P
if
(
current_function_decl
!=
0
&&
CONSTANT_AFTER_FUNCTION_P
(
exp
))
after_function
=
1
;
#endif
if
(
defer_addressed_constants_flag
||
after_function
)
{
struct
deferred_constant
*
p
;
p
=
(
struct
deferred_constant
*
)
xmalloc
(
sizeof
(
struct
deferred_constant
));
...
...
@@ -2936,8 +2969,16 @@ output_constant_def (exp)
pop_obstacks
();
p
->
reloc
=
reloc
;
p
->
labelno
=
const_labelno
++
;
p
->
next
=
deferred_constants
;
deferred_constants
=
p
;
if
(
after_function
)
{
p
->
next
=
after_function_constants
;
after_function_constants
=
p
;
}
else
{
p
->
next
=
deferred_constants
;
deferred_constants
=
p
;
}
}
else
output_constant_def_contents
(
exp
,
reloc
,
const_labelno
++
);
...
...
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