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.
-
+ * 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
+
Tue Jul 20 13:20:05 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_and_layout): Check methods only once.
}
if (saw_g + saw_O == 0)
num_args++;
- if (will_link)
- num_args++;
+ num_args++;
arglist = (char **) xmalloc ((num_args + 1) * sizeof (char *));
for (i = 0, j = 0; i < argc; i++, j++)
continue;
}
- if (will_link && spec_file == NULL && strncmp (argv[i], "-L", 2) == 0)
+ if (spec_file == NULL && strncmp (argv[i], "-L", 2) == 0)
spec_file = find_spec_file (argv[i] + 2);
if (strncmp (argv[i], "-fmain=", 7) == 0)
if (saw_g + saw_O == 0)
arglist[j++] = "-g1";
- /* Read the specs file corresponding to libgcj, but only if linking.
+ /* Read the specs file corresponding to libgcj.
If we didn't find the spec file on the -L path, then we hope it
is somewhere in the standard install areas. */
- if (will_link)
+ if (! saw_C)
arglist[j++] = spec_file == NULL ? "-specs=libgcj.spec" : spec_file;
if (saw_C)
{ "-fCLASSPATH", "Set class path" },
{ "-I", "Add directory to class path" },
{ "-foutput-class-dir", "Directory where class files should be written" },
+ { "-fuse-divide-subroutine", "" },
+ { "-fno-use-divide-subroutine", "Use built-in instructions for division" },
{ "-Wredundant-modifiers",
"Warn if modifiers are specified when not necessary"},
- { "-Wunsupported-jdk11", "Warn if `final' local variables are specified"},
+ { "-Wunsupported-jdk11", "Warn if `final' local variables are specified"}
#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.
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.
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
-#ifndef YYPARSE_PARAM
int yyparse (void);
#endif
-#endif
\f
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#endif
#endif
\f
-#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 *.
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"
\f
yyvsp -= yylen;
yyssp -= yylen;
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. */