src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp

Print this page


   1 /*
   2  * Copyright (c) 1999, 2008, 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  *
  23  */
  24 
  25 // do not include  precompiled  header file




































  26 
  27 #include "incls/_os_linux_sparc.cpp.incl"
  28 
  29 // Linux/Sparc has rather obscure naming of registers in sigcontext
  30 // different between 32 and 64 bits
  31 #ifdef _LP64
  32 #define SIG_PC(x) ((x)->sigc_regs.tpc)
  33 #define SIG_NPC(x) ((x)->sigc_regs.tnpc)
  34 #define SIG_REGS(x) ((x)->sigc_regs)
  35 #else
  36 #define SIG_PC(x) ((x)->si_regs.pc)
  37 #define SIG_NPC(x) ((x)->si_regs.npc)
  38 #define SIG_REGS(x) ((x)->si_regs)
  39 #endif
  40 
  41 // those are to reference registers in sigcontext
  42 enum {
  43   CON_G0 = 0,
  44   CON_G1,
  45   CON_G2,
  46   CON_G3,
  47   CON_G4,


   1 /*
   2  * Copyright (c) 1999, 2010, 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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "assembler_sparc.inline.hpp"
  27 #include "classfile/classLoader.hpp"
  28 #include "classfile/systemDictionary.hpp"
  29 #include "classfile/vmSymbols.hpp"
  30 #include "code/icBuffer.hpp"
  31 #include "code/vtableStubs.hpp"
  32 #include "interpreter/interpreter.hpp"
  33 #include "jvm_linux.h"
  34 #include "memory/allocation.inline.hpp"
  35 #include "mutex_linux.inline.hpp"
  36 #include "nativeInst_sparc.hpp"
  37 #include "os_share_linux.hpp"
  38 #include "prims/jniFastGetField.hpp"
  39 #include "prims/jvm.h"
  40 #include "prims/jvm_misc.hpp"
  41 #include "runtime/arguments.hpp"
  42 #include "runtime/extendedPC.hpp"
  43 #include "runtime/frame.inline.hpp"
  44 #include "runtime/hpi.hpp"
  45 #include "runtime/interfaceSupport.hpp"
  46 #include "runtime/java.hpp"
  47 #include "runtime/javaCalls.hpp"
  48 #include "runtime/mutexLocker.hpp"
  49 #include "runtime/osThread.hpp"
  50 #include "runtime/sharedRuntime.hpp"
  51 #include "runtime/stubRoutines.hpp"
  52 #include "runtime/timer.hpp"
  53 #include "thread_linux.inline.hpp"
  54 #include "utilities/events.hpp"
  55 #include "utilities/vmError.hpp"
  56 #ifdef COMPILER1
  57 #include "c1/c1_Runtime1.hpp"
  58 #endif
  59 #ifdef COMPILER2
  60 #include "opto/runtime.hpp"
  61 #endif
  62 
  63 // do not include  precompiled  header file
  64 
  65 // Linux/Sparc has rather obscure naming of registers in sigcontext
  66 // different between 32 and 64 bits
  67 #ifdef _LP64
  68 #define SIG_PC(x) ((x)->sigc_regs.tpc)
  69 #define SIG_NPC(x) ((x)->sigc_regs.tnpc)
  70 #define SIG_REGS(x) ((x)->sigc_regs)
  71 #else
  72 #define SIG_PC(x) ((x)->si_regs.pc)
  73 #define SIG_NPC(x) ((x)->si_regs.npc)
  74 #define SIG_REGS(x) ((x)->si_regs)
  75 #endif
  76 
  77 // those are to reference registers in sigcontext
  78 enum {
  79   CON_G0 = 0,
  80   CON_G1,
  81   CON_G2,
  82   CON_G3,
  83   CON_G4,