256 virtual uint hash() const { return Node::hash(); }
257 virtual bool is_CFG() const { return false; }
258 virtual uint ideal_reg() const { return NotAMachineReg; }
259
260 static DivModNode* make(Node* div_or_mod, BasicType bt, bool is_unsigned);
261
262 ProjNode* div_proj() { return proj_out_or_null(div_proj_num); }
263 ProjNode* mod_proj() { return proj_out_or_null(mod_proj_num); }
264
265 private:
266 virtual bool depends_only_on_test() const { return false; }
267 };
268
269 //------------------------------DivModINode---------------------------------------
270 // Integer division with remainder result.
271 class DivModINode : public DivModNode {
272 public:
273 DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
274 virtual int Opcode() const;
275 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
276 virtual Node *match( const ProjNode *proj, const Matcher *m );
277
278 // Make a divmod and associated projections from a div or mod.
279 static DivModINode* make(Node* div_or_mod);
280 };
281
282 //------------------------------DivModLNode---------------------------------------
283 // Long division with remainder result.
284 class DivModLNode : public DivModNode {
285 public:
286 DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
287 virtual int Opcode() const;
288 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
289 virtual Node *match( const ProjNode *proj, const Matcher *m );
290
291 // Make a divmod and associated projections from a div or mod.
292 static DivModLNode* make(Node* div_or_mod);
293 };
294
295
296 //------------------------------UDivModINode---------------------------------------
297 // Unsigend integer division with remainder result.
298 class UDivModINode : public DivModNode {
299 public:
300 UDivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
301 virtual int Opcode() const;
302 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
303 virtual Node *match( const ProjNode *proj, const Matcher *m );
304
305 // Make a divmod and associated projections from a div or mod.
306 static UDivModINode* make(Node* div_or_mod);
307 };
308
309 //------------------------------UDivModLNode---------------------------------------
310 // Unsigned long division with remainder result.
311 class UDivModLNode : public DivModNode {
312 public:
313 UDivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
314 virtual int Opcode() const;
315 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
316 virtual Node *match( const ProjNode *proj, const Matcher *m );
317
318 // Make a divmod and associated projections from a div or mod.
319 static UDivModLNode* make(Node* div_or_mod);
320 };
321
322 #endif // SHARE_OPTO_DIVNODE_HPP
|
256 virtual uint hash() const { return Node::hash(); }
257 virtual bool is_CFG() const { return false; }
258 virtual uint ideal_reg() const { return NotAMachineReg; }
259
260 static DivModNode* make(Node* div_or_mod, BasicType bt, bool is_unsigned);
261
262 ProjNode* div_proj() { return proj_out_or_null(div_proj_num); }
263 ProjNode* mod_proj() { return proj_out_or_null(mod_proj_num); }
264
265 private:
266 virtual bool depends_only_on_test() const { return false; }
267 };
268
269 //------------------------------DivModINode---------------------------------------
270 // Integer division with remainder result.
271 class DivModINode : public DivModNode {
272 public:
273 DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
274 virtual int Opcode() const;
275 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
276 virtual Node *match(const ProjNode *proj, const Matcher *m, const RegMask* mask);
277
278 // Make a divmod and associated projections from a div or mod.
279 static DivModINode* make(Node* div_or_mod);
280 };
281
282 //------------------------------DivModLNode---------------------------------------
283 // Long division with remainder result.
284 class DivModLNode : public DivModNode {
285 public:
286 DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
287 virtual int Opcode() const;
288 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
289 virtual Node *match(const ProjNode *proj, const Matcher *m, const RegMask* mask);
290
291 // Make a divmod and associated projections from a div or mod.
292 static DivModLNode* make(Node* div_or_mod);
293 };
294
295
296 //------------------------------UDivModINode---------------------------------------
297 // Unsigend integer division with remainder result.
298 class UDivModINode : public DivModNode {
299 public:
300 UDivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
301 virtual int Opcode() const;
302 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
303 virtual Node* match(const ProjNode* proj, const Matcher* m, const RegMask* mask);
304
305 // Make a divmod and associated projections from a div or mod.
306 static UDivModINode* make(Node* div_or_mod);
307 };
308
309 //------------------------------UDivModLNode---------------------------------------
310 // Unsigned long division with remainder result.
311 class UDivModLNode : public DivModNode {
312 public:
313 UDivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
314 virtual int Opcode() const;
315 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
316 virtual Node* match(const ProjNode* proj, const Matcher* m, const RegMask* mask);
317
318 // Make a divmod and associated projections from a div or mod.
319 static UDivModLNode* make(Node* div_or_mod);
320 };
321
322 #endif // SHARE_OPTO_DIVNODE_HPP
|