diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2015-10-21 21:10:49 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-10-21 21:10:49 +0000 |
commit | c26065cc38586f9d014b0f04a54dfa0e52c23189 (patch) | |
tree | 084c76d531cbfb2e9595783f1db615465fd22c4f /gcc/tree.def | |
parent | e90bedf52c86a7b4e2e0a1f8a5a1450725cb95b6 (diff) | |
download | gcc-c26065cc38586f9d014b0f04a54dfa0e52c23189.zip gcc-c26065cc38586f9d014b0f04a54dfa0e52c23189.tar.gz gcc-c26065cc38586f9d014b0f04a54dfa0e52c23189.tar.bz2 |
tree.def (CEIL_DIV_EXPR, [...]): Tweak comments.
* tree.def (CEIL_DIV_EXPR, FLOOR_DIV_EXPR, ROUND_DIV_EXPR): Tweak
comments.
(TRUNC_MOD_EXPR, CEIL_MOD_EXPR, FLOOR_MOD_EXPR, ROUND_MOD_EXPR):
Add comments on sign of the result.
* fold-const.c (tree_binary_nonnegative_warnv_p) <FLOOR_MOD_EXPR>:
Recurse on operand #1 instead of operand #0.
<CEIL_MOD_EXPR>: Do not recurse.
<ROUND_MOD_EXPR>: Likewise.
From-SVN: r229146
Diffstat (limited to 'gcc/tree.def')
-rw-r--r-- | gcc/tree.def | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/tree.def b/gcc/tree.def index 64e0727..d0a3bd6 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -685,19 +685,27 @@ DEFTREECODE (MULT_HIGHPART_EXPR, "mult_highpart_expr", tcc_binary, 2) /* Division for integer result that rounds the quotient toward zero. */ DEFTREECODE (TRUNC_DIV_EXPR, "trunc_div_expr", tcc_binary, 2) -/* Division for integer result that rounds the quotient toward infinity. */ +/* Division for integer result that rounds it toward plus infinity. */ DEFTREECODE (CEIL_DIV_EXPR, "ceil_div_expr", tcc_binary, 2) -/* Division for integer result that rounds toward minus infinity. */ +/* Division for integer result that rounds it toward minus infinity. */ DEFTREECODE (FLOOR_DIV_EXPR, "floor_div_expr", tcc_binary, 2) -/* Division for integer result that rounds toward nearest integer. */ +/* Division for integer result that rounds it toward nearest integer. */ DEFTREECODE (ROUND_DIV_EXPR, "round_div_expr", tcc_binary, 2) -/* Four kinds of remainder that go with the four kinds of division. */ +/* Four kinds of remainder that go with the four kinds of division: */ + +/* The sign of the remainder is that of the dividend. */ DEFTREECODE (TRUNC_MOD_EXPR, "trunc_mod_expr", tcc_binary, 2) + +/* The sign of the remainder is the opposite of that of the divisor. */ DEFTREECODE (CEIL_MOD_EXPR, "ceil_mod_expr", tcc_binary, 2) + +/* The sign of the remainder is that of the divisor. */ DEFTREECODE (FLOOR_MOD_EXPR, "floor_mod_expr", tcc_binary, 2) + +/* The sign of the remainder is not predictable. */ DEFTREECODE (ROUND_MOD_EXPR, "round_mod_expr", tcc_binary, 2) /* Division for real result. */ |