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
96eaf358
Commit
96eaf358
authored
Nov 12, 2001
by
Kazu Hirata
Committed by
Kazu Hirata
Nov 12, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* config/h8300/h8300.c (get_shift_alg): Remove redundant code.
From-SVN: r46947
parent
e9716dc5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
74 deletions
+59
-74
gcc/ChangeLog
+4
-0
gcc/config/h8300/h8300.c
+55
-74
No files found.
gcc/ChangeLog
View file @
96eaf358
2001
-
11
-
12
Kazu
Hirata
<
kazu
@hxi
.
com
>
*
config
/
h8300
/
h8300
.
c
(
get_shift_alg
)
:
Remove
redundant
code
.
2001
-
11
-
12
Jakub
Jelinek
<
jakub
@redhat
.
com
>
2001
-
11
-
12
Jakub
Jelinek
<
jakub
@redhat
.
com
>
*
dbxout
.
c
(
dbxout_symbol_location
)
:
Avoid
emitting
invalid
register
*
dbxout
.
c
(
dbxout_symbol_location
)
:
Avoid
emitting
invalid
register
...
...
gcc/config/h8300/h8300.c
View file @
96eaf358
...
@@ -2347,34 +2347,67 @@ get_shift_alg (shift_type, shift_mode, count, info)
...
@@ -2347,34 +2347,67 @@ get_shift_alg (shift_type, shift_mode, count, info)
else
else
cpu
=
2
;
cpu
=
2
;
/* In case we end up with SHIFT_SPECIAL, initialize REMAINDER to 0. */
/* Find the shift algorithm. */
info
->
remainder
=
0
;
/* Assume either SHIFT_LOOP or SHIFT_INLINE.
It is up to the caller to know that looping clobbers cc. */
info
->
shift1
=
shift_one
[
cpu_type
][
shift_type
][
shift_mode
].
assembler
;
info
->
shift2
=
shift_two
[
shift_type
][
shift_mode
].
assembler
;
info
->
cc_valid_p
=
shift_one
[
cpu_type
][
shift_type
][
shift_mode
].
cc_valid
;
/* Now look for cases we want to optimize. */
switch
(
shift_mode
)
switch
(
shift_mode
)
{
{
case
QIshift
:
case
QIshift
:
if
(
GET_MODE_BITSIZE
(
QImode
)
<=
count
)
if
(
GET_MODE_BITSIZE
(
QImode
)
<=
count
)
goto
return_shift_loop
;
info
->
alg
=
SHIFT_LOOP
;
else
info
->
alg
=
shift_alg_qi
[
cpu
][
shift_type
][
count
];
break
;
switch
(
shift_alg_qi
[
cpu
][
shift_type
][
count
])
case
HIshift
:
{
if
(
GET_MODE_BITSIZE
(
HImode
)
<=
count
)
case
SHIFT_INLINE
:
info
->
alg
=
SHIFT_LOOP
;
goto
return_shift_inline
;
else
case
SHIFT_LOOP
:
info
->
alg
=
shift_alg_hi
[
cpu
][
shift_type
][
count
];
goto
return_shift_loop
;
break
;
case
SHIFT_ROT_AND
:
goto
return_shift_rot_and
;
case
SIshift
:
case
SHIFT_SPECIAL
:
if
(
GET_MODE_BITSIZE
(
SImode
)
<=
count
)
;
info
->
alg
=
SHIFT_LOOP
;
}
else
info
->
alg
=
shift_alg_si
[
cpu
][
shift_type
][
count
];
break
;
default
:
abort
();
}
/* Fill in INFO. Return unless we have SHIFT_SPECIAL. */
switch
(
info
->
alg
)
{
case
SHIFT_INLINE
:
info
->
remainder
=
count
;
/* Fall through. */
case
SHIFT_LOOP
:
/* It is up to the caller to know that looping clobbers cc. */
info
->
shift1
=
shift_one
[
cpu_type
][
shift_type
][
shift_mode
].
assembler
;
info
->
shift2
=
shift_two
[
shift_type
][
shift_mode
].
assembler
;
info
->
cc_valid_p
=
shift_one
[
cpu_type
][
shift_type
][
shift_mode
].
cc_valid
;
goto
end
;
case
SHIFT_ROT_AND
:
info
->
shift1
=
rotate_one
[
cpu_type
][
shift_type
][
shift_mode
];
info
->
shift2
=
rotate_two
[
shift_type
][
shift_mode
];
info
->
cc_valid_p
=
0
;
goto
end
;
case
SHIFT_SPECIAL
:
/* REMAINDER is 0 for most cases, so initialize it to 0. */
info
->
remainder
=
0
;
info
->
shift1
=
shift_one
[
cpu_type
][
shift_type
][
shift_mode
].
assembler
;
info
->
shift2
=
shift_two
[
shift_type
][
shift_mode
].
assembler
;
info
->
cc_valid_p
=
0
;
break
;
}
/* Here we only deal with SHIFT_SPECIAL. */
switch
(
shift_mode
)
{
case
QIshift
:
/* For ASHIFTRT by 7 bits, the sign bit is simply replicated
/* For ASHIFTRT by 7 bits, the sign bit is simply replicated
through the entire value. */
through the entire value. */
if
(
shift_type
==
SHIFT_ASHIFTRT
&&
count
==
7
)
if
(
shift_type
==
SHIFT_ASHIFTRT
&&
count
==
7
)
...
@@ -2385,21 +2418,6 @@ get_shift_alg (shift_type, shift_mode, count, info)
...
@@ -2385,21 +2418,6 @@ get_shift_alg (shift_type, shift_mode, count, info)
abort
();
abort
();
case
HIshift
:
case
HIshift
:
if
(
GET_MODE_BITSIZE
(
HImode
)
<=
count
)
goto
return_shift_loop
;
switch
(
shift_alg_hi
[
cpu
][
shift_type
][
count
])
{
case
SHIFT_INLINE
:
goto
return_shift_inline
;
case
SHIFT_LOOP
:
goto
return_shift_loop
;
case
SHIFT_ROT_AND
:
goto
return_shift_rot_and
;
case
SHIFT_SPECIAL
:
;
}
if
(
count
==
7
)
if
(
count
==
7
)
{
{
if
(
shift_type
==
SHIFT_ASHIFT
&&
TARGET_H8300
)
if
(
shift_type
==
SHIFT_ASHIFT
&&
TARGET_H8300
)
...
@@ -2466,22 +2484,6 @@ get_shift_alg (shift_type, shift_mode, count, info)
...
@@ -2466,22 +2484,6 @@ get_shift_alg (shift_type, shift_mode, count, info)
abort
();
abort
();
case
SIshift
:
case
SIshift
:
if
(
GET_MODE_BITSIZE
(
SImode
)
<=
count
)
goto
return_shift_loop
;
info
->
alg
=
shift_alg_si
[
cpu
][
shift_type
][
count
];
switch
(
info
->
alg
)
{
case
SHIFT_INLINE
:
goto
return_shift_inline
;
case
SHIFT_LOOP
:
goto
return_shift_loop
;
case
SHIFT_ROT_AND
:
goto
return_shift_rot_and
;
case
SHIFT_SPECIAL
:
;
}
if
(
count
==
8
&&
TARGET_H8300
)
if
(
count
==
8
&&
TARGET_H8300
)
{
{
switch
(
shift_type
)
switch
(
shift_type
)
...
@@ -2583,28 +2585,7 @@ get_shift_alg (shift_type, shift_mode, count, info)
...
@@ -2583,28 +2585,7 @@ get_shift_alg (shift_type, shift_mode, count, info)
abort
();
abort
();
}
}
return_shift_loop
:
/* No fancy method is available. Just loop. */
info
->
alg
=
SHIFT_LOOP
;
goto
end
;
return_shift_inline
:
info
->
remainder
=
count
;
info
->
alg
=
SHIFT_INLINE
;
goto
end
;
return_shift_special
:
return_shift_special
:
info
->
cc_valid_p
=
0
;
info
->
alg
=
SHIFT_SPECIAL
;
goto
end
;
return_shift_rot_and
:
info
->
shift1
=
rotate_one
[
cpu_type
][
shift_type
][
shift_mode
];
info
->
shift2
=
rotate_two
[
shift_type
][
shift_mode
];
info
->
cc_valid_p
=
0
;
info
->
alg
=
SHIFT_ROT_AND
;
goto
end
;
end
:
end
:
if
(
!
TARGET_H8300S
)
if
(
!
TARGET_H8300S
)
info
->
shift2
=
NULL
;
info
->
shift2
=
NULL
;
...
...
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