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
d9da94a1
Commit
d9da94a1
authored
Dec 13, 2002
by
J"orn Rennecke
Committed by
Joern Rennecke
Dec 13, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r60103
parent
42e903c9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
44 deletions
+68
-44
gcc/ChangeLog
+11
-0
gcc/config/sh/sh.c
+13
-1
gcc/config/sh/sh.h
+1
-0
gcc/config/sh/sh.md
+43
-43
No files found.
gcc/ChangeLog
View file @
d9da94a1
Fri
Dec
13
16
:
02
:
27
2002
J
"orn Rennecke <joern.rennecke@superh.com>
* sh.c (sh_register_operand): New function.
(prepare_move_operands): Use it.
* sh.h (PREDICATE_CODES): Add entry for sh_register_operand.
* sh.md (movsi_media, movsi_media_nofpu): Allow stores of 0.
(movqi_media, movhi_media, movdi_media, movdi_media_nofpu): Likewise.
(movdf_media, movdf_media_nofpu, movv4sf_i, movsf_media): Likewise.
(movsf_media_nofpu, movv2hi_i, movv4hi_i, movv8qi_i): Likewise.
(movv2si_i): Likewise.
2002-12-13 Jim Wilson <wilson@redhat.com>
* doc/extend.texi (Complex Numbers): Update info on debug info.
...
...
gcc/config/sh/sh.c
View file @
d9da94a1
...
...
@@ -724,7 +724,7 @@ prepare_move_operands (operands, mode)
{
/* Copy the source to a register if both operands aren't registers. */
if
(
!
register_operand
(
operands
[
0
],
mode
)
&&
!
register_operand
(
operands
[
1
],
mode
))
&&
!
sh_
register_operand
(
operands
[
1
],
mode
))
operands
[
1
]
=
copy_to_mode_reg
(
mode
,
operands
[
1
]);
/* This case can happen while generating code to move the result
...
...
@@ -7838,4 +7838,16 @@ sh_register_move_cost (mode, srcclass, dstclass)
return
2
*
((
GET_MODE_SIZE
(
mode
)
+
3
)
/
4U
);
}
/* Like register_operand, but take into account that SHMEDIA can use
the constant zero like a general register. */
int
sh_register_operand
(
op
,
mode
)
rtx
op
;
enum
machine_mode
mode
;
{
if
(
op
==
CONST0_RTX
(
mode
)
&&
TARGET_SHMEDIA
)
return
1
;
return
register_operand
(
op
,
mode
);
}
#include "gt-sh.h"
gcc/config/sh/sh.h
View file @
d9da94a1
...
...
@@ -3227,6 +3227,7 @@ extern int rtx_equal_function_value_matters;
{"mextr_bit_offset", {CONST_INT}}, \
{"noncommutative_float_operator", {MINUS, DIV}}, \
{"shmedia_6bit_operand", {SUBREG, REG, CONST_INT}}, \
{"sh_register_operand", {REG, SUBREG, CONST_INT}}, \
{"target_reg_operand", {SUBREG, REG}}, \
{"target_operand", {SUBREG, REG, LABEL_REF, SYMBOL_REF, CONST, UNSPEC}},\
{"trunc_hi_operand", {SUBREG, REG, TRUNCATE}}, \
...
...
gcc/config/sh/sh.md
View file @
d9da94a1
...
...
@@ -3463,16 +3463,16 @@
(define_insn "*movsi_media"
[(set (match_operand:SI 0 "general_movdst_operand" "=r,r,r,r,m,f,m,f,r,f,*b,r,b")
(match_operand:SI 1 "general_movsrc_operand" "r,JS,ns,m,r,m,f,rU,f,f,r,*b,T"))]
(match_operand:SI 1 "general_movsrc_operand" "r,JS,ns,m,r
U
,m,f,rU,f,f,r,*b,T"))]
"TARGET_SHMEDIA_FPU
&& (register_operand (operands[0], SImode)
|| register_operand (operands[1], SImode))"
||
sh_
register_operand (operands[1], SImode))"
"@
add.l %1, r63, %0
movi %1, %0
#
ld%M1.l %m1, %0
st%M0.l %m0, %1
st%M0.l %m0, %
N
1
fld%M1.s %m1, %0
fst%M0.s %m0, %1
fmov.ls %N1, %0
...
...
@@ -3486,16 +3486,16 @@
(define_insn "*movsi_media_nofpu"
[(set (match_operand:SI 0 "general_movdst_operand" "=r,r,r,r,m,*b,r,b")
(match_operand:SI 1 "general_movsrc_operand" "r,JS,ns,m,r,r,*b,T"))]
(match_operand:SI 1 "general_movsrc_operand" "r,JS,ns,m,r
U
,r,*b,T"))]
"TARGET_SHMEDIA
&& (register_operand (operands[0], SImode)
|| register_operand (operands[1], SImode))"
||
sh_
register_operand (operands[1], SImode))"
"@
add.l %1, r63, %0
movi %1, %0
#
ld%M1.l %m1, %0
st%M0.l %m0, %1
st%M0.l %m0, %
N
1
ptabs %1, %0
gettr %1, %0
pt %1, %0"
...
...
@@ -3635,15 +3635,15 @@
(define_insn "*movqi_media"
[(set (match_operand:QI 0 "general_movdst_operand" "=r,r,r,m")
(match_operand:QI 1 "general_movsrc_operand" "r,JS,m,r"))]
(match_operand:QI 1 "general_movsrc_operand" "r,JS,m,r
U
"))]
"TARGET_SHMEDIA
&& (arith_reg_operand (operands[0], QImode)
|| arith_reg_operand (operands[1], QImode))"
|| arith_reg_o
r_0_o
perand (operands[1], QImode))"
"@
add.l %1, r63, %0
movi %1, %0
ld%M1.ub %m1, %0
st%M0.b %m0, %1"
st%M0.b %m0, %
N
1"
[(set_attr "type" "arith_media,arith_media,load_media,store_media")])
(define_expand "movqi"
...
...
@@ -3687,16 +3687,16 @@
(define_insn "*movhi_media"
[(set (match_operand:HI 0 "general_movdst_operand" "=r,r,r,r,m")
(match_operand:HI 1 "general_movsrc_operand" "r,JS,n,m,r"))]
(match_operand:HI 1 "general_movsrc_operand" "r,JS,n,m,r
U
"))]
"TARGET_SHMEDIA
&& (arith_reg_operand (operands[0], HImode)
|| arith_reg_operand (operands[1], HImode))"
|| arith_reg_o
r_0_o
perand (operands[1], HImode))"
"@
add.l %1, r63, %0
movi %1, %0
#
ld%M1.w %m1, %0
st%M0.w %m0, %1"
st%M0.w %m0, %
N
1"
[(set_attr "type" "arith_media,arith_media,*,load_media,store_media")])
(define_split
...
...
@@ -3791,16 +3791,16 @@
(define_insn "*movdi_media"
[(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,rl,m,f,m,f,r,f,*b,r,b")
(match_operand:DI 1 "general_movsrc_operand" "r,JS,iF,m,rl,m,f,rU,f,f,r,*b,T"))]
(match_operand:DI 1 "general_movsrc_operand" "r,JS,iF,m,rl
U
,m,f,rU,f,f,r,*b,T"))]
"TARGET_SHMEDIA_FPU
&& (register_operand (operands[0], DImode)
|| register_operand (operands[1], DImode))"
||
sh_
register_operand (operands[1], DImode))"
"@
add %1, r63, %0
movi %1, %0
#
ld%M1.q %m1, %0
st%M0.q %m0, %1
st%M0.q %m0, %
N
1
fld%M1.d %m1, %0
fst%M0.d %m0, %1
fmov.qd %N1, %0
...
...
@@ -3814,16 +3814,16 @@
(define_insn "*movdi_media_nofpu"
[(set (match_operand:DI 0 "general_movdst_operand" "=r,r,r,rl,m,*b,r,b")
(match_operand:DI 1 "general_movsrc_operand" "r,JS,iF,m,rl,r,*b,T"))]
(match_operand:DI 1 "general_movsrc_operand" "r,JS,iF,m,rl
U
,r,*b,T"))]
"TARGET_SHMEDIA
&& (register_operand (operands[0], DImode)
|| register_operand (operands[1], DImode))"
||
sh_
register_operand (operands[1], DImode))"
"@
add %1, r63, %0
movi %1, %0
#
ld%M1.q %m1, %0
st%M0.q %m0, %1
st%M0.q %m0, %
N
1
ptabs %1, %0
gettr %1, %0
pt %1, %0"
...
...
@@ -4083,10 +4083,10 @@
(define_insn "movdf_media"
[(set (match_operand:DF 0 "general_movdst_operand" "=f,f,r,r,r,f,m,r,m")
(match_operand:DF 1 "general_movsrc_operand" "f,rU,f,r,F,m,f,m,r"))]
(match_operand:DF 1 "general_movsrc_operand" "f,rU,f,r,F,m,f,m,r
U
"))]
"TARGET_SHMEDIA_FPU
&& (register_operand (operands[0], DFmode)
|| register_operand (operands[1], DFmode))"
||
sh_
register_operand (operands[1], DFmode))"
"@
fmov.d %1, %0
fmov.qd %N1, %0
...
...
@@ -4096,20 +4096,20 @@
fld%M1.d %m1, %0
fst%M0.d %m0, %1
ld%M1.q %m1, %0
st%M0.q %m0, %1"
st%M0.q %m0, %
N
1"
[(set_attr "type" "fmove_media,fload_media,dfpconv_media,arith_media,*,fload_media,fstore_media,load_media,store_media")])
(define_insn "movdf_media_nofpu"
[(set (match_operand:DF 0 "general_movdst_operand" "=r,r,r,m")
(match_operand:DF 1 "general_movsrc_operand" "r,F,m,r"))]
(match_operand:DF 1 "general_movsrc_operand" "r,F,m,r
U
"))]
"TARGET_SHMEDIA
&& (register_operand (operands[0], DFmode)
|| register_operand (operands[1], DFmode))"
||
sh_
register_operand (operands[1], DFmode))"
"@
add %1, r63, %0
#
ld%M1.q %m1, %0
st%M0.q %m0, %1"
st%M0.q %m0, %
N
1"
[(set_attr "type" "arith_media,*,load_media,store_media")])
(define_split
...
...
@@ -4693,7 +4693,7 @@
(define_insn_and_split "*movv4sf_i"
[(set (match_operand:V4SF 0 "nonimmediate_operand" "=f,f,m")
(match_operand:V4SF 1 "general_operand" "fU,m,f"))]
(match_operand:V4SF 1 "general_operand" "fU,m,f
U
"))]
"TARGET_SHMEDIA_FPU"
"#"
"&& reload_completed"
...
...
@@ -4791,10 +4791,10 @@
(define_insn "movsf_media"
[(set (match_operand:SF 0 "general_movdst_operand" "=f,f,r,r,r,f,m,r,m")
(match_operand:SF 1 "general_movsrc_operand" "f,rU,f,r,F,m,f,m,r"))]
(match_operand:SF 1 "general_movsrc_operand" "f,rU,f,r,F,m,f,m,r
U
"))]
"TARGET_SHMEDIA_FPU
&& (register_operand (operands[0], SFmode)
|| register_operand (operands[1], SFmode))"
||
sh_
register_operand (operands[1], SFmode))"
"@
fmov.s %1, %0
fmov.ls %N1, %0
...
...
@@ -4804,20 +4804,20 @@
fld%M1.s %m1, %0
fst%M0.s %m0, %1
ld%M1.l %m1, %0
st%M0.l %m0, %1"
st%M0.l %m0, %
N
1"
[(set_attr "type" "fmove_media,fload_media,fpconv_media,arith_media,*,fload_media,fstore_media,load_media,store_media")])
(define_insn "movsf_media_nofpu"
[(set (match_operand:SF 0 "general_movdst_operand" "=r,r,r,m")
(match_operand:SF 1 "general_movsrc_operand" "r,F,m,r"))]
(match_operand:SF 1 "general_movsrc_operand" "r,F,m,r
U
"))]
"TARGET_SHMEDIA
&& (register_operand (operands[0], SFmode)
|| register_operand (operands[1], SFmode))"
||
sh_
register_operand (operands[1], SFmode))"
"@
add.l %1, r63, %0
#
ld%M1.l %m1, %0
st%M0.l %m0, %1"
st%M0.l %m0, %
N
1"
[(set_attr "type" "arith_media,*,load_media,store_media")])
(define_split
...
...
@@ -9155,16 +9155,16 @@
(define_insn "movv8qi_i"
[
(set (match_operand:V8QI 0 "general_movdst_operand" "=r,r,r,rl,m")
(match_operand:V8QI 1 "general_movsrc_operand" "r,JSU,nW,m,rl"))]
(match_operand:V8QI 1 "general_movsrc_operand" "r,JSU,nW,m,rl
U
"))]
"TARGET_SHMEDIA
&& (register_operand (operands
[
0
]
, V8QImode)
|| register_operand (operands
[
1
]
, V8QImode))"
||
sh_
register_operand (operands
[
1
]
, V8QImode))"
"@
add %1, r63, %0
movi %1, %0
#
ld%M1.q %m1, %0
st%M0.q %m0, %1"
st%M0.q %m0, %
N
1"
[
(set_attr "type" "arith_media,arith_media,
*
,load_media,store_media")
(set_attr "length" "4,4,16,4,4")])
...
...
@@ -9247,16 +9247,16 @@
(define_insn "movv2hi_i"
[
(set (match_operand:V2HI 0 "general_movdst_operand" "=r,r,r,rl,m")
(match_operand:V2HI 1 "general_movsrc_operand" "r,JSU,nW,m,rl"))]
(match_operand:V2HI 1 "general_movsrc_operand" "r,JSU,nW,m,rl
U
"))]
"TARGET_SHMEDIA
&& (register_operand (operands
[
0
]
, V2HImode)
|| register_operand (operands
[
1
]
, V2HImode))"
||
sh_
register_operand (operands
[
1
]
, V2HImode))"
"@
addz.l %1, r63, %0
movi %1, %0
#
ld%M1.l %m1, %0
st%M0.l %m0, %1"
st%M0.l %m0, %
N
1"
[
(set_attr "type" "arith_media,arith_media,
*
,load_media,store_media")
(set_attr "length" "4,4,16,4,4")])
...
...
@@ -9268,16 +9268,16 @@
(define_insn "movv4hi_i"
[
(set (match_operand:V4HI 0 "general_movdst_operand" "=r,r,r,rl,m")
(match_operand:V4HI 1 "general_movsrc_operand" "r,JSU,nW,m,rl"))]
(match_operand:V4HI 1 "general_movsrc_operand" "r,JSU,nW,m,rl
U
"))]
"TARGET_SHMEDIA
&& (register_operand (operands
[
0
]
, V4HImode)
|| register_operand (operands
[
1
]
, V4HImode))"
||
sh_
register_operand (operands
[
1
]
, V4HImode))"
"@
add %1, r63, %0
movi %1, %0
#
ld%M1.q %m1, %0
st%M0.q %m0, %1"
st%M0.q %m0, %
N
1"
[
(set_attr "type" "arith_media,arith_media,
*
,load_media,store_media")
(set_attr "length" "4,4,16,4,4")])
...
...
@@ -9289,16 +9289,16 @@
(define_insn "movv2si_i"
[
(set (match_operand:V2SI 0 "general_movdst_operand" "=r,r,r,rl,m")
(match_operand:V2SI 1 "general_movsrc_operand" "r,JSU,nW,m,rl"))]
(match_operand:V2SI 1 "general_movsrc_operand" "r,JSU,nW,m,rl
U
"))]
"TARGET_SHMEDIA
&& (register_operand (operands
[
0
]
, V2SImode)
|| register_operand (operands
[
1
]
, V2SImode))"
||
sh_
register_operand (operands
[
1
]
, V2SImode))"
"@
add %1, r63, %0
#
#
ld%M1.q %m1, %0
st%M0.q %m0, %1"
st%M0.q %m0, %
N
1"
[
(set_attr "type" "arith_media,arith_media,
*
,load_media,store_media")
(set_attr "length" "4,4,16,4,4")])
...
...
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