src/cpu/x86/vm/macroAssembler_x86.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 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  *


 623 
 624   void untested()                                { stop("untested"); }
 625 
 626   void unimplemented(const char* what = "")      { char* b = new char[1024];  jio_snprintf(b, 1024, "unimplemented: %s", what);  stop(b); }
 627 
 628   void should_not_reach_here()                   { stop("should not reach here"); }
 629 
 630   void print_CPU_state();
 631 
 632   // Stack overflow checking
 633   void bang_stack_with_offset(int offset) {
 634     // stack grows down, caller passes positive offset
 635     assert(offset > 0, "must bang with negative offset");
 636     movl(Address(rsp, (-offset)), rax);
 637   }
 638 
 639   // Writes to stack successive pages until offset reached to check for
 640   // stack overflow + shadow pages.  Also, clobbers tmp
 641   void bang_stack_size(Register size, Register tmp);
 642 



 643   virtual RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr,
 644                                                 Register tmp,
 645                                                 int offset);
 646 
 647   // Support for serializing memory accesses between threads
 648   void serialize_memory(Register thread, Register tmp);
 649 
 650   void verify_tlab();
 651 
 652   // Biased locking support
 653   // lock_reg and obj_reg must be loaded up with the appropriate values.
 654   // swap_reg must be rax, and is killed.
 655   // tmp_reg is optional. If it is supplied (i.e., != noreg) it will
 656   // be killed; if not supplied, push/pop will be used internally to
 657   // allocate a temporary (inefficient, avoid if possible).
 658   // Optional slow case is for implementations (interpreter and C1) which branch to
 659   // slow case directly. Leaves condition codes set for C2's Fast_Lock node.
 660   // Returns offset of first potentially-faulting instruction for null
 661   // check info (currently consumed only by C1). If
 662   // swap_reg_contains_mark is true then returns -1 as it is assumed


   1 /*
   2  * Copyright (c) 1997, 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  *


 623 
 624   void untested()                                { stop("untested"); }
 625 
 626   void unimplemented(const char* what = "")      { char* b = new char[1024];  jio_snprintf(b, 1024, "unimplemented: %s", what);  stop(b); }
 627 
 628   void should_not_reach_here()                   { stop("should not reach here"); }
 629 
 630   void print_CPU_state();
 631 
 632   // Stack overflow checking
 633   void bang_stack_with_offset(int offset) {
 634     // stack grows down, caller passes positive offset
 635     assert(offset > 0, "must bang with negative offset");
 636     movl(Address(rsp, (-offset)), rax);
 637   }
 638 
 639   // Writes to stack successive pages until offset reached to check for
 640   // stack overflow + shadow pages.  Also, clobbers tmp
 641   void bang_stack_size(Register size, Register tmp);
 642 
 643   // Check for reserved stack access in method being exited (for JIT compilers)
 644   void reserved_stack_check();
 645   
 646   virtual RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr,
 647                                                 Register tmp,
 648                                                 int offset);
 649 
 650   // Support for serializing memory accesses between threads
 651   void serialize_memory(Register thread, Register tmp);
 652 
 653   void verify_tlab();
 654 
 655   // Biased locking support
 656   // lock_reg and obj_reg must be loaded up with the appropriate values.
 657   // swap_reg must be rax, and is killed.
 658   // tmp_reg is optional. If it is supplied (i.e., != noreg) it will
 659   // be killed; if not supplied, push/pop will be used internally to
 660   // allocate a temporary (inefficient, avoid if possible).
 661   // Optional slow case is for implementations (interpreter and C1) which branch to
 662   // slow case directly. Leaves condition codes set for C2's Fast_Lock node.
 663   // Returns offset of first potentially-faulting instruction for null
 664   // check info (currently consumed only by C1). If
 665   // swap_reg_contains_mark is true then returns -1 as it is assumed