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
2b067faf
Commit
2b067faf
authored
Oct 19, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(volatile_insn_p): New function.
From-SVN: r5803
parent
4b2cb4a2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
0 deletions
+65
-0
gcc/rtlanal.c
+65
-0
No files found.
gcc/rtlanal.c
View file @
2b067faf
...
@@ -1259,6 +1259,71 @@ remove_note (insn, note)
...
@@ -1259,6 +1259,71 @@ remove_note (insn, note)
abort
();
abort
();
}
}
/* Nonzero if X contains any volatile instructions. These are instructions
which may cause unpredictable machine state instructions, and thus no
instructions should be moved or combined across them. This includes
only volatile asms and UNSPEC_VOLATILE instructions. */
int
volatile_insn_p
(
x
)
rtx
x
;
{
register
RTX_CODE
code
;
code
=
GET_CODE
(
x
);
switch
(
code
)
{
case
LABEL_REF
:
case
SYMBOL_REF
:
case
CONST_INT
:
case
CONST
:
case
CONST_DOUBLE
:
case
CC0
:
case
PC
:
case
REG
:
case
SCRATCH
:
case
CLOBBER
:
case
ASM_INPUT
:
case
ADDR_VEC
:
case
ADDR_DIFF_VEC
:
case
CALL
:
case
MEM
:
return
0
;
case
UNSPEC_VOLATILE
:
/* case TRAP_IF: This isn't clear yet. */
return
1
;
case
ASM_OPERANDS
:
if
(
MEM_VOLATILE_P
(
x
))
return
1
;
}
/* Recursively scan the operands of this expression. */
{
register
char
*
fmt
=
GET_RTX_FORMAT
(
code
);
register
int
i
;
for
(
i
=
GET_RTX_LENGTH
(
code
)
-
1
;
i
>=
0
;
i
--
)
{
if
(
fmt
[
i
]
==
'e'
)
{
if
(
volatile_refs_p
(
XEXP
(
x
,
i
)))
return
1
;
}
if
(
fmt
[
i
]
==
'E'
)
{
register
int
j
;
for
(
j
=
0
;
j
<
XVECLEN
(
x
,
i
);
j
++
)
if
(
volatile_refs_p
(
XVECEXP
(
x
,
i
,
j
)))
return
1
;
}
}
}
return
0
;
}
/* Nonzero if X contains any volatile memory references
/* Nonzero if X contains any volatile memory references
UNSPEC_VOLATILE operations or volatile ASM_OPERANDS expressions. */
UNSPEC_VOLATILE operations or volatile ASM_OPERANDS expressions. */
...
...
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