diff options
author | Andrew Haley <aph@cygnus.com> | 1999-07-21 14:51:24 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 1999-07-21 14:51:24 +0000 |
commit | 0b094f655adbcfc286d1e03937814129dd5fa640 (patch) | |
tree | c27a832be3b216288616a1f5fd5aa1334bcc9bca /gcc/java/parse.c | |
parent | aa4759c11cc78443455b69fca236c24ff89c91a1 (diff) | |
download | gcc-0b094f655adbcfc286d1e03937814129dd5fa640.zip gcc-0b094f655adbcfc286d1e03937814129dd5fa640.tar.gz gcc-0b094f655adbcfc286d1e03937814129dd5fa640.tar.bz2 |
lang.c (flag_use_divide_subroutine): New variable.
1999-07-15 Andrew Haley <aph@cygnus.com>
* lang.c (flag_use_divide_subroutine): New variable.
* typeck.c: (convert_ieee_real_to_integer): Bounds check
fp-to-integer conversion.
(convert): Call convert_ieee_real_to_integer when flag_fast_math
is not set.
* expr.c (build_java_soft_divmod): New function.
(build_java_binop): Call build_java_soft_divmod if
flag_use_divide_subroutine is set.
* decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
soft_lrem_node: new builtin functions.
(init_decl_processing) Initialize the new builtins.
* java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
soft_lrem_node: new builtin functions.
(build_java_soft_divmod): New function.
* parse.y: Call build_java_soft_divmod if
flag_use_divide_subroutine is set.
* parse.c: Rebuilt.
* jvspec.c (lang_specific_driver): Always allow an extra arg (for
a --specs= arg) even if not linking.
* lang-options.h (DEFINE_LANG_NAME ("Java")): Add
-fuse-divide-subroutine
From-SVN: r28209
Diffstat (limited to 'gcc/java/parse.c')
-rw-r--r-- | gcc/java/parse.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/java/parse.c b/gcc/java/parse.c index e36ef3f..da19cda 100644 --- a/gcc/java/parse.c +++ b/gcc/java/parse.c @@ -2212,7 +2212,7 @@ static const short yycheck[] = { 3, #define YYPURE 1 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/share/misc/bison.simple" +#line 3 "/usr/local/share/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. @@ -2229,7 +2229,7 @@ static const short yycheck[] = { 3, You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. @@ -2363,10 +2363,8 @@ int yydebug; /* nonzero means print parse trace */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ -#ifndef YYPARSE_PARAM int yyparse (void); #endif -#endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) @@ -2407,7 +2405,7 @@ __yy_memcpy (char *to, char *from, int count) #endif #endif -#line 196 "/usr/share/misc/bison.simple" +#line 196 "/usr/local/share/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -4696,7 +4694,7 @@ case 495: break;} } /* the action file gets copied in in place of this dollarsign */ -#line 498 "/usr/share/misc/bison.simple" +#line 498 "/usr/local/share/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -11998,6 +11996,12 @@ patch_binop (node, wfl_op1, wfl_op2) if (code == RDIV_EXPR && TREE_CODE (prom_type) == INTEGER_TYPE) TREE_SET_CODE (node, TRUNC_DIV_EXPR); + if (TREE_CODE (prom_type) == INTEGER_TYPE + && flag_use_divide_subroutine + && ! flag_emit_class_files + && (code == RDIV_EXPR || code == TRUNC_MOD_EXPR)) + return build_java_soft_divmod (TREE_CODE (node), prom_type, op1, op2); + /* This one is more complicated. FLOATs are processed by a function call to soft_fmod. Duplicate the value of the COMPOUND_ASSIGN_P flag. */ |