< prev index next >

src/share/vm/opto/machnode.cpp

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc_interface/collectedHeap.hpp"
  27 #include "opto/machnode.hpp"
  28 #include "opto/regalloc.hpp"



  29 
  30 //=============================================================================
  31 // Return the value requested
  32 // result register lookup, corresponding to int_format
  33 int MachOper::reg(PhaseRegAlloc *ra_, const Node *node) const {
  34   return (int)ra_->get_encode(node);
  35 }
  36 // input register lookup, corresponding to ext_format
  37 int MachOper::reg(PhaseRegAlloc *ra_, const Node *node, int idx) const {
  38   return (int)(ra_->get_encode(node->in(idx)));
  39 }
  40 intptr_t  MachOper::constant() const { return 0x00; }
  41 relocInfo::relocType MachOper::constant_reloc() const { return relocInfo::none; }
  42 jdouble MachOper::constantD() const { ShouldNotReachHere(); return 0.0; }
  43 jfloat  MachOper::constantF() const { ShouldNotReachHere(); return 0.0; }
  44 jlong   MachOper::constantL() const { ShouldNotReachHere(); return CONST64(0) ; }
  45 TypeOopPtr *MachOper::oop() const { return NULL; }
  46 int MachOper::ccode() const { return 0x00; }
  47 // A zero, default, indicates this value is not needed.
  48 // May need to lookup the base register, as done in int_ and ext_format


 766 //=============================================================================
 767 uint MachCallRuntimeNode::size_of() const { return sizeof(*this); }
 768 uint MachCallRuntimeNode::cmp( const Node &n ) const {
 769   MachCallRuntimeNode &call = (MachCallRuntimeNode&)n;
 770   return MachCallNode::cmp(call) && !strcmp(_name,call._name);
 771 }
 772 #ifndef PRODUCT
 773 void MachCallRuntimeNode::dump_spec(outputStream *st) const {
 774   st->print("%s ",_name);
 775   MachCallNode::dump_spec(st);
 776 }
 777 #endif
 778 //=============================================================================
 779 // A shared JVMState for all HaltNodes.  Indicates the start of debug info
 780 // is at TypeFunc::Parms.  Only required for SOE register spill handling -
 781 // to indicate where the stack-slot-only debug info inputs begin.
 782 // There is no other JVM state needed here.
 783 JVMState jvms_for_throw(0);
 784 JVMState *MachHaltNode::jvms() const {
 785   return &jvms_for_throw;






 786 }
 787 
 788 //=============================================================================
 789 #ifndef PRODUCT
 790 void labelOper::int_format(PhaseRegAlloc *ra, const MachNode *node, outputStream *st) const {
 791   st->print("B%d", _block_num);
 792 }
 793 #endif // PRODUCT
 794 
 795 //=============================================================================
 796 #ifndef PRODUCT
 797 void methodOper::int_format(PhaseRegAlloc *ra, const MachNode *node, outputStream *st) const {
 798   st->print(INTPTR_FORMAT, _method);
 799 }
 800 #endif // PRODUCT


   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc_interface/collectedHeap.hpp"
  27 #include "opto/machnode.hpp"
  28 #include "opto/regalloc.hpp"
  29 #if INCLUDE_ALL_GCS
  30 #include "gc_implementation/shenandoah/c2/shenandoahSupport.hpp"
  31 #endif
  32 
  33 //=============================================================================
  34 // Return the value requested
  35 // result register lookup, corresponding to int_format
  36 int MachOper::reg(PhaseRegAlloc *ra_, const Node *node) const {
  37   return (int)ra_->get_encode(node);
  38 }
  39 // input register lookup, corresponding to ext_format
  40 int MachOper::reg(PhaseRegAlloc *ra_, const Node *node, int idx) const {
  41   return (int)(ra_->get_encode(node->in(idx)));
  42 }
  43 intptr_t  MachOper::constant() const { return 0x00; }
  44 relocInfo::relocType MachOper::constant_reloc() const { return relocInfo::none; }
  45 jdouble MachOper::constantD() const { ShouldNotReachHere(); return 0.0; }
  46 jfloat  MachOper::constantF() const { ShouldNotReachHere(); return 0.0; }
  47 jlong   MachOper::constantL() const { ShouldNotReachHere(); return CONST64(0) ; }
  48 TypeOopPtr *MachOper::oop() const { return NULL; }
  49 int MachOper::ccode() const { return 0x00; }
  50 // A zero, default, indicates this value is not needed.
  51 // May need to lookup the base register, as done in int_ and ext_format


 769 //=============================================================================
 770 uint MachCallRuntimeNode::size_of() const { return sizeof(*this); }
 771 uint MachCallRuntimeNode::cmp( const Node &n ) const {
 772   MachCallRuntimeNode &call = (MachCallRuntimeNode&)n;
 773   return MachCallNode::cmp(call) && !strcmp(_name,call._name);
 774 }
 775 #ifndef PRODUCT
 776 void MachCallRuntimeNode::dump_spec(outputStream *st) const {
 777   st->print("%s ",_name);
 778   MachCallNode::dump_spec(st);
 779 }
 780 #endif
 781 //=============================================================================
 782 // A shared JVMState for all HaltNodes.  Indicates the start of debug info
 783 // is at TypeFunc::Parms.  Only required for SOE register spill handling -
 784 // to indicate where the stack-slot-only debug info inputs begin.
 785 // There is no other JVM state needed here.
 786 JVMState jvms_for_throw(0);
 787 JVMState *MachHaltNode::jvms() const {
 788   return &jvms_for_throw;
 789 }
 790 
 791 uint MachMemBarNode::size_of() const { return sizeof(*this); }
 792 
 793 const TypePtr *MachMemBarNode::adr_type() const {
 794   return _adr_type;
 795 }
 796 
 797 //=============================================================================
 798 #ifndef PRODUCT
 799 void labelOper::int_format(PhaseRegAlloc *ra, const MachNode *node, outputStream *st) const {
 800   st->print("B%d", _block_num);
 801 }
 802 #endif // PRODUCT
 803 
 804 //=============================================================================
 805 #ifndef PRODUCT
 806 void methodOper::int_format(PhaseRegAlloc *ra, const MachNode *node, outputStream *st) const {
 807   st->print(INTPTR_FORMAT, _method);
 808 }
 809 #endif // PRODUCT
< prev index next >