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
6ecbf300
Commit
6ecbf300
authored
Sep 09, 1994
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge push patterns for memory/nonmemory
From-SVN: r8048
parent
68dab18d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
56 deletions
+48
-56
gcc/config/i386/i386.md
+48
-56
No files found.
gcc/config/i386/i386.md
View file @
6ecbf300
...
@@ -1064,15 +1064,15 @@
...
@@ -1064,15 +1064,15 @@
""
""
"
"
{
{
/
* Special case memory->memory moves *
/
/
* Special case memory->memory moves
and pushes
*
/
if (TARGET_MOVE
if (TARGET_MOVE
&& (reload_in_progress | reload_completed) == 0
&& (reload_in_progress | reload_completed) == 0
&& GET_CODE (operands
[
0
]
) == MEM
&& GET_CODE (operands
[
0
]
) == MEM
&&
GET_CODE (operands
[
1
]
) == MEM
)
&&
(GET_CODE (operands
[
1
]
) == MEM || push_operand (operands
[
0
]
, SFmode))
)
{
{
rtx (
*
genfunc) PROTO((rtx, rtx));
rtx (
*
genfunc) PROTO((rtx, rtx));
if (push_operand (operands
[
0
]
, SFmode))
if (push_operand (operands
[
0
]
, SFmode))
genfunc = (TARGET_386) ? gen_movsf_push386 : gen_movsf_push486
_mem
;
genfunc = (TARGET_386) ? gen_movsf_push386 : gen_movsf_push486;
else
else
genfunc = gen_movsf_mem;
genfunc = gen_movsf_mem;
...
@@ -1110,8 +1110,9 @@
...
@@ -1110,8 +1110,9 @@
}")
}")
(define_insn "movsf_push486"
(define_insn "movsf_push486"
[
(set (match_operand:SF 0 "push_operand" "=<,<")
[
(set (match_operand:SF 0 "push_operand" "=<,<,<")
(match_operand:SF 1 "nonmemory_operand" "rF,f"))]
(match_operand:SF 1 "general_operand" "rF,f,m"))
(clobber (match_scratch:SI 2 "=X,X,r"))]
"!TARGET_386"
"!TARGET_386"
"
*
"
*
{
{
...
@@ -1134,18 +1135,15 @@
...
@@ -1134,18 +1135,15 @@
output_asm_insn (AS1 (fst%S0,%0), xops);
output_asm_insn (AS1 (fst%S0,%0), xops);
RET;
RET;
}
}
else if (GET_CODE (operands
[
1
]
) != MEM)
return AS1 (push%L1,%1);
return AS1 (push%L1,%1);
}")
(define_insn "movsf_push486_mem"
else
[
(set (match_operand:SF 0 "push_operand" "=<")
{
(match_operand:SF 1 "memory_operand" "m"))
(clobber (match_scratch:SI 2 "=r"))]
"!TARGET_386"
"
*
{
output_asm_insn (AS2 (mov%L2,%1,%2), operands);
output_asm_insn (AS2 (mov%L2,%1,%2), operands);
return AS1 (push%L2,%2);
return AS1 (push%L2,%2);
}
}")
}")
;; Special memory
<->
memory pattern that combine will recreate from the
;; Special memory
<->
memory pattern that combine will recreate from the
...
@@ -1237,15 +1235,15 @@
...
@@ -1237,15 +1235,15 @@
""
""
"
"
{
{
/
* Special case memory->memory moves *
/
/
* Special case memory->memory moves
and pushes
*
/
if (TARGET_MOVE
if (TARGET_MOVE
&& (reload_in_progress | reload_completed) == 0
&& (reload_in_progress | reload_completed) == 0
&& GET_CODE (operands
[
0
]
) == MEM
&& GET_CODE (operands
[
0
]
) == MEM
&&
GET_CODE (operands
[
1
]
) == MEM
)
&&
(GET_CODE (operands
[
1
]
) == MEM || push_operand (operands
[
0
]
, DFmode))
)
{
{
rtx (
*
genfunc) PROTO((rtx, rtx));
rtx (
*
genfunc) PROTO((rtx, rtx));
if (push_operand (operands
[
0
]
, DFmode))
if (push_operand (operands
[
0
]
, DFmode))
genfunc = (TARGET_386) ? gen_movdf_push386 : gen_movdf_push486
_mem
;
genfunc = (TARGET_386) ? gen_movdf_push386 : gen_movdf_push486;
else
else
genfunc = gen_movdf_mem;
genfunc = gen_movdf_mem;
...
@@ -1282,8 +1280,10 @@
...
@@ -1282,8 +1280,10 @@
}")
}")
(define_insn "movdf_push486"
(define_insn "movdf_push486"
[
(set (match_operand:DF 0 "push_operand" "=<,<")
[
(set (match_operand:DF 0 "push_operand" "=<,<,<,<")
(match_operand:DF 1 "nonmemory_operand" "rF,f"))]
(match_operand:DF 1 "general_operand" "rF,f,o,o"))
(clobber (match_scratch:SI 2 "=X,X,&r,&r"))
(clobber (match_scratch:SI 3 "=X,X,&r,X"))]
"!TARGET_386"
"!TARGET_386"
"
*
"
*
{
{
...
@@ -1304,18 +1304,12 @@
...
@@ -1304,18 +1304,12 @@
RET;
RET;
}
}
else
else if (GET_CODE (operands
[
1
]
) != MEM)
return output_move_double (operands);
return output_move_double (operands);
}")
(define_insn "movdf_push486_mem"
else
[
(set (match_operand:DF 0 "push_operand" "=<,<")
{
(match_operand:DF 1 "general_operand" "o,o"))
(clobber (match_scratch:SI 2 "=&r,&r"))
(clobber (match_scratch:SI 3 "=&r,X"))]
"!TARGET_386"
"
*
{
rtx low
[
1
]
, high
[
1
]
, xop
[
4
]
;
rtx low
[
1
]
, high
[
1
]
, xop
[
4
]
;
split_di (&operands[1], 1, low, high);
split_di (&operands[1], 1, low, high);
...
@@ -1340,6 +1334,7 @@
...
@@ -1340,6 +1334,7 @@
}
}
RET;
RET;
}
}")
}")
(define_insn "movdf_mem"
(define_insn "movdf_mem"
...
@@ -1453,15 +1448,15 @@
...
@@ -1453,15 +1448,15 @@
""
""
"
"
{
{
/
* Special case memory->memory moves *
/
/
* Special case memory->memory moves
and pushes
*
/
if (TARGET_MOVE
if (TARGET_MOVE
&& (reload_in_progress | reload_completed) == 0
&& (reload_in_progress | reload_completed) == 0
&& GET_CODE (operands
[
0
]
) == MEM
&& GET_CODE (operands
[
0
]
) == MEM
&&
GET_CODE (operands
[
1
]
) == MEM
)
&&
(GET_CODE (operands
[
1
]
) == MEM || push_operand (operands
[
0
]
, XFmode))
)
{
{
rtx (
*
genfunc) PROTO((rtx, rtx));
rtx (
*
genfunc) PROTO((rtx, rtx));
if (push_operand (operands
[
0
]
, XFmode))
if (push_operand (operands
[
0
]
, XFmode))
genfunc = (TARGET_386) ? gen_movxf_push386 : gen_movxf_push486
_mem
;
genfunc = (TARGET_386) ? gen_movxf_push386 : gen_movxf_push486;
else
else
genfunc = gen_movxf_mem;
genfunc = gen_movxf_mem;
...
@@ -1496,8 +1491,10 @@
...
@@ -1496,8 +1491,10 @@
}")
}")
(define_insn "movxf_push486"
(define_insn "movxf_push486"
[
(set (match_operand:XF 0 "push_operand" "=<,<")
[
(set (match_operand:XF 0 "push_operand" "=<,<,<,<")
(match_operand:XF 1 "nonmemory_operand" "rF,f"))]
(match_operand:XF 1 "general_operand" "rF,f,o,o"))
(clobber (match_scratch:SI 2 "=X,X,&r,&r"))
(clobber (match_scratch:SI 3 "=X,X,&r,X"))]
"!TARGET_386"
"!TARGET_386"
"
*
"
*
{
{
...
@@ -1516,18 +1513,12 @@
...
@@ -1516,18 +1513,12 @@
RET;
RET;
}
}
else
else if (GET_CODE (operands
[
1
]
) != MEM)
return output_move_double (operands);
return output_move_double (operands);
}")
(define_insn "movxf_push486_mem"
else
[
(set (match_operand:XF 0 "push_operand" "=<,<")
{
(match_operand:XF 1 "memory_operand" "o,o"))
(clobber (match_scratch:SI 2 "=&r,&r"))
(clobber (match_scratch:SI 3 "=&r,X"))]
"!TARGET_386"
"
*
{
rtx xop
[
5
]
;
rtx xop
[
5
]
;
xop[0] = operands[2];
xop[0] = operands[2];
...
@@ -1556,6 +1547,7 @@
...
@@ -1556,6 +1547,7 @@
}
}
RET;
RET;
}
}")
}")
(define_insn "movxf_mem"
(define_insn "movxf_mem"
...
@@ -1675,15 +1667,15 @@
...
@@ -1675,15 +1667,15 @@
""
""
"
"
{
{
/
* Special case memory->memory moves *
/
/
* Special case memory->memory moves
and pushes
*
/
if (TARGET_MOVE
if (TARGET_MOVE
&& (reload_in_progress | reload_completed) == 0
&& (reload_in_progress | reload_completed) == 0
&& GET_CODE (operands
[
0
]
) == MEM
&& GET_CODE (operands
[
0
]
) == MEM
&&
GET_CODE (operands
[
1
]
) == MEM
)
&&
(GET_CODE (operands
[
1
]
) == MEM || push_operand (operands
[
0
]
, DImode))
)
{
{
rtx (
*
genfunc) PROTO((rtx, rtx));
rtx (
*
genfunc) PROTO((rtx, rtx));
if (push_operand (operands
[
0
]
, DImode))
if (push_operand (operands
[
0
]
, DImode))
genfunc = (TARGET_386) ? gen_movdi_push386 : gen_movdi_push486
_mem
;
genfunc = (TARGET_386) ? gen_movdi_push386 : gen_movdi_push486;
else
else
genfunc = gen_movdi_mem;
genfunc = gen_movdi_mem;
...
@@ -1699,19 +1691,18 @@
...
@@ -1699,19 +1691,18 @@
"
*
return output_move_double (operands);")
"
*
return output_move_double (operands);")
(define_insn "movdi_push486"
(define_insn "movdi_push486"
[
(set (match_operand:DI 0 "push_operand" "=<")
[
(set (match_operand:DI 0 "push_operand" "=<,<,<")
(match_operand:DI 1 "nonmemory_operand" "riF"))]
(match_operand:DI 1 "general_operand" "riF,o,o"))
"!TARGET_386"
(clobber (match_scratch:SI 2 "=X,&r,=&r"))
"
*
return output_move_double (operands);")
(clobber (match_scratch:SI 3 "=X,&r,X"))]
(define_insn "movdi_push486_mem"
[
(set (match_operand:DI 0 "push_operand" "=<,<")
(match_operand:DI 1 "memory_operand" "o,o"))
(clobber (match_scratch:SI 2 "=&r,=&r"))
(clobber (match_scratch:SI 3 "=&r,X"))]
"!TARGET_386"
"!TARGET_386"
"
*
"
*
{
{
if (GET_CODE (operands
[
1
]
) != MEM)
return output_move_double (operands);
else
{
rtx low
[
1
]
, high
[
1
]
, xop
[
4
]
;
rtx low
[
1
]
, high
[
1
]
, xop
[
4
]
;
split_di (&operands[1], 1, low, high);
split_di (&operands[1], 1, low, high);
...
@@ -1736,6 +1727,7 @@
...
@@ -1736,6 +1727,7 @@
}
}
RET;
RET;
}
}")
}")
(define_insn "movdi_mem"
(define_insn "movdi_mem"
...
...
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