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
4debb280
Commit
4debb280
authored
Sep 16, 1992
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not fold constant comparisons
From-SVN: r2136
parent
fcc415d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
84 deletions
+1
-84
gcc/config/mips/mips.c
+0
-83
gcc/config/mips/mips.h
+1
-1
No files found.
gcc/config/mips/mips.c
View file @
4debb280
...
@@ -1531,8 +1531,6 @@ map_test_to_internal_test (test_code)
...
@@ -1531,8 +1531,6 @@ map_test_to_internal_test (test_code)
/* Generate the code to compare two integer values. The return value is:
/* Generate the code to compare two integer values. The return value is:
(reg:SI xx) The pseudo register the comparison is in
(reg:SI xx) The pseudo register the comparison is in
(const_int 0) The comparison is always false
(const_int 1) The comparison is always true
(rtx)0 No register, generate a simple branch. */
(rtx)0 No register, generate a simple branch. */
rtx
rtx
...
@@ -1583,52 +1581,6 @@ gen_int_relational (test_code, result, cmp0, cmp1, p_invert)
...
@@ -1583,52 +1581,6 @@ gen_int_relational (test_code, result, cmp0, cmp1, p_invert)
p_info
=
&
info
[
(
int
)
test
];
p_info
=
&
info
[
(
int
)
test
];
eqne_p
=
(
p_info
->
test_code
==
XOR
);
eqne_p
=
(
p_info
->
test_code
==
XOR
);
/* See if the test is always true or false. */
if
((
GET_CODE
(
cmp0
)
==
REG
||
GET_CODE
(
cmp0
)
==
SUBREG
)
&&
GET_CODE
(
cmp1
)
==
CONST_INT
)
{
HOST_WIDE_INT
value
=
INTVAL
(
cmp1
);
rtx
truth
=
(
rtx
)
0
;
if
(
test
==
ITEST_GEU
&&
value
==
0
)
truth
=
const1_rtx
;
else
if
(
test
==
ITEST_LTU
&&
value
==
0
)
truth
=
const0_rtx
;
else
if
(
!
TARGET_INT64
)
{
if
(
test
==
ITEST_LTU
&&
value
==
-
1
)
truth
=
const1_rtx
;
else
if
(
test
==
ITEST_GTU
&&
value
==
-
1
)
truth
=
const0_rtx
;
else
if
(
test
==
ITEST_LEU
&&
value
==
-
1
)
truth
=
const1_rtx
;
else
if
(
test
==
ITEST_GT
&&
value
==
0x7fffffff
)
truth
=
const0_rtx
;
else
if
(
test
==
ITEST_LE
&&
value
==
0x7fffffff
)
truth
=
const1_rtx
;
else
if
(
test
==
ITEST_LT
&&
value
==
0x80000000
)
truth
=
const0_rtx
;
else
if
(
test
==
ITEST_GE
&&
value
==
0x80000000
)
truth
=
const1_rtx
;
}
if
(
truth
!=
(
rtx
)
0
)
{
if
(
result
!=
(
rtx
)
0
)
emit_move_insn
(
result
,
truth
);
return
truth
;
}
}
/* Eliminate simple branches */
/* Eliminate simple branches */
branch_p
=
(
result
==
(
rtx
)
0
);
branch_p
=
(
result
==
(
rtx
)
0
);
if
(
branch_p
)
if
(
branch_p
)
...
@@ -1813,41 +1765,6 @@ gen_conditional_branch (operands, test_code)
...
@@ -1813,41 +1765,6 @@ gen_conditional_branch (operands, test_code)
break
;
break
;
}
}
/* Handle always true or always false cases directly */
if
(
GET_CODE
(
cmp0
)
==
CONST_INT
&&
GET_CODE
(
cmp1
)
==
CONST_INT
)
{
HOST_WIDE_INT
sval0
=
INTVAL
(
cmp0
);
HOST_WIDE_INT
sval1
=
INTVAL
(
cmp1
);
unsigned
long
uval0
=
sval0
;
unsigned
long
uval1
=
sval1
;
int
truth
=
0
;
switch
(
test_code
)
{
default
:
goto
fail
;
case
EQ
:
truth
=
(
sval0
==
sval1
);
break
;
case
NE
:
truth
=
(
sval0
!=
sval1
);
break
;
case
GT
:
truth
=
(
sval0
>
sval1
);
break
;
case
GE
:
truth
=
(
sval0
>=
sval1
);
break
;
case
LT
:
truth
=
(
sval0
<
sval1
);
break
;
case
LE
:
truth
=
(
sval0
<=
sval1
);
break
;
case
GTU
:
truth
=
(
uval0
>
uval1
);
break
;
case
GEU
:
truth
=
(
uval0
>=
uval1
);
break
;
case
LTU
:
truth
=
(
uval0
<
uval1
);
break
;
case
LEU
:
truth
=
(
uval0
<=
uval1
);
break
;
}
if
(
invert
)
truth
=
!
truth
;
if
(
truth
)
emit_jump_insn
(
gen_rtx
(
SET
,
VOIDmode
,
pc_rtx
,
label1
));
return
;
}
/* Generate the jump */
/* Generate the jump */
if
(
invert
)
if
(
invert
)
{
{
...
...
gcc/config/mips/mips.h
View file @
4debb280
...
@@ -473,7 +473,7 @@ while (0)
...
@@ -473,7 +473,7 @@ while (0)
/* Print subsidiary information on the compiler version in use. */
/* Print subsidiary information on the compiler version in use. */
#define MIPS_VERSION "[AL 1.1, MM 2
4
]"
#define MIPS_VERSION "[AL 1.1, MM 2
5
]"
#ifndef MACHINE_TYPE
#ifndef MACHINE_TYPE
#define MACHINE_TYPE "BSD Mips"
#define MACHINE_TYPE "BSD Mips"
...
...
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