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
a7812c0b
Commit
a7812c0b
authored
Oct 26, 2001
by
Kazu Hirata
Committed by
Kazu Hirata
Oct 26, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* config/h8300/h8300.c (get_shift_alg): Remove redundant code.
From-SVN: r46560
parent
a38b987a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
177 deletions
+25
-177
gcc/ChangeLog
+4
-0
gcc/config/h8300/h8300.c
+21
-177
No files found.
gcc/ChangeLog
View file @
a7812c0b
2001
-
10
-
26
Kazu
Hirata
<
kazu
@hxi
.
com
>
*
config
/
h8300
/
h8300
.
c
(
get_shift_alg
)
:
Remove
redundant
code
.
2001
-
10
-
26
Neil
Booth
<
neil
@daikokuya
.
demon
.
co
.
uk
>
*
c
-
typeck
.
c
(
convert_arguments
)
:
When
comparing
for
enumeral
...
...
gcc/config/h8300/h8300.c
View file @
a7812c0b
...
...
@@ -2280,117 +2280,29 @@ get_shift_alg (shift_type, shift_mode, count, info)
goto
return_shift_special
;
}
}
else
if
(
count
==
8
)
else
if
(
8
<=
count
&&
count
<=
12
)
{
info
->
remainder
=
count
-
8
;
switch
(
shift_type
)
{
case
SHIFT_ASHIFT
:
info
->
special
=
"mov.b
\t
%s0,%t0
\n\t
sub.b
\t
%s0,%s0"
;
info
->
shift1
=
"shal.b
\t
%t0"
;
info
->
shift2
=
"shal.b
\t
#2,%t0"
;
goto
return_shift_special
;
case
SHIFT_LSHIFTRT
:
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
sub.b
\t
%t0,%t0"
;
info
->
shift1
=
"shlr.b
\t
%s0"
;
info
->
shift2
=
"shlr.b
\t
#2,%s0"
;
goto
return_shift_special
;
case
SHIFT_ASHIFTRT
:
if
(
TARGET_H8300
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
shll
\t
%t
0
\n\t
subx
\t
%t0,%t0"
;
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
bld
\t
#7,%s
0
\n\t
subx
\t
%t0,%t0"
;
else
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
exts.w
\t
%T0"
;
goto
return_shift_special
;
}
}
else
if
(
count
==
9
)
{
switch
(
shift_type
)
{
case
SHIFT_ASHIFT
:
info
->
special
=
"mov.b
\t
%s0,%t0
\n\t
sub.b
\t
%s0,%s0
\n\t
shal.b
\t
%t0"
;
goto
return_shift_special
;
case
SHIFT_LSHIFTRT
:
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
sub.b
\t
%t0,%t0
\n\t
shlr.b
\t
%s0"
;
goto
return_shift_special
;
case
SHIFT_ASHIFTRT
:
if
(
TARGET_H8300
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
bld
\t
#7,%s0
\n\t
subx
\t
%t0,%t0
\n\t
shar.b
\t
%s0"
;
else
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
exts.w
\t
%T0
\n\t
shar.b
\t
%s0"
;
goto
return_shift_special
;
}
}
else
if
(
count
==
10
)
{
switch
(
shift_type
)
{
case
SHIFT_ASHIFT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.b
\t
%s0,%t0
\n\t
sub.b
\t
%s0,%s0
\n\t
shal.b
\t
#2,%t0"
;
else
info
->
special
=
"mov.b
\t
%s0,%t0
\n\t
sub.b
\t
%s0,%s0
\n\t
shal.b
\t
%t0
\n\t
shal.b
\t
%t0"
;
goto
return_shift_special
;
case
SHIFT_LSHIFTRT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
sub.b
\t
%t0,%t0
\n\t
shlr.b
\t
#2,%s0"
;
else
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
sub.b
\t
%t0,%t0
\n\t
shlr.b
\t
%s0
\n\t
shlr.b
\t
%s0"
;
goto
return_shift_special
;
case
SHIFT_ASHIFTRT
:
if
(
TARGET_H8300
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
bld
\t
#7,%s0
\n\t
subx
\t
%t0,%t0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0"
;
else
if
(
TARGET_H8300H
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
exts.w
\t
%T0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0"
;
else
if
(
TARGET_H8300S
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
exts.w
\t
%T0
\n\t
shar.b
\t
#2,%s0"
;
goto
return_shift_special
;
}
}
else
if
(
count
==
11
)
{
switch
(
shift_type
)
{
case
SHIFT_ASHIFT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.b
\t
%s0,%t0
\n\t
sub.b
\t
%s0,%s0
\n\t
shal.b
\t
#2,%t0
\n\t
shal.b
\t
%t0"
;
else
info
->
special
=
"mov.b
\t
%s0,%t0
\n\t
sub.b
\t
%s0,%s0
\n\t
shal.b
\t
%t0
\n\t
shal.b
\t
%t0
\n\t
shal.b
\t
%t0"
;
goto
return_shift_special
;
case
SHIFT_LSHIFTRT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
sub.b
\t
%t0,%t0
\n\t
shlr.b
\t
#2,%s0
\n\t
shlr.b
\t
%s0"
;
else
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
sub.b
\t
%t0,%t0
\n\t
shlr.b
\t
%s0
\n\t
shlr.b
\t
%s0
\n\t
shlr.b
\t
%s0"
;
goto
return_shift_special
;
case
SHIFT_ASHIFTRT
:
if
(
TARGET_H8300
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
bld
\t
#7,%s0
\n\t
subx
\t
%t0,%t0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0"
;
else
if
(
TARGET_H8300H
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
exts.w
\t
%T0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0"
;
else
if
(
TARGET_H8300S
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
exts.w
\t
%T0
\n\t
shar.b
\t
#2,%s0
\n\t
shar.b
\t
%s0"
;
goto
return_shift_special
;
}
}
else
if
(
count
==
12
)
{
switch
(
shift_type
)
{
case
SHIFT_ASHIFT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.b
\t
%s0,%t0
\n\t
sub.b
\t
%s0,%s0
\n\t
shal.b
\t
#2,%t0
\n\t
shal.b
\t
#2,%t0"
;
else
info
->
special
=
"mov.b
\t
%s0,%t0
\n\t
sub.b
\t
%s0,%s0
\n\t
shal.b
\t
%t0
\n\t
shal.b
\t
%t0
\n\t
shal.b
\t
%t0
\n\t
shal.b
\t
%t0"
;
goto
return_shift_special
;
case
SHIFT_LSHIFTRT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
sub.b
\t
%t0,%t0
\n\t
shlr.b
\t
#2,%s0
\n\t
shlr.b
\t
#2,%s0"
;
else
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
sub.b
\t
%t0,%t0
\n\t
shlr.b
\t
%s0
\n\t
shlr.b
\t
%s0
\n\t
shlr.b
\t
%s0
\n\t
shlr.b
\t
%s0"
;
goto
return_shift_special
;
case
SHIFT_ASHIFTRT
:
if
(
TARGET_H8300
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
bld
\t
#7,%s0
\n\t
subx
\t
%t0,%t0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0"
;
else
if
(
TARGET_H8300H
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
exts.w
\t
%T0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0
\n\t
shar.b
\t
%s0"
;
else
if
(
TARGET_H8300S
)
info
->
special
=
"mov.b
\t
%t0,%s0
\n\t
exts.w
\t
%T0
\n\t
shar.b
\t
#2,%s0
\n\t
shar.b
\t
#2,%s0"
;
info
->
shift1
=
"shar.b
\t
%s0"
;
info
->
shift2
=
"shar.b
\t
#2,%s0"
;
goto
return_shift_special
;
}
}
...
...
@@ -2446,99 +2358,31 @@ get_shift_alg (shift_type, shift_mode, count, info)
goto
return_shift_special
;
}
}
else
if
(
count
==
16
)
else
if
((
TARGET_H8300
&&
count
==
16
)
||
(
TARGET_H8300H
&&
16
<=
count
&&
count
<=
19
)
||
(
TARGET_H8300S
&&
16
<=
count
&&
count
<=
20
))
{
info
->
remainder
=
count
-
16
;
switch
(
shift_type
)
{
case
SHIFT_ASHIFT
:
info
->
special
=
"mov.w
\t
%f0,%e0
\n\t
sub.w
\t
%f0,%f0"
;
info
->
shift1
=
"shll.l
\t
%S0"
;
info
->
shift2
=
"shll.l
\t
#2,%S0"
;
goto
return_shift_special
;
case
SHIFT_LSHIFTRT
:
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
sub.w
\t
%e0,%e0"
;
info
->
shift1
=
"shlr.l
\t
%S0"
;
info
->
shift2
=
"shlr.l
\t
#2,%S0"
;
goto
return_shift_special
;
case
SHIFT_ASHIFTRT
:
if
(
TARGET_H8300
)
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
shll
\t
%z0
\n\t
subx
\t
%z0,%z0
\n\t
mov.b
\t
%z0,%y0"
;
else
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
exts.l
\t
%S0"
;
goto
return_shift_special
;
}
}
else
if
(
count
==
17
&&
!
TARGET_H8300
)
{
switch
(
shift_type
)
{
case
SHIFT_ASHIFT
:
info
->
special
=
"mov.w
\t
%f0,%e0
\n\t
sub.w
\t
%f0,%f0
\n\t
shll.l
\t
%S0"
;
goto
return_shift_special
;
case
SHIFT_LSHIFTRT
:
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
sub.w
\t
%e0,%e0
\n\t
shlr.l
\t
%S0"
;
goto
return_shift_special
;
case
SHIFT_ASHIFTRT
:
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
exts.l
\t
%S0
\n\t
shar.l
\t
%S0"
;
goto
return_shift_special
;
}
}
else
if
(
count
==
18
&&
!
TARGET_H8300
)
{
switch
(
shift_type
)
{
case
SHIFT_ASHIFT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.w
\t
%f0,%e0
\n\t
sub.w
\t
%f0,%f0
\n\t
shll.l
\t
#2,%S0"
;
else
info
->
special
=
"mov.w
\t
%f0,%e0
\n\t
sub.w
\t
%f0,%f0
\n\t
shll.l
\t
%S0
\n\t
shll.l
\t
%S0"
;
goto
return_shift_special
;
case
SHIFT_LSHIFTRT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
sub.w
\t
%e0,%e0
\n\t
shlr.l
\t
#2,%S0"
;
else
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
sub.w
\t
%e0,%e0
\n\t
shlr.l
\t
%S0
\n\t
shlr.l
\t
%S0"
;
goto
return_shift_special
;
case
SHIFT_ASHIFTRT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
exts.l
\t
%S0
\n\t
shar.l
\t
#2,%S0"
;
else
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
exts.l
\t
%S0
\n\t
shar.l
\t
%S0
\n\t
shar.l
\t
%S0"
;
goto
return_shift_special
;
}
}
else
if
(
count
==
19
&&
!
TARGET_H8300
)
{
switch
(
shift_type
)
{
case
SHIFT_ASHIFT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.w
\t
%f0,%e0
\n\t
sub.w
\t
%f0,%f0
\n\t
shll.l
\t
#2,%S0
\n\t
shll.l
\t
%S0"
;
else
info
->
special
=
"mov.w
\t
%f0,%e0
\n\t
sub.w
\t
%f0,%f0
\n\t
shll.l
\t
%S0
\n\t
shll.l
\t
%S0
\n\t
shll.l
\t
%S0"
;
goto
return_shift_special
;
case
SHIFT_LSHIFTRT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
sub.w
\t
%e0,%e0
\n\t
shlr.l
\t
#2,%S0
\n\t
shlr.l
\t
%S0"
;
else
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
sub.w
\t
%e0,%e0
\n\t
shlr.l
\t
%S0
\n\t
shlr.l
\t
%S0
\n\t
shlr.l
\t
%S0"
;
goto
return_shift_special
;
case
SHIFT_ASHIFTRT
:
if
(
TARGET_H8300S
)
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
exts.l
\t
%S0
\n\t
shar.l
\t
#2,%S0
\n\t
shar.l
\t
%S0"
;
else
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
exts.l
\t
%S0
\n\t
shar.l
\t
%S0
\n\t
shar.l
\t
%S0
\n\t
shar.l
\t
%S0"
;
goto
return_shift_special
;
}
}
else
if
(
count
==
20
&&
TARGET_H8300S
)
{
switch
(
shift_type
)
{
case
SHIFT_ASHIFT
:
info
->
special
=
"mov.w
\t
%f0,%e0
\n\t
sub.w
\t
%f0,%f0
\n\t
shll.l
\t
#2,%S0
\n\t
shll.l
\t
#2,%S0"
;
goto
return_shift_special
;
case
SHIFT_LSHIFTRT
:
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
sub.w
\t
%e0,%e0
\n\t
shlr.l
\t
#2,%S0
\n\t
shlr.l
\t
#2,%S0"
;
goto
return_shift_special
;
case
SHIFT_ASHIFTRT
:
info
->
special
=
"mov.w
\t
%e0,%f0
\n\t
exts.l
\t
%S0
\n\t
shar.l
\t
#2,%S0
\n\t
shar.l
\t
#2,%S0"
;
info
->
shift1
=
"shar.l
\t
%S0"
;
info
->
shift2
=
"shar.l
\t
#2,%S0"
;
goto
return_shift_special
;
}
}
...
...
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