src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp

Print this page




   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  *
  23  */
  24 
  25 #include "incls/_precompiled.incl"
  26 #include "incls/_c1_MacroAssembler_sparc.cpp.incl"










  27 
  28 void C1_MacroAssembler::inline_cache_check(Register receiver, Register iCache) {
  29   Label L;
  30   const Register temp_reg = G3_scratch;
  31   // Note: needs more testing of out-of-line vs. inline slow case
  32   verify_oop(receiver);
  33   ld_ptr(receiver, oopDesc::klass_offset_in_bytes(), temp_reg);
  34   cmp(temp_reg, iCache);
  35   brx(Assembler::equal, true, Assembler::pt, L);
  36   delayed()->nop();
  37   AddressLiteral ic_miss(SharedRuntime::get_ic_miss_stub());
  38   jump_to(ic_miss, temp_reg);
  39   delayed()->nop();
  40   align(CodeEntryAlignment);
  41   bind(L);
  42 }
  43 
  44 
  45 void C1_MacroAssembler::explicit_null_check(Register base) {
  46   Unimplemented();




   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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "c1/c1_MacroAssembler.hpp"
  27 #include "c1/c1_Runtime1.hpp"
  28 #include "classfile/systemDictionary.hpp"
  29 #include "gc_interface/collectedHeap.hpp"
  30 #include "interpreter/interpreter.hpp"
  31 #include "oops/arrayOop.hpp"
  32 #include "oops/markOop.hpp"
  33 #include "runtime/biasedLocking.hpp"
  34 #include "runtime/os.hpp"
  35 #include "runtime/stubRoutines.hpp"
  36 #include "runtime/synchronizer.hpp"
  37 
  38 void C1_MacroAssembler::inline_cache_check(Register receiver, Register iCache) {
  39   Label L;
  40   const Register temp_reg = G3_scratch;
  41   // Note: needs more testing of out-of-line vs. inline slow case
  42   verify_oop(receiver);
  43   ld_ptr(receiver, oopDesc::klass_offset_in_bytes(), temp_reg);
  44   cmp(temp_reg, iCache);
  45   brx(Assembler::equal, true, Assembler::pt, L);
  46   delayed()->nop();
  47   AddressLiteral ic_miss(SharedRuntime::get_ic_miss_stub());
  48   jump_to(ic_miss, temp_reg);
  49   delayed()->nop();
  50   align(CodeEntryAlignment);
  51   bind(L);
  52 }
  53 
  54 
  55 void C1_MacroAssembler::explicit_null_check(Register base) {
  56   Unimplemented();