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
b6cc0a72
Commit
b6cc0a72
authored
Aug 02, 2000
by
Kazu Hirata
Committed by
Jeff Law
Aug 02, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* fold-const.c: Fix formatting.
From-SVN: r35425
parent
4e9efe54
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
24 deletions
+22
-24
gcc/ChangeLog
+4
-0
gcc/fold-const.c
+18
-24
No files found.
gcc/ChangeLog
View file @
b6cc0a72
2000-08-02 Kazu Hirata <kazu@hxi.com>
* fold-const.c: Fix formatting.
Wed Aug 2 16:26:15 MET DST 2000 Jan Hubicka <jh@suse.cz>
* i386.c (legitimate_address_p): Accept other bases than
...
...
gcc/fold-const.c
View file @
b6cc0a72
...
...
@@ -27,7 +27,6 @@ Boston, MA 02111-1307, USA. */
@@ This would also make life easier when this technology is used
@@ for cross-compilers. */
/* The entry points in this file are fold, size_int_wide, size_binop
and force_fit_type.
...
...
@@ -113,7 +112,6 @@ static int count_cond PARAMS ((tree, int));
#define CHARMASK 0x7f
#endif
/* We know that A1 + B1 = SUM1, using 2's complement arithmetic and ignoring
overflow. Suppose A, B and SUM have the same respective signs as A1, B1,
and SUM1. Then this yields nonzero if overflow occurred during the
...
...
@@ -293,8 +291,8 @@ neg_double (l1, h1, lv, hv)
}
else
{
*
lv
=
-
l1
;
*
hv
=
~
h1
;
*
lv
=
-
l1
;
*
hv
=
~
h1
;
return
0
;
}
}
...
...
@@ -345,7 +343,7 @@ mul_double (l1, h1, l2, h2, lv, hv)
/* Check for overflow by calculating the top half of the answer in full;
it should agree with the low half's sign bit. */
decode
(
prod
+
4
,
&
toplow
,
&
tophigh
);
decode
(
prod
+
4
,
&
toplow
,
&
tophigh
);
if
(
h1
<
0
)
{
neg_double
(
l2
,
h2
,
&
neglow
,
&
neghigh
);
...
...
@@ -376,7 +374,7 @@ lshift_double (l1, h1, count, prec, lv, hv, arith)
{
if
(
count
<
0
)
{
rshift_double
(
l1
,
h1
,
-
count
,
prec
,
lv
,
hv
,
arith
);
rshift_double
(
l1
,
h1
,
-
count
,
prec
,
lv
,
hv
,
arith
);
return
;
}
...
...
@@ -602,8 +600,9 @@ div_and_round_double (code, uns,
unsigned
HOST_WIDE_INT
quo_est
,
scale
;
/* Find the highest non-zero divisor digit. */
for
(
i
=
4
-
1
;
;
i
--
)
if
(
den
[
i
]
!=
0
)
{
for
(
i
=
4
-
1
;;
i
--
)
if
(
den
[
i
]
!=
0
)
{
den_hi_sig
=
i
;
break
;
}
...
...
@@ -1124,7 +1123,7 @@ real_hex_to_f (s, mode)
}
++
p
;
}
else
if
(
c
==
'.'
)
else
if
(
c
==
'.'
)
{
++
decpt
;
++
p
;
...
...
@@ -1143,7 +1142,7 @@ real_hex_to_f (s, mode)
/* Value of exponent.
The exponent field is a decimal integer. */
while
(
ISDIGIT
(
*
p
))
while
(
ISDIGIT
(
*
p
))
{
k
=
(
*
p
++
&
CHARMASK
)
-
'0'
;
expon
=
10
*
expon
+
k
;
...
...
@@ -1214,7 +1213,7 @@ real_hex_to_f (s, mode)
nrmcount
+=
1
;
}
if
(
isfloat
||
GET_MODE_SIZE
(
mode
)
==
UNITS_PER_WORD
)
if
(
isfloat
||
GET_MODE_SIZE
(
mode
)
==
UNITS_PER_WORD
)
{
/* Keep 24 bits precision, bits 0x7fffff80.
Rounding bit is 0x40. */
...
...
@@ -1495,7 +1494,7 @@ int_const_binop (code, arg1, arg2, notrunc, forsize)
break
;
case
RSHIFT_EXPR
:
int2l
=
-
int2l
;
int2l
=
-
int2l
;
case
LSHIFT_EXPR
:
/* It's unclear from the C standard whether shifts can overflow.
The following code ignores overflow; perhaps a C standard
...
...
@@ -1636,7 +1635,7 @@ int_const_binop (code, arg1, arg2, notrunc, forsize)
/* Define input and output argument for const_binop_1. */
struct
cb_args
{
enum
tree_code
code
;
/* Input: tree code for operation*/
enum
tree_code
code
;
/* Input: tree code for operation
.
*/
tree
type
;
/* Input: tree type for operation. */
REAL_VALUE_TYPE
d1
,
d2
;
/* Input: floating point operands. */
tree
t
;
/* Output: constant for result. */
...
...
@@ -1708,7 +1707,8 @@ const_binop (code, arg1, arg2, notrunc)
register
tree
arg1
,
arg2
;
int
notrunc
;
{
STRIP_NOPS
(
arg1
);
STRIP_NOPS
(
arg2
);
STRIP_NOPS
(
arg1
);
STRIP_NOPS
(
arg2
);
if
(
TREE_CODE
(
arg1
)
==
INTEGER_CST
)
return
int_const_binop
(
code
,
arg1
,
arg2
,
notrunc
,
0
);
...
...
@@ -1996,7 +1996,7 @@ static void
fold_convert_1
(
data
)
PTR
data
;
{
struct
fc_args
*
args
=
(
struct
fc_args
*
)
data
;
struct
fc_args
*
args
=
(
struct
fc_args
*
)
data
;
args
->
t
=
build_real
(
args
->
type
,
real_value_truncate
(
TYPE_MODE
(
args
->
type
),
...
...
@@ -2450,7 +2450,8 @@ operand_equal_for_comparison_p (arg0, arg1, other)
and see if the inner values are the same. This removes any
signedness comparison, which doesn't matter here. */
primarg0
=
arg0
,
primarg1
=
arg1
;
STRIP_NOPS
(
primarg0
);
STRIP_NOPS
(
primarg1
);
STRIP_NOPS
(
primarg0
);
STRIP_NOPS
(
primarg1
);
if
(
operand_equal_p
(
primarg0
,
primarg1
,
0
))
return
1
;
...
...
@@ -2700,8 +2701,6 @@ pedantic_omit_one_operand (type, result, omitted)
return
pedantic_non_lvalue
(
t
);
}
/* Return a simplified tree node for the truth-negation of ARG. This
never alters ARG itself. We assume that ARG is an operation that
returns a truth value (0 or 1). */
...
...
@@ -3119,7 +3118,6 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp,
return
0
;
}
inner
=
get_inner_reference
(
exp
,
pbitsize
,
pbitpos
,
&
offset
,
pmode
,
punsignedp
,
pvolatilep
,
&
alignment
);
if
((
inner
==
exp
&&
and_mask
==
0
)
...
...
@@ -5451,7 +5449,7 @@ fold (expr)
if
(((
code0
==
RSHIFT_EXPR
&&
code1
==
LSHIFT_EXPR
)
||
(
code1
==
RSHIFT_EXPR
&&
code0
==
LSHIFT_EXPR
))
&&
operand_equal_p
(
TREE_OPERAND
(
arg0
,
0
),
TREE_OPERAND
(
arg1
,
0
),
0
)
TREE_OPERAND
(
arg1
,
0
),
0
)
&&
TREE_UNSIGNED
(
TREE_TYPE
(
TREE_OPERAND
(
arg0
,
0
))))
{
register
tree
tree01
,
tree11
;
...
...
@@ -5510,7 +5508,6 @@ fold (expr)
}
}
associate
:
/* In most languages, can't associate operations on floats through
parentheses. Rather than remember where the parentheses were, we
...
...
@@ -6109,7 +6106,6 @@ fold (expr)
build_real
(
TREE_TYPE
(
arg1
),
dconst0
)));
}
/* If one arg is a constant integer, put it last. */
if
(
TREE_CODE
(
arg0
)
==
INTEGER_CST
&&
TREE_CODE
(
arg1
)
!=
INTEGER_CST
)
...
...
@@ -6198,7 +6194,6 @@ fold (expr)
mask
)));
}
t
=
build
(
code
,
type
,
(
constopnum
==
0
)
?
newconst
:
varop
,
(
constopnum
==
1
)
?
newconst
:
varop
);
...
...
@@ -6260,7 +6255,6 @@ fold (expr)
mask
)));
}
t
=
build
(
code
,
type
,
(
constopnum
==
0
)
?
newconst
:
varop
,
(
constopnum
==
1
)
?
newconst
:
varop
);
...
...
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