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