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
3fbd5c2c
Commit
3fbd5c2c
authored
Oct 26, 1998
by
Richard Henderson
Committed by
Richard Henderson
Oct 26, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* stmt.c (expand_asm_operands): Accept `=' or `+' at any position.
From-SVN: r23356
parent
386c8529
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
gcc/ChangeLog
+4
-0
gcc/stmt.c
+21
-2
No files found.
gcc/ChangeLog
View file @
3fbd5c2c
Mon
Oct
26
13
:
32
:
31
1998
Richard
Henderson
<
rth
@cygnus
.
com
>
*
stmt
.
c
(
expand_asm_operands
)
:
Accept
`
=
'
or
`
+
'
at
any
position
.
Mon
Oct
26
12
:
53
:
14
1998
Jeffrey
A
Law
(
law
@cygnus
.
com
)
Mon
Oct
26
12
:
53
:
14
1998
Jeffrey
A
Law
(
law
@cygnus
.
com
)
*
tm
.
texi
(
ASM_OUTPUT_MAX_SKIP_ALIGN
)
:
Document
.
*
tm
.
texi
(
ASM_OUTPUT_MAX_SKIP_ALIGN
)
:
Document
.
...
...
gcc/stmt.c
View file @
3fbd5c2c
...
@@ -1230,6 +1230,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
...
@@ -1230,6 +1230,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
tree
val
=
TREE_VALUE
(
tail
);
tree
val
=
TREE_VALUE
(
tail
);
tree
type
=
TREE_TYPE
(
val
);
tree
type
=
TREE_TYPE
(
val
);
char
*
constraint
;
char
*
constraint
;
char
*
p
;
int
c_len
;
int
c_len
;
int
j
;
int
j
;
int
is_inout
=
0
;
int
is_inout
=
0
;
...
@@ -1247,13 +1248,31 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
...
@@ -1247,13 +1248,31 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
c_len
=
TREE_STRING_LENGTH
(
TREE_PURPOSE
(
tail
))
-
1
;
c_len
=
TREE_STRING_LENGTH
(
TREE_PURPOSE
(
tail
))
-
1
;
constraint
=
TREE_STRING_POINTER
(
TREE_PURPOSE
(
tail
));
constraint
=
TREE_STRING_POINTER
(
TREE_PURPOSE
(
tail
));
if
(
c_len
==
0
/* Allow the `=' or `+' to not be at the beginning of the string,
||
(
constraint
[
0
]
!=
'='
&&
constraint
[
0
]
!=
'+'
))
since it wasn't explicitly documented that way, and there is a
large body of code that puts it last. Swap the character to
the front, so as not to uglify any place else. */
switch
(
c_len
)
{
{
default
:
if
((
p
=
strchr
(
constraint
,
'='
))
!=
NULL
)
break
;
if
((
p
=
strchr
(
constraint
,
'+'
))
!=
NULL
)
break
;
case
0
:
error
(
"output operand constraint lacks `='"
);
error
(
"output operand constraint lacks `='"
);
return
;
return
;
}
}
if
(
p
!=
constraint
)
{
j
=
*
p
;
bcopy
(
constraint
,
constraint
+
1
,
p
-
constraint
);
*
constraint
=
j
;
warning
(
"output constraint `%c' for operand %d is not at the beginning"
,
j
,
i
);
}
is_inout
=
constraint
[
0
]
==
'+'
;
is_inout
=
constraint
[
0
]
==
'+'
;
/* Replace '+' with '='. */
/* Replace '+' with '='. */
constraint
[
0
]
=
'='
;
constraint
[
0
]
=
'='
;
...
...
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