137 };
138
139 //------------------------------DivModNode---------------------------------------
140 // Division with remainder result.
141 class DivModNode : public MultiNode {
142 protected:
143 DivModNode( Node *c, Node *dividend, Node *divisor );
144 public:
145 enum {
146 div_proj_num = 0, // quotient
147 mod_proj_num = 1 // remainder
148 };
149 virtual int Opcode() const;
150 virtual Node* Identity(PhaseGVN* phase) { return this; }
151 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) { return NULL; }
152 virtual const Type* Value(PhaseGVN* phase) const { return bottom_type(); }
153 virtual uint hash() const { return Node::hash(); }
154 virtual bool is_CFG() const { return false; }
155 virtual uint ideal_reg() const { return NotAMachineReg; }
156
157 ProjNode* div_proj() { return proj_out(div_proj_num); }
158 ProjNode* mod_proj() { return proj_out(mod_proj_num); }
159 };
160
161 //------------------------------DivModINode---------------------------------------
162 // Integer division with remainder result.
163 class DivModINode : public DivModNode {
164 public:
165 DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
166 virtual int Opcode() const;
167 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
168 virtual Node *match( const ProjNode *proj, const Matcher *m );
169
170 // Make a divmod and associated projections from a div or mod.
171 static DivModINode* make(Node* div_or_mod);
172 };
173
174 //------------------------------DivModLNode---------------------------------------
175 // Long division with remainder result.
176 class DivModLNode : public DivModNode {
177 public:
178 DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
|
137 };
138
139 //------------------------------DivModNode---------------------------------------
140 // Division with remainder result.
141 class DivModNode : public MultiNode {
142 protected:
143 DivModNode( Node *c, Node *dividend, Node *divisor );
144 public:
145 enum {
146 div_proj_num = 0, // quotient
147 mod_proj_num = 1 // remainder
148 };
149 virtual int Opcode() const;
150 virtual Node* Identity(PhaseGVN* phase) { return this; }
151 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) { return NULL; }
152 virtual const Type* Value(PhaseGVN* phase) const { return bottom_type(); }
153 virtual uint hash() const { return Node::hash(); }
154 virtual bool is_CFG() const { return false; }
155 virtual uint ideal_reg() const { return NotAMachineReg; }
156
157 ProjNode* div_proj() { return proj_out_or_null(div_proj_num); }
158 ProjNode* mod_proj() { return proj_out_or_null(mod_proj_num); }
159 };
160
161 //------------------------------DivModINode---------------------------------------
162 // Integer division with remainder result.
163 class DivModINode : public DivModNode {
164 public:
165 DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
166 virtual int Opcode() const;
167 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
168 virtual Node *match( const ProjNode *proj, const Matcher *m );
169
170 // Make a divmod and associated projections from a div or mod.
171 static DivModINode* make(Node* div_or_mod);
172 };
173
174 //------------------------------DivModLNode---------------------------------------
175 // Long division with remainder result.
176 class DivModLNode : public DivModNode {
177 public:
178 DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
|