< prev index next >

src/hotspot/cpu/s390/macroAssembler_s390.hpp

Print this page


   1 /*
   2  * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2016, 2019, SAP SE. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


 696   // The rest of the type check; must be wired to a corresponding fast path.
 697   // It does not repeat the fast path logic, so don't use it standalone.
 698   // The temp_reg can be noreg, if no temps are available.
 699   // It can also be sub_klass or super_klass, meaning it's OK to kill that one.
 700   // Updates the sub's secondary super cache as necessary.
 701   void check_klass_subtype_slow_path(Register Rsubklass,
 702                                      Register Rsuperklas,
 703                                      Register Rarray_ptr, // tmp
 704                                      Register Rlength,    // tmp
 705                                      Label* L_success,
 706                                      Label* L_failure);
 707 
 708   // Simplified, combined version, good for typical uses.
 709   // Falls through on failure.
 710   void check_klass_subtype(Register sub_klass,
 711                            Register super_klass,
 712                            Register temp1_reg,
 713                            Register temp2_reg,
 714                            Label&   L_success);
 715 
 716   void clinit_barrier(Register klass,
 717                       Register thread,
 718                       Label* L_fast_path = NULL,
 719                       Label* L_slow_path = NULL);
 720 
 721   // Increment a counter at counter_address when the eq condition code is set.
 722   // Kills registers tmp1_reg and tmp2_reg and preserves the condition code.
 723   void increment_counter_eq(address counter_address, Register tmp1_reg, Register tmp2_reg);
 724   // Biased locking support
 725   // Upon entry,obj_reg must contain the target object, and mark_reg
 726   // must contain the target object's header.
 727   // Destroys mark_reg if an attempt is made to bias an anonymously
 728   // biased lock. In this case a failure will go either to the slow
 729   // case or fall through with the notEqual condition code set with
 730   // the expectation that the slow case in the runtime will be called.
 731   // In the fall-through case where the CAS-based lock is done,
 732   // mark_reg is not destroyed.
 733   void biased_locking_enter(Register obj_reg, Register mark_reg, Register temp_reg,
 734                             Register temp2_reg, Label& done, Label* slow_case = NULL);
 735   // Upon entry, the base register of mark_addr must contain the oop.
 736   // Destroys temp_reg.
 737   // If allow_delay_slot_filling is set to true, the next instruction
 738   // emitted after this one will go in an annulled delay slot if the
 739   // biased locking exit case failed.
 740   void biased_locking_exit(Register mark_addr, Register temp_reg, Label& done);


 811                        Register tmp1, Register tmp2, Register tmp3);
 812   void access_load_at(BasicType type, DecoratorSet decorators,
 813                       const Address& addr, Register dst,
 814                       Register tmp1, Register tmp2, Label *is_null = NULL);
 815 
 816  public:
 817   // tmp1 and tmp2 are used with decorators ON_PHANTOM_OOP_REF or ON_WEAK_OOP_REF.
 818   void load_heap_oop(Register dest, const Address &a,
 819                      Register tmp1, Register tmp2,
 820                      DecoratorSet decorators = 0, Label *is_null = NULL);
 821   void store_heap_oop(Register Roop, const Address &a,
 822                       Register tmp1, Register tmp2, Register tmp3,
 823                       DecoratorSet decorators = 0);
 824 
 825   void oop_encoder(Register Rdst, Register Rsrc, bool maybeNULL,
 826                    Register Rbase = Z_R1, int pow2_offset = -1, bool only32bitValid = false);
 827   void oop_decoder(Register Rdst, Register Rsrc, bool maybeNULL,
 828                    Register Rbase = Z_R1, int pow2_offset = -1);
 829 
 830   void resolve_oop_handle(Register result);
 831   void load_mirror_from_const_method(Register mirror, Register const_method);
 832   void load_method_holder(Register holder, Register method);
 833 
 834   //--------------------------
 835   //---  Operations on arrays.
 836   //--------------------------
 837   unsigned int Clear_Array(Register cnt_arg, Register base_pointer_arg, Register odd_tmp_reg);
 838   unsigned int Clear_Array_Const(long cnt, Register base);
 839   unsigned int Clear_Array_Const_Big(long cnt, Register base_pointer_arg, Register odd_tmp_reg);
 840   unsigned int CopyRawMemory_AlignedDisjoint(Register src_reg, Register dst_reg,
 841                                              Register cnt_reg,
 842                                              Register tmp1_reg, Register tmp2_reg);
 843 
 844   //-------------------------------------------
 845   // Special String Intrinsics Implementation.
 846   //-------------------------------------------
 847   // Intrinsics for CompactStrings
 848   //   Restores: src, dst
 849   //   Uses:     cnt
 850   //   Kills:    tmp, Z_R0, Z_R1.
 851   //   Early clobber: result.
 852   //   Boolean precise controls accuracy of result value.


   1 /*
   2  * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2016, 2018, SAP SE. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


 696   // The rest of the type check; must be wired to a corresponding fast path.
 697   // It does not repeat the fast path logic, so don't use it standalone.
 698   // The temp_reg can be noreg, if no temps are available.
 699   // It can also be sub_klass or super_klass, meaning it's OK to kill that one.
 700   // Updates the sub's secondary super cache as necessary.
 701   void check_klass_subtype_slow_path(Register Rsubklass,
 702                                      Register Rsuperklas,
 703                                      Register Rarray_ptr, // tmp
 704                                      Register Rlength,    // tmp
 705                                      Label* L_success,
 706                                      Label* L_failure);
 707 
 708   // Simplified, combined version, good for typical uses.
 709   // Falls through on failure.
 710   void check_klass_subtype(Register sub_klass,
 711                            Register super_klass,
 712                            Register temp1_reg,
 713                            Register temp2_reg,
 714                            Label&   L_success);
 715 





 716   // Increment a counter at counter_address when the eq condition code is set.
 717   // Kills registers tmp1_reg and tmp2_reg and preserves the condition code.
 718   void increment_counter_eq(address counter_address, Register tmp1_reg, Register tmp2_reg);
 719   // Biased locking support
 720   // Upon entry,obj_reg must contain the target object, and mark_reg
 721   // must contain the target object's header.
 722   // Destroys mark_reg if an attempt is made to bias an anonymously
 723   // biased lock. In this case a failure will go either to the slow
 724   // case or fall through with the notEqual condition code set with
 725   // the expectation that the slow case in the runtime will be called.
 726   // In the fall-through case where the CAS-based lock is done,
 727   // mark_reg is not destroyed.
 728   void biased_locking_enter(Register obj_reg, Register mark_reg, Register temp_reg,
 729                             Register temp2_reg, Label& done, Label* slow_case = NULL);
 730   // Upon entry, the base register of mark_addr must contain the oop.
 731   // Destroys temp_reg.
 732   // If allow_delay_slot_filling is set to true, the next instruction
 733   // emitted after this one will go in an annulled delay slot if the
 734   // biased locking exit case failed.
 735   void biased_locking_exit(Register mark_addr, Register temp_reg, Label& done);


 806                        Register tmp1, Register tmp2, Register tmp3);
 807   void access_load_at(BasicType type, DecoratorSet decorators,
 808                       const Address& addr, Register dst,
 809                       Register tmp1, Register tmp2, Label *is_null = NULL);
 810 
 811  public:
 812   // tmp1 and tmp2 are used with decorators ON_PHANTOM_OOP_REF or ON_WEAK_OOP_REF.
 813   void load_heap_oop(Register dest, const Address &a,
 814                      Register tmp1, Register tmp2,
 815                      DecoratorSet decorators = 0, Label *is_null = NULL);
 816   void store_heap_oop(Register Roop, const Address &a,
 817                       Register tmp1, Register tmp2, Register tmp3,
 818                       DecoratorSet decorators = 0);
 819 
 820   void oop_encoder(Register Rdst, Register Rsrc, bool maybeNULL,
 821                    Register Rbase = Z_R1, int pow2_offset = -1, bool only32bitValid = false);
 822   void oop_decoder(Register Rdst, Register Rsrc, bool maybeNULL,
 823                    Register Rbase = Z_R1, int pow2_offset = -1);
 824 
 825   void resolve_oop_handle(Register result);
 826   void load_mirror(Register mirror, Register method);

 827 
 828   //--------------------------
 829   //---  Operations on arrays.
 830   //--------------------------
 831   unsigned int Clear_Array(Register cnt_arg, Register base_pointer_arg, Register odd_tmp_reg);
 832   unsigned int Clear_Array_Const(long cnt, Register base);
 833   unsigned int Clear_Array_Const_Big(long cnt, Register base_pointer_arg, Register odd_tmp_reg);
 834   unsigned int CopyRawMemory_AlignedDisjoint(Register src_reg, Register dst_reg,
 835                                              Register cnt_reg,
 836                                              Register tmp1_reg, Register tmp2_reg);
 837 
 838   //-------------------------------------------
 839   // Special String Intrinsics Implementation.
 840   //-------------------------------------------
 841   // Intrinsics for CompactStrings
 842   //   Restores: src, dst
 843   //   Uses:     cnt
 844   //   Kills:    tmp, Z_R0, Z_R1.
 845   //   Early clobber: result.
 846   //   Boolean precise controls accuracy of result value.


< prev index next >