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
4b980e20
Commit
4b980e20
authored
Jun 28, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r1318
parent
ca3c6eae
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
52 additions
and
30 deletions
+52
-30
gcc/cse.c
+38
-4
gcc/expmed.c
+6
-0
gcc/flow.c
+0
-3
gcc/integrate.c
+0
-2
gcc/loop.c
+0
-2
gcc/reload1.c
+0
-3
gcc/reorg.c
+0
-3
gcc/rtl.c
+0
-2
gcc/rtl.h
+2
-0
gcc/stmt.c
+0
-3
gcc/toplev.c
+4
-4
gcc/tree.c
+0
-3
gcc/tree.h
+2
-0
gcc/varasm.c
+0
-1
No files found.
gcc/cse.c
View file @
4b980e20
...
...
@@ -4327,10 +4327,32 @@ fold_rtx (x, insn)
||
(
new
=
lookup_as_function
(
x
,
CONST_DOUBLE
))
!=
0
)
return
new
;
/* If this is a paradoxical SUBREG, we can't do anything with
it because we have no idea what value the extra bits would have. */
/* If this is a paradoxical SUBREG, we have no idea what value the
extra bits would have. However, if the operand is equivalent
to a SUBREG whose operand is the same as our mode, and all the
modes are within a word, we can just use the inner operand
because these SUBREGs just say how to treat the register. */
if
(
GET_MODE_SIZE
(
mode
)
>
GET_MODE_SIZE
(
GET_MODE
(
SUBREG_REG
(
x
))))
return
x
;
{
enum
machine_mode
imode
=
GET_MODE
(
SUBREG_REG
(
x
));
struct
table_elt
*
elt
;
if
(
GET_MODE_SIZE
(
mode
)
<=
UNITS_PER_WORD
&&
GET_MODE_SIZE
(
imode
)
<=
UNITS_PER_WORD
&&
(
elt
=
lookup
(
SUBREG_REG
(
x
),
HASH
(
SUBREG_REG
(
x
),
imode
),
imode
))
!=
0
)
{
for
(
elt
=
elt
->
first_same_value
;
elt
;
elt
=
elt
->
next_same_value
)
if
(
GET_CODE
(
elt
->
exp
)
==
SUBREG
&&
GET_MODE
(
SUBREG_REG
(
elt
->
exp
))
==
mode
&&
exp_equiv_p
(
elt
->
exp
,
elt
->
exp
,
1
))
return
copy_rtx
(
SUBREG_REG
(
elt
->
exp
));
}
return
x
;
}
/* Fold SUBREG_REG. If it changed, see if we can simplify the SUBREG.
We might be able to if the SUBREG is extracting a single word in an
...
...
@@ -4364,7 +4386,12 @@ fold_rtx (x, insn)
extra bits will be. But we can find an equivalence for this SUBREG
by folding that operation is the narrow mode. This allows us to
fold arithmetic in narrow modes when the machine only supports
word-sized arithmetic. */
word-sized arithmetic.
Also look for a case where we have a SUBREG whose operand is the
same as our result. If both modes are smaller than a word, we
are simply interpreting a register in different modes and we
can use the inner value. */
if
(
GET_CODE
(
folded_arg0
)
==
REG
&&
GET_MODE_SIZE
(
mode
)
<
GET_MODE_SIZE
(
GET_MODE
(
folded_arg0
)))
...
...
@@ -4430,6 +4457,13 @@ fold_rtx (x, insn)
op0
,
op1
);
}
else
if
(
GET_CODE
(
elt
->
exp
)
==
SUBREG
&&
GET_MODE
(
SUBREG_REG
(
elt
->
exp
))
==
mode
&&
(
GET_MODE_SIZE
(
GET_MODE
(
folded_arg0
))
<=
UNITS_PER_WORD
)
&&
exp_equiv_p
(
elt
->
exp
,
elt
->
exp
,
1
))
new
=
copy_rtx
(
SUBREG_REG
(
elt
->
exp
));
if
(
new
)
return
new
;
}
...
...
gcc/expmed.c
View file @
4b980e20
...
...
@@ -2782,6 +2782,12 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep)
else
op0
=
subtarget
;
/* If we want to keep subexpressions around, don't reuse our
last target. */
if
(
preserve_subexpressions_p
())
subtarget
=
0
;
/* Now normalize to the proper value in COMPARE_MODE. Sometimes
we don't have to do anything. */
if
(
normalizep
==
0
||
normalizep
==
STORE_FLAG_VALUE
)
...
...
gcc/flow.c
View file @
4b980e20
...
...
@@ -121,9 +121,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
extern
int
xmalloc
();
extern
void
free
();
/* List of labels that must never be deleted. */
extern
rtx
forced_labels
;
...
...
gcc/integrate.c
View file @
4b980e20
...
...
@@ -36,8 +36,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "obstack.h"
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
extern
int
xmalloc
();
extern
void
free
();
extern
struct
obstack
*
function_maybepermanent_obstack
;
...
...
gcc/loop.c
View file @
4b980e20
...
...
@@ -193,8 +193,6 @@ extern struct obstack *rtl_obstack;
#define obstack_chunk_free free
extern
char
*
oballoc
();
extern
int
xmalloc
();
extern
void
free
();
/* During the analysis of a loop, a chain of `struct movable's
is made to record all the movable insns found.
...
...
gcc/reload1.c
View file @
4b980e20
...
...
@@ -246,9 +246,6 @@ char *reload_firstobj;
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
extern
int
xmalloc
();
extern
void
free
();
/* List of labels that must never be deleted. */
extern
rtx
forced_labels
;
...
...
gcc/reorg.c
View file @
4b980e20
...
...
@@ -129,9 +129,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
extern
int
xmalloc
();
extern
void
free
();
#ifndef ANNUL_IFTRUE_SLOTS
#define eligible_for_annul_true(INSN, SLOTS, TRIAL) 0
#endif
...
...
gcc/rtl.c
View file @
4b980e20
...
...
@@ -26,8 +26,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "obstack.h"
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
extern
int
xmalloc
();
extern
void
free
();
/* Obstack used for allocating RTL objects.
Between functions, this is the permanent_obstack.
...
...
gcc/rtl.h
View file @
4b980e20
...
...
@@ -526,6 +526,8 @@ extern char *note_insn_name[];
/* Generally useful functions. */
extern
char
*
xmalloc
();
extern
void
free
();
extern
rtx
rtx_alloc
();
extern
rtvec
rtvec_alloc
();
extern
rtx
find_reg_note
();
...
...
gcc/stmt.c
View file @
4b980e20
...
...
@@ -54,9 +54,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define obstack_chunk_free free
struct
obstack
stmt_obstack
;
extern
int
xmalloc
();
extern
void
free
();
/* Filename and line number of last line-number note,
whether we actually emitted it or not. */
char
*
emit_filename
;
...
...
gcc/toplev.c
View file @
4b980e20
...
...
@@ -1161,11 +1161,11 @@ botch (s)
/* Same as `malloc' but report error if no memory available. */
int
char
*
xmalloc
(
size
)
unsigned
size
;
{
register
int
value
=
(
int
)
malloc
(
size
);
register
char
*
value
=
(
char
*
)
malloc
(
size
);
if
(
value
==
0
)
fatal
(
"virtual memory exhausted"
);
return
value
;
...
...
@@ -1173,12 +1173,12 @@ xmalloc (size)
/* Same as `realloc' but report error if no memory available. */
int
char
*
xrealloc
(
ptr
,
size
)
char
*
ptr
;
int
size
;
{
int
result
=
realloc
(
ptr
,
size
);
char
*
result
=
(
char
*
)
realloc
(
ptr
,
size
);
if
(
!
result
)
fatal
(
"virtual memory exhausted"
);
return
result
;
...
...
gcc/tree.c
View file @
4b980e20
...
...
@@ -43,9 +43,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
extern
int
xmalloc
();
extern
void
free
();
/* Tree nodes of permanent duration are allocated in this obstack.
They are the identifier nodes, and everything outside of
the bodies and parameters of function definitions. */
...
...
gcc/tree.h
View file @
4b980e20
...
...
@@ -855,6 +855,8 @@ union tree_node
extern
char
*
oballoc
();
extern
char
*
permalloc
();
extern
char
*
savealloc
();
extern
char
*
xmalloc
();
extern
void
free
();
/* Lowest level primitive for allocating a node.
The TREE_CODE is the only argument. Contents are initialized
...
...
gcc/varasm.c
View file @
4b980e20
...
...
@@ -58,7 +58,6 @@ extern struct obstack *current_obstack;
extern
struct
obstack
*
saveable_obstack
;
extern
struct
obstack
permanent_obstack
;
#define obstack_chunk_alloc xmalloc
extern
int
xmalloc
();
/* Number for making the label on the next
constant that is stored in memory. */
...
...
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