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
441e427c
Commit
441e427c
authored
Jan 23, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r234
parent
235d6e4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
217 deletions
+88
-217
gcc/config/i860/i860.md
+88
-217
No files found.
gcc/config/i860/i860.md
View file @
441e427c
...
@@ -692,32 +692,38 @@
...
@@ -692,32 +692,38 @@
;; Generation of conditionals.
;; Generation of conditionals.
;; The first step is the emission of a standard-looking compare insn.
;; We save the compare operands in the cmpxx patterns and use then when
;; Then a standard-named conditional branch pattern is run.
;; we generate the branch.
;; That branch pattern looks back at the compare insn and deletes it.
;; It then emits a machine-specific compare insn and a branch-if-true
;; or a branch-if-false.
;; These patterns have
`abort' because they are supposed to be deleted
(define_expand "cmpsi"
;; in that fashion.
(define_insn "cmpsi"
[
(set (cc0) (compare (match_operand:SI 0 "register_operand" "")
[
(set (cc0) (compare (match_operand:SI 0 "register_operand" "")
(match_operand:SI 1 "compare_operand" "")))]
(match_operand:SI 1 "compare_operand" "")))]
""
""
"* abort ();")
"
{ i860_compare_op0 = operands
[
0
]
;
i860_compare_op1 = operands
[
1
]
;
DONE;
}")
(define_
insn
"cmpsf"
(define_
expand
"cmpsf"
[
(set (cc0) (compare (match_operand:SF 0 "register_operand" "")
[
(set (cc0) (compare (match_operand:SF 0 "register_operand" "")
(match_operand:SF 1 "register_operand" "")))]
(match_operand:SF 1 "register_operand" "")))]
""
""
"* abort ();")
"
{ i860_compare_op0 = operands
[
0
]
;
i860_compare_op1 = operands
[
1
]
;
DONE;
}")
(define_
insn
"cmpdf"
(define_
expand
"cmpdf"
[
(set (cc0) (compare (match_operand:DF 0 "register_operand" "")
[
(set (cc0) (compare (match_operand:DF 0 "register_operand" "")
(match_operand:DF 1 "register_operand" "")))]
(match_operand:DF 1 "register_operand" "")))]
""
""
"* abort ();")
"
{ i860_compare_op0 = operands
[
0
]
;
i860_compare_op1 = operands
[
1
]
;
DONE;
}")
;; These are the standard-named conditional branch patterns.
;; These are the standard-named conditional branch patterns.
;; Detailed comments are found in the first one only.
;; Detailed comments are found in the first one only.
...
@@ -731,42 +737,21 @@
...
@@ -731,42 +737,21 @@
""
""
"
"
{
{
rtx label = operands[0];
enum insn_code code;
rtx prev;
/* Get out of the sequence just started for us. */
end_sequence ();
prev = get_last_insn ();
/* Examine the preceding compare insn, and get rid of it. */
code = recog_memoized (prev);
insn_extract (prev);
NEXT_INSN (PREV_INSN (prev)) = 0;
set_last_insn (PREV_INSN (prev));
/* Now once again start a sequence for our new instructions. */
start_sequence ();
/
*
Emit a single-condition compare insn according to
/
*
Emit a single-condition compare insn according to
the type of operands and the condition to be tested.
*
/
the type of operands and the condition to be tested.
*
/
if (
code == CODE_FOR_cmpsi
)
if (
GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT
)
emit_insn (gen_cmpeqsi (
recog_operand[0], recog_operand[1]
));
emit_insn (gen_cmpeqsi (
i860_compare_op0, i860_compare_op1
));
else if (
code == CODE_FOR_cmpsf
)
else if (
GET_MODE (i860_compare_op0) == SFmode
)
emit_insn (gen_cmpeqsf (
recog_operand[0], recog_operand[1]
));
emit_insn (gen_cmpeqsf (
i860_compare_op0, i860_compare_op1
));
else if (
code == CODE_FOR_cmpdf
)
else if (
GET_MODE (i860_compare_op0) == DFmode
)
emit_insn (gen_cmpeqdf (
recog_operand[0], recog_operand[1]
));
emit_insn (gen_cmpeqdf (
i860_compare_op0, i860_compare_op1
));
else
else
abort ();
abort ();
/
* Emit branch-if-true. *
/
/
* Emit branch-if-true. *
/
emit_jump_insn (gen_flipped_inverse_cbranch (label));
emit_jump_insn (gen_flipped_inverse_cbranch (operands
[
0
]
));
DONE;
DONE;
}")
}")
...
@@ -779,28 +764,16 @@
...
@@ -779,28 +764,16 @@
""
""
"
"
{
{
rtx label = operands[0];
if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT)
enum insn_code code;
emit_insn (gen_cmpeqsi (i860_compare_op0, i860_compare_op1));
rtx prev;
else if (GET_MODE (i860_compare_op0) == SFmode)
emit_insn (gen_cmpeqsf (i860_compare_op0, i860_compare_op1));
end_sequence ();
else if (GET_MODE (i860_compare_op0) == DFmode)
prev = get_last_insn ();
emit_insn (gen_cmpeqdf (i860_compare_op0, i860_compare_op1));
code = recog_memoized (prev);
insn_extract (prev);
NEXT_INSN (PREV_INSN (prev)) = 0;
set_last_insn (PREV_INSN (prev));
start_sequence ();
if (code == CODE_FOR_cmpsi)
emit_insn (gen_cmpeqsi (recog_operand[0], recog_operand[1]));
else if (code == CODE_FOR_cmpsf)
emit_insn (gen_cmpeqsf (recog_operand[0], recog_operand[1]));
else if (code == CODE_FOR_cmpdf)
emit_insn (gen_cmpeqdf (recog_operand[0], recog_operand[1]));
else
else
abort ();
abort ();
emit_jump_insn (gen_flipped_cbranch (label));
emit_jump_insn (gen_flipped_cbranch (operands
[
0
]
));
DONE;
DONE;
}")
}")
...
@@ -814,28 +787,16 @@
...
@@ -814,28 +787,16 @@
""
""
"
"
{
{
rtx label = operands[0];
if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT)
enum insn_code code;
emit_insn (gen_cmpgtsi (i860_compare_op0, i860_compare_op1));
rtx prev;
else if (GET_MODE (i860_compare_op0) == SFmode)
emit_insn (gen_cmpgtsf (i860_compare_op0, i860_compare_op1));
end_sequence ();
else if (GET_MODE (i860_compare_op0) == DFmode)
prev = get_last_insn ();
emit_insn (gen_cmpgtdf (i860_compare_op0, i860_compare_op1));
code = recog_memoized (prev);
insn_extract (prev);
NEXT_INSN (PREV_INSN (prev)) = 0;
set_last_insn (PREV_INSN (prev));
start_sequence ();
if (code == CODE_FOR_cmpsi)
emit_insn (gen_cmpgtsi (recog_operand[0], recog_operand[1]));
else if (code == CODE_FOR_cmpsf)
emit_insn (gen_cmpgtsf (recog_operand[0], recog_operand[1]));
else if (code == CODE_FOR_cmpdf)
emit_insn (gen_cmpgtdf (recog_operand[0], recog_operand[1]));
else
else
abort ();
abort ();
emit_jump_insn (gen_flipped_inverse_cbranch (label));
emit_jump_insn (gen_flipped_inverse_cbranch (operands
[
0
]
));
DONE;
DONE;
}")
}")
...
@@ -848,28 +809,16 @@
...
@@ -848,28 +809,16 @@
""
""
"
"
{
{
rtx label = operands[0];
if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT)
enum insn_code code;
emit_insn (gen_cmpltsi (i860_compare_op0, i860_compare_op1));
rtx prev;
else if (GET_MODE (i860_compare_op0) == SFmode)
emit_insn (gen_cmpltsf (i860_compare_op0, i860_compare_op1));
end_sequence ();
else if (GET_MODE (i860_compare_op0) == DFmode)
prev = get_last_insn ();
emit_insn (gen_cmpltdf (i860_compare_op0, i860_compare_op1));
code = recog_memoized (prev);
insn_extract (prev);
NEXT_INSN (PREV_INSN (prev)) = 0;
set_last_insn (PREV_INSN (prev));
start_sequence ();
if (code == CODE_FOR_cmpsi)
emit_insn (gen_cmpltsi (recog_operand[0], recog_operand[1]));
else if (code == CODE_FOR_cmpsf)
emit_insn (gen_cmpltsf (recog_operand[0], recog_operand[1]));
else if (code == CODE_FOR_cmpdf)
emit_insn (gen_cmpltdf (recog_operand[0], recog_operand[1]));
else
else
abort ();
abort ();
emit_jump_insn (gen_flipped_inverse_cbranch (label));
emit_jump_insn (gen_flipped_inverse_cbranch (operands
[
0
]
));
DONE;
DONE;
}")
}")
...
@@ -882,33 +831,20 @@
...
@@ -882,33 +831,20 @@
""
""
"
"
{
{
rtx label = operands[0];
if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT)
enum insn_code code;
rtx prev;
end_sequence ();
prev = get_last_insn ();
code = recog_memoized (prev);
insn_extract (prev);
NEXT_INSN (PREV_INSN (prev)) = 0;
set_last_insn (PREV_INSN (prev));
start_sequence ();
if (code == CODE_FOR_cmpsi)
{
{
emit_insn (gen_cmpgtsi (
recog_operand[0], recog_operand[1]
));
emit_insn (gen_cmpgtsi (
i860_compare_op0, i860_compare_op1
));
emit_jump_insn (gen_flipped_cbranch (
label
));
emit_jump_insn (gen_flipped_cbranch (
operands
[
0
]
));
}
}
else
else
{
{
if (
code == CODE_FOR_cmpsf
)
if (
GET_MODE (i860_compare_op0) == SFmode
)
emit_insn (gen_cmplesf (
recog_operand[0], recog_operand[1]
));
emit_insn (gen_cmplesf (
i860_compare_op0, i860_compare_op1
));
else if (
code == CODE_FOR_cmpdf
)
else if (
GET_MODE (i860_compare_op0) == DFmode
)
emit_insn (gen_cmpledf (
recog_operand[0], recog_operand[1]
));
emit_insn (gen_cmpledf (
i860_compare_op0, i860_compare_op1
));
else
else
abort ();
abort ();
emit_jump_insn (gen_flipped_inverse_cbranch (
label
));
emit_jump_insn (gen_flipped_inverse_cbranch (
operands
[
0
]
));
}
}
DONE;
DONE;
}")
}")
...
@@ -922,33 +858,20 @@
...
@@ -922,33 +858,20 @@
""
""
"
"
{
{
rtx label = operands[0];
if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) == MODE_INT)
enum insn_code code;
rtx prev;
end_sequence ();
prev = get_last_insn ();
code = recog_memoized (prev);
insn_extract (prev);
NEXT_INSN (PREV_INSN (prev)) = 0;
set_last_insn (PREV_INSN (prev));
start_sequence ();
if (code == CODE_FOR_cmpsi)
{
{
emit_insn (gen_cmpltsi (
recog_operand[0], recog_operand[1]
));
emit_insn (gen_cmpltsi (
i860_compare_op0, i860_compare_op1
));
emit_jump_insn (gen_flipped_cbranch (
label
));
emit_jump_insn (gen_flipped_cbranch (
operands
[
0
]
));
}
}
else
else
{
{
if (
code == CODE_FOR_cmpsf
)
if (
GET_MODE (i860_compare_op0) == SFmode
)
emit_insn (gen_cmpgesf (
recog_operand[0], recog_operand[1]
));
emit_insn (gen_cmpgesf (
i860_compare_op0, i860_compare_op1
));
else if (
code == CODE_FOR_cmpdf
)
else if (
GET_MODE (i860_compare_op0) == DFmode
)
emit_insn (gen_cmpgedf (
recog_operand[0], recog_operand[1]
));
emit_insn (gen_cmpgedf (
i860_compare_op0, i860_compare_op1
));
else
else
abort ();
abort ();
emit_jump_insn (gen_flipped_inverse_cbranch (
label
));
emit_jump_insn (gen_flipped_inverse_cbranch (
operands
[
0
]
));
}
}
DONE;
DONE;
}")
}")
...
@@ -962,24 +885,11 @@
...
@@ -962,24 +885,11 @@
""
""
"
"
{
{
rtx label = operands[0];
if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) != MODE_INT)
enum insn_code code;
rtx prev;
end_sequence ();
prev = get_last_insn ();
code = recog_memoized (prev);
insn_extract (prev);
NEXT_INSN (PREV_INSN (prev)) = 0;
set_last_insn (PREV_INSN (prev));
start_sequence ();
if (code == CODE_FOR_cmpsi)
emit_insn (gen_cmpleusi (recog_operand[0], recog_operand[1]));
else
abort ();
abort ();
emit_jump_insn (gen_flipped_cbranch (label));
emit_insn (gen_cmpleusi (i860_compare_op0, i860_compare_op1));
emit_jump_insn (gen_flipped_cbranch (operands
[
0
]
));
DONE;
DONE;
}")
}")
...
@@ -992,24 +902,11 @@
...
@@ -992,24 +902,11 @@
""
""
"
"
{
{
rtx label = operands[0];
if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) != MODE_INT)
enum insn_code code;
rtx prev;
end_sequence ();
prev = get_last_insn ();
code = recog_memoized (prev);
insn_extract (prev);
NEXT_INSN (PREV_INSN (prev)) = 0;
set_last_insn (PREV_INSN (prev));
start_sequence ();
if (code == CODE_FOR_cmpsi)
emit_insn (gen_cmpgeusi (recog_operand[0], recog_operand[1]));
else
abort ();
abort ();
emit_jump_insn (gen_flipped_cbranch (label));
emit_insn (gen_cmpgeusi (i860_compare_op0, i860_compare_op1));
emit_jump_insn (gen_flipped_cbranch (operands
[
0
]
));
DONE;
DONE;
}")
}")
...
@@ -1022,24 +919,11 @@
...
@@ -1022,24 +919,11 @@
""
""
"
"
{
{
rtx label = operands[0];
if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) != MODE_INT)
enum insn_code code;
rtx prev;
end_sequence ();
prev = get_last_insn ();
code = recog_memoized (prev);
insn_extract (prev);
NEXT_INSN (PREV_INSN (prev)) = 0;
set_last_insn (PREV_INSN (prev));
start_sequence ();
if (code == CODE_FOR_cmpsi)
emit_insn (gen_cmpgeusi (recog_operand[0], recog_operand[1]));
else
abort ();
abort ();
emit_jump_insn (gen_flipped_inverse_cbranch (label));
emit_insn (gen_cmpgeusi (i860_compare_op0, i860_compare_op1));
emit_jump_insn (gen_flipped_inverse_cbranch (operands
[
0
]
));
DONE;
DONE;
}")
}")
...
@@ -1052,24 +936,11 @@
...
@@ -1052,24 +936,11 @@
""
""
"
"
{
{
rtx label = operands[0];
if (GET_MODE_CLASS (GET_MODE (i860_compare_op0)) != MODE_INT)
enum insn_code code;
rtx prev;
end_sequence ();
prev = get_last_insn ();
code = recog_memoized (prev);
insn_extract (prev);
NEXT_INSN (PREV_INSN (prev)) = 0;
set_last_insn (PREV_INSN (prev));
start_sequence ();
if (code == CODE_FOR_cmpsi)
emit_insn (gen_cmpleusi (recog_operand[0], recog_operand[1]));
else
abort ();
abort ();
emit_jump_insn (gen_flipped_inverse_cbranch (label));
emit_insn (gen_cmpleusi (i860_compare_op0, i860_compare_op1));
emit_jump_insn (gen_flipped_inverse_cbranch (operands
[
0
]
));
DONE;
DONE;
}")
}")
...
@@ -1847,8 +1718,8 @@
...
@@ -1847,8 +1718,8 @@
(define_insn "addsi3"
(define_insn "addsi3"
[
(set (match_operand:SI 0 "register_operand" "=r,
*
f")
[
(set (match_operand:SI 0 "register_operand" "=r,
*
f")
(plus:SI (match_operand:SI 1 "nonmemory_operand" "%r,
!
*
f")
(plus:SI (match_operand:SI 1 "nonmemory_operand" "%r,
*
f")
(match_operand:SI 2 "arith_operand" "rI,
!
*
f")))]
(match_operand:SI 2 "arith_operand" "rI,
*
f")))]
""
""
"
*
"
*
{
{
...
@@ -1867,8 +1738,8 @@
...
@@ -1867,8 +1738,8 @@
(define_insn "subsi3"
(define_insn "subsi3"
[
(set (match_operand:SI 0 "register_operand" "=r,r,
*
f")
[
(set (match_operand:SI 0 "register_operand" "=r,r,
*
f")
(minus:SI (match_operand:SI 1 "register_operand" "r,I,
!
*
f")
(minus:SI (match_operand:SI 1 "register_operand" "r,I,
*
f")
(match_operand:SI 2 "arith_operand" "rI,r,
!
*
f")))]
(match_operand:SI 2 "arith_operand" "rI,r,
*
f")))]
""
""
"
*
"
*
{
{
...
...
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