< prev index next >

src/os_cpu/solaris_x86/vm/assembler_solaris_x86.cpp

Print this page




   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 "asm/macroAssembler.inline.hpp"
  27 #include "runtime/os.hpp"
  28 #include "runtime/threadLocalStorage.hpp"
  29 #include "runtime/thread.inline.hpp"
  30 
  31 void MacroAssembler::int3() {
  32   push(rax);
  33   push(rdx);
  34   push(rcx);
  35   call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint)));
  36   pop(rcx);
  37   pop(rdx);
  38   pop(rax);
  39 }
  40 
  41 // This is simply a call to ThreadLocalStorage::thread()
  42 void MacroAssembler::get_thread(Register thread) {
  43   if (thread != rax) {
  44     push(rax);
  45   }
  46   push(rdi);
  47   push(rsi);
  48   push(rdx);
  49   push(rcx);
  50   push(r8);
  51   push(r9);
  52   push(r10);
  53   push(r11);
  54 
  55   call(RuntimeAddress(CAST_FROM_FN_PTR(address, ThreadLocalStorage::thread)));
  56 
  57   pop(r11);
  58   pop(r10);
  59   pop(r9);
  60   pop(r8);
  61   pop(rcx);
  62   pop(rdx);
  63   pop(rsi);
  64   pop(rdi);
  65   if (thread != rax) {
  66     movl(thread, rax);
  67     pop(rax);
  68   }
  69 }


   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 "asm/macroAssembler.inline.hpp"
  27 #include "runtime/os.hpp"


  28 
  29 void MacroAssembler::int3() {
  30   push(rax);
  31   push(rdx);
  32   push(rcx);
  33   call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint)));
  34   pop(rcx);
  35   pop(rdx);
  36   pop(rax);






























  37 }
< prev index next >