< prev index next >

src/share/vm/c1/c1_LIRGenerator.hpp

Print this page


   1 /*
   2  * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   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  *


 260   LIR_Opr call_runtime(Value arg1, address entry, ValueType* result_type, CodeEmitInfo* info);
 261   LIR_Opr call_runtime(Value arg1, Value arg2, address entry, ValueType* result_type, CodeEmitInfo* info);
 262 
 263   // GC Barriers
 264 
 265   // generic interface
 266 
 267   void pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val, bool do_load, bool patch, CodeEmitInfo* info);
 268   void post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val);
 269 
 270   // specific implementations
 271   // pre barriers
 272 
 273   void G1SATBCardTableModRef_pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
 274                                          bool do_load, bool patch, CodeEmitInfo* info);
 275 
 276   // post barriers
 277 
 278   void G1SATBCardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val);
 279   void CardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val);



 280 
 281 
 282   static LIR_Opr result_register_for(ValueType* type, bool callee = false);
 283 
 284   ciObject* get_jobject_constant(Value value);
 285 
 286   LIRItemList* invoke_visit_arguments(Invoke* x);
 287   void invoke_load_arguments(Invoke* x, LIRItemList* args, const LIR_OprList* arg_list);
 288 
 289   void trace_block_entry(BlockBegin* block);
 290 
 291   // volatile field operations are never patchable because a klass
 292   // must be loaded to know it's volatile which means that the offset
 293   // it always known as well.
 294   void volatile_field_store(LIR_Opr value, LIR_Address* address, CodeEmitInfo* info);
 295   void volatile_field_load(LIR_Address* address, LIR_Opr result, CodeEmitInfo* info);
 296 
 297   void put_Object_unsafe(LIR_Opr src, LIR_Opr offset, LIR_Opr data, BasicType type, bool is_volatile);
 298   void get_Object_unsafe(LIR_Opr dest, LIR_Opr src, LIR_Opr offset, BasicType type, bool is_volatile);
 299 


 532   virtual void do_Throw          (Throw*           x);
 533   virtual void do_Base           (Base*            x);
 534   virtual void do_OsrEntry       (OsrEntry*        x);
 535   virtual void do_ExceptionObject(ExceptionObject* x);
 536   virtual void do_RoundFP        (RoundFP*         x);
 537   virtual void do_UnsafeGetRaw   (UnsafeGetRaw*    x);
 538   virtual void do_UnsafePutRaw   (UnsafePutRaw*    x);
 539   virtual void do_UnsafeGetObject(UnsafeGetObject* x);
 540   virtual void do_UnsafePutObject(UnsafePutObject* x);
 541   virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x);
 542   virtual void do_UnsafePrefetchRead (UnsafePrefetchRead*  x);
 543   virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
 544   virtual void do_ProfileCall    (ProfileCall*     x);
 545   virtual void do_ProfileReturnType (ProfileReturnType* x);
 546   virtual void do_ProfileInvoke  (ProfileInvoke*   x);
 547   virtual void do_RuntimeCall    (RuntimeCall*     x);
 548   virtual void do_MemBar         (MemBar*          x);
 549   virtual void do_RangeCheckPredicate(RangeCheckPredicate* x);
 550 #ifdef ASSERT
 551   virtual void do_Assert         (Assert*          x);




 552 #endif
 553 };
 554 
 555 
 556 class LIRItem: public CompilationResourceObj {
 557  private:
 558   Value         _value;
 559   LIRGenerator* _gen;
 560   LIR_Opr       _result;
 561   bool          _destroys_register;
 562   LIR_Opr       _new_result;
 563 
 564   LIRGenerator* gen() const { return _gen; }
 565 
 566  public:
 567   LIRItem(Value value, LIRGenerator* gen) {
 568     _destroys_register = false;
 569     _gen = gen;
 570     set_instruction(value);
 571   }


   1 /*
   2  * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   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  *


 260   LIR_Opr call_runtime(Value arg1, address entry, ValueType* result_type, CodeEmitInfo* info);
 261   LIR_Opr call_runtime(Value arg1, Value arg2, address entry, ValueType* result_type, CodeEmitInfo* info);
 262 
 263   // GC Barriers
 264 
 265   // generic interface
 266 
 267   void pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val, bool do_load, bool patch, CodeEmitInfo* info);
 268   void post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val);
 269 
 270   // specific implementations
 271   // pre barriers
 272 
 273   void G1SATBCardTableModRef_pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
 274                                          bool do_load, bool patch, CodeEmitInfo* info);
 275 
 276   // post barriers
 277 
 278   void G1SATBCardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val);
 279   void CardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val);
 280 #ifdef CARDTABLEMODREF_POST_BARRIER_HELPER
 281   void CardTableModRef_post_barrier_helper(LIR_OprDesc* addr, LIR_Const* card_table_base);
 282 #endif
 283 
 284 
 285   static LIR_Opr result_register_for(ValueType* type, bool callee = false);
 286 
 287   ciObject* get_jobject_constant(Value value);
 288 
 289   LIRItemList* invoke_visit_arguments(Invoke* x);
 290   void invoke_load_arguments(Invoke* x, LIRItemList* args, const LIR_OprList* arg_list);
 291 
 292   void trace_block_entry(BlockBegin* block);
 293 
 294   // volatile field operations are never patchable because a klass
 295   // must be loaded to know it's volatile which means that the offset
 296   // it always known as well.
 297   void volatile_field_store(LIR_Opr value, LIR_Address* address, CodeEmitInfo* info);
 298   void volatile_field_load(LIR_Address* address, LIR_Opr result, CodeEmitInfo* info);
 299 
 300   void put_Object_unsafe(LIR_Opr src, LIR_Opr offset, LIR_Opr data, BasicType type, bool is_volatile);
 301   void get_Object_unsafe(LIR_Opr dest, LIR_Opr src, LIR_Opr offset, BasicType type, bool is_volatile);
 302 


 535   virtual void do_Throw          (Throw*           x);
 536   virtual void do_Base           (Base*            x);
 537   virtual void do_OsrEntry       (OsrEntry*        x);
 538   virtual void do_ExceptionObject(ExceptionObject* x);
 539   virtual void do_RoundFP        (RoundFP*         x);
 540   virtual void do_UnsafeGetRaw   (UnsafeGetRaw*    x);
 541   virtual void do_UnsafePutRaw   (UnsafePutRaw*    x);
 542   virtual void do_UnsafeGetObject(UnsafeGetObject* x);
 543   virtual void do_UnsafePutObject(UnsafePutObject* x);
 544   virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x);
 545   virtual void do_UnsafePrefetchRead (UnsafePrefetchRead*  x);
 546   virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
 547   virtual void do_ProfileCall    (ProfileCall*     x);
 548   virtual void do_ProfileReturnType (ProfileReturnType* x);
 549   virtual void do_ProfileInvoke  (ProfileInvoke*   x);
 550   virtual void do_RuntimeCall    (RuntimeCall*     x);
 551   virtual void do_MemBar         (MemBar*          x);
 552   virtual void do_RangeCheckPredicate(RangeCheckPredicate* x);
 553 #ifdef ASSERT
 554   virtual void do_Assert         (Assert*          x);
 555 #endif
 556 
 557 #ifdef C1_LIRGENERATOR_MD_HPP
 558 #include C1_LIRGENERATOR_MD_HPP
 559 #endif
 560 };
 561 
 562 
 563 class LIRItem: public CompilationResourceObj {
 564  private:
 565   Value         _value;
 566   LIRGenerator* _gen;
 567   LIR_Opr       _result;
 568   bool          _destroys_register;
 569   LIR_Opr       _new_result;
 570 
 571   LIRGenerator* gen() const { return _gen; }
 572 
 573  public:
 574   LIRItem(Value value, LIRGenerator* gen) {
 575     _destroys_register = false;
 576     _gen = gen;
 577     set_instruction(value);
 578   }


< prev index next >