Mercurial > hg > truffle
comparison src/share/vm/opto/subnode.hpp @ 1396:d7f654633cfe
6946040: add intrinsic for short and char reverseBytes
Reviewed-by: never, twisti
Contributed-by: Hiroshi Yamauchi <yamauchi@google.com>
author | never |
---|---|
date | Mon, 26 Apr 2010 11:27:21 -0700 |
parents | d1605aabd0a1 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1385:bc32f286fae0 | 1396:d7f654633cfe |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1997-2010 Sun Microsystems, Inc. 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. |
507 ReverseBytesLNode(Node *c, Node *in1) : Node(c, in1) {} | 507 ReverseBytesLNode(Node *c, Node *in1) : Node(c, in1) {} |
508 virtual int Opcode() const; | 508 virtual int Opcode() const; |
509 const Type *bottom_type() const { return TypeLong::LONG; } | 509 const Type *bottom_type() const { return TypeLong::LONG; } |
510 virtual uint ideal_reg() const { return Op_RegL; } | 510 virtual uint ideal_reg() const { return Op_RegL; } |
511 }; | 511 }; |
512 | |
513 //-------------------------------ReverseBytesUSNode-------------------------------- | |
514 // reverse bytes of an unsigned short / char | |
515 class ReverseBytesUSNode : public Node { | |
516 public: | |
517 ReverseBytesUSNode(Node *c, Node *in1) : Node(c, in1) {} | |
518 virtual int Opcode() const; | |
519 const Type *bottom_type() const { return TypeInt::CHAR; } | |
520 virtual uint ideal_reg() const { return Op_RegI; } | |
521 }; | |
522 | |
523 //-------------------------------ReverseBytesSNode-------------------------------- | |
524 // reverse bytes of a short | |
525 class ReverseBytesSNode : public Node { | |
526 public: | |
527 ReverseBytesSNode(Node *c, Node *in1) : Node(c, in1) {} | |
528 virtual int Opcode() const; | |
529 const Type *bottom_type() const { return TypeInt::SHORT; } | |
530 virtual uint ideal_reg() const { return Op_RegI; } | |
531 }; |