src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp
changeset 48807 fd8ccb37fce9
parent 47216 71c04702a3d5
child 49027 8dc742d9bbab
equal deleted inserted replaced
48806:51fc22e5fb00 48807:fd8ccb37fce9
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   570     }
   570     }
   571 
   571 
   572     if (!ImplicitDiv0Checks) {
   572     if (!ImplicitDiv0Checks) {
   573       __ cmp(lir_cond_equal, right.result(), LIR_OprFact::intConst(0));
   573       __ cmp(lir_cond_equal, right.result(), LIR_OprFact::intConst(0));
   574       __ branch(lir_cond_equal, T_INT, new DivByZeroStub(info));
   574       __ branch(lir_cond_equal, T_INT, new DivByZeroStub(info));
       
   575       // Idiv/irem cannot trap (passing info would generate an assertion).
       
   576       info = NULL;
   575     }
   577     }
   576     LIR_Opr tmp = FrameMap::rdx_opr; // idiv and irem use rdx in their implementation
   578     LIR_Opr tmp = FrameMap::rdx_opr; // idiv and irem use rdx in their implementation
   577     if (x->op() == Bytecodes::_irem) {
   579     if (x->op() == Bytecodes::_irem) {
   578       __ irem(left.result(), right.result(), result_reg, tmp, info);
   580       __ irem(left.result(), right.result(), result_reg, tmp, info);
   579     } else if (x->op() == Bytecodes::_idiv) {
   581     } else if (x->op() == Bytecodes::_idiv) {