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
4bf7135b
Commit
4bf7135b
authored
28 years ago
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(eligible_for_delay_slot): Clean up and make to agree precisely with
patterns in MD file. From-SVN: r13866
parent
0b73ca18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
27 deletions
+42
-27
gcc/config/sparc/sparc.c
+42
-27
No files found.
gcc/config/sparc/sparc.c
View file @
4bf7135b
/* Subroutines for insn-output.c for Sun SPARC.
Copyright (C) 1987, 88, 89, 92-95, 1996 Free Software Foundation, Inc.
Copyright (C) 1987, 88, 89, 92-95, 1996
, 1997
Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
at Cygnus Support.
...
...
@@ -1110,9 +1110,10 @@ eligible_for_epilogue_delay (trial, slot)
if
(
slot
>=
1
)
return
0
;
if
(
GET_CODE
(
trial
)
!=
INSN
||
GET_CODE
(
PATTERN
(
trial
))
!=
SET
)
if
(
GET_CODE
(
trial
)
!=
INSN
||
GET_CODE
(
PATTERN
(
trial
))
!=
SET
)
return
0
;
if
(
get_attr_length
(
trial
)
!=
1
)
return
0
;
...
...
@@ -1128,9 +1129,11 @@ eligible_for_epilogue_delay (trial, slot)
if
(
leaf_function
)
{
if
(
leaf_return_peephole_ok
())
return
(
get_attr_in_uncond_branch_delay
(
trial
)
==
IN_BRANCH_DELAY_TRUE
);
return
((
get_attr_in_uncond_branch_delay
(
trial
)
==
IN_BRANCH_DELAY_TRUE
));
return
0
;
}
/* If only trivial `restore' insns work, nothing can go in the
delay slot. */
else
if
(
TARGET_BROKEN_SAVERESTORE
)
...
...
@@ -1145,35 +1148,47 @@ eligible_for_epilogue_delay (trial, slot)
||
REGNO
(
SET_DEST
(
pat
))
<
24
)
return
0
;
/* The set of insns matched here must agree precisely with the set of
patterns paired with a RETURN in sparc.md. */
src
=
SET_SRC
(
pat
);
/* This matches "*return_[qhs]". */
if
(
arith_operand
(
src
,
GET_MODE
(
src
)))
return
GET_MODE_SIZE
(
GET_MODE
(
src
))
<=
GET_MODE_SIZE
(
SImode
);
if
(
arith_double_operand
(
src
,
GET_MODE
(
src
)))
/* This matches "*return_di". */
else
if
(
arith_double_operand
(
src
,
GET_MODE
(
src
)))
return
GET_MODE_SIZE
(
GET_MODE
(
src
))
<=
GET_MODE_SIZE
(
DImode
);
if
(
GET_CODE
(
src
)
==
PLUS
)
{
if
(
register_operand
(
XEXP
(
src
,
0
),
SImode
)
&&
arith_operand
(
XEXP
(
src
,
1
),
SImode
))
return
1
;
if
(
register_operand
(
XEXP
(
src
,
1
),
SImode
)
&&
arith_operand
(
XEXP
(
src
,
0
),
SImode
))
return
1
;
if
(
register_operand
(
XEXP
(
src
,
0
),
DImode
)
&&
arith_double_operand
(
XEXP
(
src
,
1
),
DImode
))
return
1
;
if
(
register_operand
(
XEXP
(
src
,
1
),
DImode
)
&&
arith_double_operand
(
XEXP
(
src
,
0
),
DImode
))
return
1
;
}
if
(
GET_CODE
(
src
)
==
MINUS
&&
register_operand
(
XEXP
(
src
,
0
),
SImode
)
&&
small_int
(
XEXP
(
src
,
1
),
VOIDmode
))
/* This matches "*return_sf_no_fpu". */
else
if
(
!
TARGET_FPU
&&
restore_operand
(
SET_DEST
(
pat
),
SFmode
)
&&
register_operand
(
src
,
SFmode
))
return
1
;
/* This matches "*return_addsi". */
else
if
(
GET_CODE
(
src
)
==
PLUS
&&
arith_operand
(
XEXP
(
src
,
0
),
SImode
)
&&
arith_operand
(
XEXP
(
src
,
1
),
SImode
)
&&
(
register_operand
(
XEXP
(
src
,
0
),
SImode
)
||
register_operand
(
XEXP
(
src
,
1
),
SImode
)))
return
1
;
if
(
GET_CODE
(
src
)
==
MINUS
&&
register_operand
(
XEXP
(
src
,
0
),
DImode
)
&&
!
register_operand
(
XEXP
(
src
,
1
),
DImode
)
&&
arith_double_operand
(
XEXP
(
src
,
1
),
DImode
))
/* This matches "*return_adddi". */
else
if
(
GET_CODE
(
src
)
==
PLUS
&&
arith_double_operand
(
XEXP
(
src
,
0
),
DImode
)
&&
arith_double_operand
(
XEXP
(
src
,
1
),
DImode
)
&&
(
register_operand
(
XEXP
(
src
,
0
),
DImode
)
||
register_operand
(
XEXP
(
src
,
1
),
DImode
)))
return
1
;
/* This matches "*return_subsi". */
else
if
(
GET_CODE
(
src
)
==
MINUS
&&
register_operand
(
XEXP
(
src
,
0
),
SImode
)
&&
small_int
(
XEXP
(
src
,
1
),
VOIDmode
)
&&
INTVAL
(
XEXP
(
src
,
1
))
!=
-
4096
)
return
1
;
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
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