aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorAndrew Haley <aph@cygnus.com>1999-07-21 14:28:33 +0000
committerAndrew Haley <aph@gcc.gnu.org>1999-07-21 14:28:33 +0000
commitaa4759c11cc78443455b69fca236c24ff89c91a1 (patch)
tree7a86e6410656ef434107be5353da306f7adf35c0 /gcc/java/parse.y
parent9c1ce4332e0bfc9289296fde205af0eb3a21e50b (diff)
downloadgcc-aa4759c11cc78443455b69fca236c24ff89c91a1.zip
gcc-aa4759c11cc78443455b69fca236c24ff89c91a1.tar.gz
gcc-aa4759c11cc78443455b69fca236c24ff89c91a1.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. From-SVN: r28208
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index be1c788..23b2c7a 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -9411,6 +9411,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. */