divnode.hpp revision 0
/*
* Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
// Portions of code courtesy of Clifford Click
// Optimization - Graph Style
//------------------------------DivINode---------------------------------------
// Integer division
// Note: this is division as defined by JVMS, i.e., MinInt/-1 == MinInt.
// On processors which don't naturally support this special case (e.g., x86),
// the matcher or runtime system must take care of this.
public:
virtual int Opcode() const;
};
//------------------------------DivLNode---------------------------------------
// Long division
public:
virtual int Opcode() const;
};
//------------------------------DivFNode---------------------------------------
// Float division
public:
virtual int Opcode() const;
};
//------------------------------DivDNode---------------------------------------
// Double division
public:
virtual int Opcode() const;
};
//------------------------------ModINode---------------------------------------
// Integer modulus
public:
virtual int Opcode() const;
};
//------------------------------ModLNode---------------------------------------
// Long modulus
public:
virtual int Opcode() const;
};
//------------------------------ModFNode---------------------------------------
// Float Modulus
public:
virtual int Opcode() const;
};
//------------------------------ModDNode---------------------------------------
// Double Modulus
public:
virtual int Opcode() const;
};
//------------------------------DivModNode---------------------------------------
// Division with remainder result.
class DivModNode : public MultiNode {
protected:
public:
enum {
div_proj_num = 0, // quotient
};
virtual int Opcode() const;
virtual bool is_CFG() const { return false; }
};
//------------------------------DivModINode---------------------------------------
// Integer division with remainder result.
class DivModINode : public DivModNode {
public:
virtual int Opcode() const;
// Make a divmod and associated projections from a div or mod.
};
//------------------------------DivModLNode---------------------------------------
// Long division with remainder result.
class DivModLNode : public DivModNode {
public:
virtual int Opcode() const;
// Make a divmod and associated projections from a div or mod.
};