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
25e42e9d
Commit
25e42e9d
authored
Jan 18, 2003
by
Kaveh R. Ghazi
Committed by
Kaveh Ghazi
Jan 18, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ra-build.c (undef_to_size_word): Avoid `switch' warning.
From-SVN: r61464
parent
6f9c81f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
24 deletions
+25
-24
gcc/ChangeLog
+4
-0
gcc/ra-build.c
+21
-24
No files found.
gcc/ChangeLog
View file @
25e42e9d
2003
-
01
-
17
Kaveh
R
.
Ghazi
<
ghazi
@caip
.
rutgers
.
edu
>
*
ra
-
build
.
c
(
undef_to_size_word
)
:
Avoid
`
switch
'
warning
.
2003
-
01
-
17
Dale
Johannesen
<
dalej
@apple
.
com
>
*
config
/
rs6000
/
rs6000
.
md
(
*
floatsidf2_internal
)
:
Add
earlyclobbers
.
...
...
gcc/ra-build.c
View file @
25e42e9d
...
...
@@ -398,8 +398,9 @@ undef_to_size_word (reg, undefined)
}
/* Otherwise we handle certain cases directly. */
switch
(
*
undefined
)
{
if
(
*
undefined
<=
0xffff
)
switch
((
int
)
*
undefined
)
{
case
0x00f0
:
*
undefined
=
0
;
return
BL_TO_WORD
(
4
,
4
);
case
0x00ff
:
*
undefined
=
0
;
return
BL_TO_WORD
(
0
,
8
);
case
0x0f00
:
*
undefined
=
0
;
return
BL_TO_WORD
(
8
,
4
);
...
...
@@ -413,29 +414,25 @@ undef_to_size_word (reg, undefined)
case
0xff00
:
*
undefined
=
0
;
return
BL_TO_WORD
(
8
,
8
);
case
0xfff0
:
*
undefined
=
0xf0
;
return
BL_TO_WORD
(
8
,
8
);
case
0xffff
:
*
undefined
=
0
;
return
BL_TO_WORD
(
0
,
16
);
}
/* And if nothing matched fall back to the general solution.
For now unknown undefined bytes are converted to sequences
of maximal length 4 bytes. We could make this larger if
necessary. */
default
:
{
unsigned
HOST_WIDE_INT
u
=
*
undefined
;
int
word
;
struct
undef_table_s
tab
;
for
(
word
=
0
;
(
u
&
15
)
==
0
;
word
+=
4
)
u
>>=
4
;
u
=
u
&
15
;
tab
=
undef_table
[
u
];
u
=
tab
.
new_undef
;
u
=
(
*
undefined
&
~
((
unsigned
HOST_WIDE_INT
)
15
<<
word
))
|
(
u
<<
word
);
*
undefined
=
u
;
/* Size remains the same, only the begin is moved up move bytes. */
return
tab
.
size_word
+
BL_TO_WORD
(
word
,
0
);
}
break
;
}
/* And if nothing matched fall back to the general solution. For
now unknown undefined bytes are converted to sequences of maximal
length 4 bytes. We could make this larger if necessary. */
{
unsigned
HOST_WIDE_INT
u
=
*
undefined
;
int
word
;
struct
undef_table_s
tab
;
for
(
word
=
0
;
(
u
&
15
)
==
0
;
word
+=
4
)
u
>>=
4
;
u
=
u
&
15
;
tab
=
undef_table
[
u
];
u
=
tab
.
new_undef
;
u
=
(
*
undefined
&
~
((
unsigned
HOST_WIDE_INT
)
15
<<
word
))
|
(
u
<<
word
);
*
undefined
=
u
;
/* Size remains the same, only the begin is moved up move bytes. */
return
tab
.
size_word
+
BL_TO_WORD
(
word
,
0
);
}
}
/* Put the above three functions together. For a set of undefined bytes
...
...
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