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
e869aa39
Commit
e869aa39
authored
Jan 26, 2003
by
Kazu Hirata
Committed by
Kazu Hirata
Jan 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* combine.c: Fix formatting.
From-SVN: r61862
parent
74fb4811
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
15 deletions
+20
-15
gcc/ChangeLog
+4
-0
gcc/combine.c
+16
-15
No files found.
gcc/ChangeLog
View file @
e869aa39
2003
-
01
-
26
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
2003
-
01
-
26
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
*
combine
.
c
:
Fix
formatting
.
2003
-
01
-
26
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
*
doc
/
gccint
.
texi
:
Update
the
copyright
.
*
doc
/
gccint
.
texi
:
Update
the
copyright
.
2003
-
01
-
26
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
2003
-
01
-
26
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
...
...
gcc/combine.c
View file @
e869aa39
/* Optimize by combining instructions for GNU compiler.
/* Optimize by combining instructions for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1999, 2000, 2001, 2002
, 2003
Free Software Foundation, Inc.
This file is part of GCC.
This file is part of GCC.
...
@@ -444,7 +444,7 @@ do_SUBST (into, newval)
...
@@ -444,7 +444,7 @@ do_SUBST (into, newval)
||
(
GET_CODE
(
oldval
)
==
ZERO_EXTEND
||
(
GET_CODE
(
oldval
)
==
ZERO_EXTEND
&&
GET_CODE
(
XEXP
(
oldval
,
0
))
==
CONST_INT
))
&&
GET_CODE
(
XEXP
(
oldval
,
0
))
==
CONST_INT
))
abort
();
abort
();
}
}
if
(
undobuf
.
frees
)
if
(
undobuf
.
frees
)
buf
=
undobuf
.
frees
,
undobuf
.
frees
=
buf
->
next
;
buf
=
undobuf
.
frees
,
undobuf
.
frees
=
buf
->
next
;
...
@@ -4286,7 +4286,7 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
...
@@ -4286,7 +4286,7 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
"a = (b & 8) == 0;" */
"a = (b & 8) == 0;" */
if
(
XEXP
(
x
,
1
)
==
constm1_rtx
if
(
XEXP
(
x
,
1
)
==
constm1_rtx
&&
GET_CODE
(
XEXP
(
x
,
0
))
!=
REG
&&
GET_CODE
(
XEXP
(
x
,
0
))
!=
REG
&&
!
(
GET_CODE
(
XEXP
(
x
,
0
))
==
SUBREG
&&
!
(
GET_CODE
(
XEXP
(
x
,
0
))
==
SUBREG
&&
GET_CODE
(
SUBREG_REG
(
XEXP
(
x
,
0
)))
==
REG
)
&&
GET_CODE
(
SUBREG_REG
(
XEXP
(
x
,
0
)))
==
REG
)
&&
nonzero_bits
(
XEXP
(
x
,
0
),
mode
)
==
1
)
&&
nonzero_bits
(
XEXP
(
x
,
0
),
mode
)
==
1
)
return
simplify_shift_const
(
NULL_RTX
,
ASHIFTRT
,
mode
,
return
simplify_shift_const
(
NULL_RTX
,
ASHIFTRT
,
mode
,
...
@@ -4349,8 +4349,8 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
...
@@ -4349,8 +4349,8 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
XEXP
(
x
,
0
));
XEXP
(
x
,
0
));
}
}
/* Canonicalize (minus (neg A) (mult B C)) to
/* Canonicalize (minus (neg A) (mult B C)) to
(minus (mult (neg B) C) A). */
(minus (mult (neg B) C) A). */
if
(
GET_CODE
(
XEXP
(
x
,
1
))
==
MULT
if
(
GET_CODE
(
XEXP
(
x
,
1
))
==
MULT
&&
GET_CODE
(
XEXP
(
x
,
0
))
==
NEG
)
&&
GET_CODE
(
XEXP
(
x
,
0
))
==
NEG
)
{
{
...
@@ -4550,7 +4550,7 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
...
@@ -4550,7 +4550,7 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
if
(
new_code
==
NE
&&
GET_MODE_CLASS
(
mode
)
==
MODE_INT
if
(
new_code
==
NE
&&
GET_MODE_CLASS
(
mode
)
==
MODE_INT
&&
GET_MODE_BITSIZE
(
mode
)
<=
HOST_BITS_PER_WIDE_INT
&&
GET_MODE_BITSIZE
(
mode
)
<=
HOST_BITS_PER_WIDE_INT
&&
((
STORE_FLAG_VALUE
&
GET_MODE_MASK
(
mode
))
&&
((
STORE_FLAG_VALUE
&
GET_MODE_MASK
(
mode
))
==
(
unsigned
HOST_WIDE_INT
)
1
<<
(
GET_MODE_BITSIZE
(
mode
)
-
1
))
==
(
unsigned
HOST_WIDE_INT
)
1
<<
(
GET_MODE_BITSIZE
(
mode
)
-
1
))
&&
op1
==
const0_rtx
&&
op1
==
const0_rtx
&&
mode
==
GET_MODE
(
op0
)
&&
mode
==
GET_MODE
(
op0
)
&&
(
i
=
exact_log2
(
nonzero_bits
(
op0
,
mode
)))
>=
0
)
&&
(
i
=
exact_log2
(
nonzero_bits
(
op0
,
mode
)))
>=
0
)
...
@@ -5325,16 +5325,16 @@ simplify_set (x)
...
@@ -5325,16 +5325,16 @@ simplify_set (x)
if
(
GET_CODE
(
true_rtx
)
==
IOR
if
(
GET_CODE
(
true_rtx
)
==
IOR
&&
rtx_equal_p
(
XEXP
(
true_rtx
,
0
),
false_rtx
))
&&
rtx_equal_p
(
XEXP
(
true_rtx
,
0
),
false_rtx
))
term1
=
false_rtx
,
true_rtx
=
XEXP
(
true_rtx
,
1
),
false_rtx
=
const0_rtx
;
term1
=
false_rtx
,
true_rtx
=
XEXP
(
true_rtx
,
1
),
false_rtx
=
const0_rtx
;
else
if
(
GET_CODE
(
true_rtx
)
==
IOR
else
if
(
GET_CODE
(
true_rtx
)
==
IOR
&&
rtx_equal_p
(
XEXP
(
true_rtx
,
1
),
false_rtx
))
&&
rtx_equal_p
(
XEXP
(
true_rtx
,
1
),
false_rtx
))
term1
=
false_rtx
,
true_rtx
=
XEXP
(
true_rtx
,
0
),
false_rtx
=
const0_rtx
;
term1
=
false_rtx
,
true_rtx
=
XEXP
(
true_rtx
,
0
),
false_rtx
=
const0_rtx
;
else
if
(
GET_CODE
(
false_rtx
)
==
IOR
else
if
(
GET_CODE
(
false_rtx
)
==
IOR
&&
rtx_equal_p
(
XEXP
(
false_rtx
,
0
),
true_rtx
))
&&
rtx_equal_p
(
XEXP
(
false_rtx
,
0
),
true_rtx
))
term1
=
true_rtx
,
false_rtx
=
XEXP
(
false_rtx
,
1
),
true_rtx
=
const0_rtx
;
term1
=
true_rtx
,
false_rtx
=
XEXP
(
false_rtx
,
1
),
true_rtx
=
const0_rtx
;
else
if
(
GET_CODE
(
false_rtx
)
==
IOR
else
if
(
GET_CODE
(
false_rtx
)
==
IOR
&&
rtx_equal_p
(
XEXP
(
false_rtx
,
1
),
true_rtx
))
&&
rtx_equal_p
(
XEXP
(
false_rtx
,
1
),
true_rtx
))
term1
=
true_rtx
,
false_rtx
=
XEXP
(
false_rtx
,
0
),
true_rtx
=
const0_rtx
;
term1
=
true_rtx
,
false_rtx
=
XEXP
(
false_rtx
,
0
),
true_rtx
=
const0_rtx
;
term2
=
gen_binary
(
AND
,
GET_MODE
(
src
),
term2
=
gen_binary
(
AND
,
GET_MODE
(
src
),
XEXP
(
XEXP
(
src
,
0
),
0
),
true_rtx
);
XEXP
(
XEXP
(
src
,
0
),
0
),
true_rtx
);
...
@@ -6452,7 +6452,7 @@ extract_left_shift (x, count)
...
@@ -6452,7 +6452,7 @@ extract_left_shift (x, count)
case
PLUS
:
case
IOR
:
case
XOR
:
case
AND
:
case
PLUS
:
case
IOR
:
case
XOR
:
case
AND
:
/* If we can safely shift this constant and we find the inner shift,
/* If we can safely shift this constant and we find the inner shift,
make a new operation. */
make a new operation. */
if
(
GET_CODE
(
XEXP
(
x
,
1
))
==
CONST_INT
if
(
GET_CODE
(
XEXP
(
x
,
1
))
==
CONST_INT
&&
(
INTVAL
(
XEXP
(
x
,
1
))
&
((((
HOST_WIDE_INT
)
1
<<
count
))
-
1
))
==
0
&&
(
INTVAL
(
XEXP
(
x
,
1
))
&
((((
HOST_WIDE_INT
)
1
<<
count
))
-
1
))
==
0
&&
(
tem
=
extract_left_shift
(
XEXP
(
x
,
0
),
count
))
!=
0
)
&&
(
tem
=
extract_left_shift
(
XEXP
(
x
,
0
),
count
))
!=
0
)
return
gen_binary
(
code
,
mode
,
tem
,
return
gen_binary
(
code
,
mode
,
tem
,
...
@@ -7254,7 +7254,7 @@ force_to_mode (x, mode, mask, reg, just_select)
...
@@ -7254,7 +7254,7 @@ force_to_mode (x, mode, mask, reg, just_select)
temp
=
simplify_binary_operation
(
code
==
ROTATE
?
ROTATERT
:
ROTATE
,
temp
=
simplify_binary_operation
(
code
==
ROTATE
?
ROTATERT
:
ROTATE
,
GET_MODE
(
x
),
GEN_INT
(
mask
),
GET_MODE
(
x
),
GEN_INT
(
mask
),
XEXP
(
x
,
1
));
XEXP
(
x
,
1
));
if
(
temp
&&
GET_CODE
(
temp
)
==
CONST_INT
)
if
(
temp
&&
GET_CODE
(
temp
)
==
CONST_INT
)
SUBST
(
XEXP
(
x
,
0
),
SUBST
(
XEXP
(
x
,
0
),
force_to_mode
(
XEXP
(
x
,
0
),
GET_MODE
(
x
),
force_to_mode
(
XEXP
(
x
,
0
),
GET_MODE
(
x
),
INTVAL
(
temp
),
reg
,
next_select
));
INTVAL
(
temp
),
reg
,
next_select
));
...
@@ -7326,7 +7326,7 @@ force_to_mode (x, mode, mask, reg, just_select)
...
@@ -7326,7 +7326,7 @@ force_to_mode (x, mode, mask, reg, just_select)
SUBST
(
XEXP
(
x
,
2
),
SUBST
(
XEXP
(
x
,
2
),
gen_lowpart_for_combine
(
GET_MODE
(
x
),
gen_lowpart_for_combine
(
GET_MODE
(
x
),
force_to_mode
(
XEXP
(
x
,
2
),
mode
,
force_to_mode
(
XEXP
(
x
,
2
),
mode
,
mask
,
reg
,
next_select
)));
mask
,
reg
,
next_select
)));
break
;
break
;
default
:
default
:
...
@@ -9798,7 +9798,7 @@ simplify_shift_const (x, code, result_mode, varop, orig_count)
...
@@ -9798,7 +9798,7 @@ simplify_shift_const (x, code, result_mode, varop, orig_count)
/* If COMPLEMENT_P is set, we have to complement X before doing the outer
/* If COMPLEMENT_P is set, we have to complement X before doing the outer
operation. */
operation. */
if
(
complement_p
)
if
(
complement_p
)
x
=
simplify_gen_unary
(
NOT
,
result_mode
,
x
,
result_mode
);
x
=
simplify_gen_unary
(
NOT
,
result_mode
,
x
,
result_mode
);
if
(
outer_op
!=
NIL
)
if
(
outer_op
!=
NIL
)
{
{
...
@@ -10454,7 +10454,7 @@ simplify_comparison (code, pop0, pop1)
...
@@ -10454,7 +10454,7 @@ simplify_comparison (code, pop0, pop1)
/* (unsigned) > 0x7fffffff is equivalent to < 0. */
/* (unsigned) > 0x7fffffff is equivalent to < 0. */
else
if
((
mode_width
<=
HOST_BITS_PER_WIDE_INT
)
else
if
((
mode_width
<=
HOST_BITS_PER_WIDE_INT
)
&&
(
const_op
==
((
HOST_WIDE_INT
)
1
<<
(
mode_width
-
1
))
-
1
))
&&
(
const_op
==
((
HOST_WIDE_INT
)
1
<<
(
mode_width
-
1
))
-
1
))
{
{
const_op
=
0
,
op1
=
const0_rtx
;
const_op
=
0
,
op1
=
const0_rtx
;
code
=
LT
;
code
=
LT
;
...
@@ -11277,6 +11277,7 @@ combine_reversed_comparison_code (exp)
...
@@ -11277,6 +11277,7 @@ combine_reversed_comparison_code (exp)
return
reversed_comparison_code_parts
(
GET_CODE
(
exp
),
return
reversed_comparison_code_parts
(
GET_CODE
(
exp
),
XEXP
(
x
,
0
),
XEXP
(
x
,
1
),
NULL
);
XEXP
(
x
,
0
),
XEXP
(
x
,
1
),
NULL
);
}
}
/* Return comparison with reversed code of EXP and operands OP0 and OP1.
/* Return comparison with reversed code of EXP and operands OP0 and OP1.
Return NULL_RTX in case we fail to do the reversal. */
Return NULL_RTX in case we fail to do the reversal. */
static
rtx
static
rtx
...
...
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