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/_stubCodeGenerator.cpp.incl" 27 28 29 // Implementation of StubCodeDesc 30 31 StubCodeDesc* StubCodeDesc::_list = NULL; 32 int StubCodeDesc::_count = 0; 33 34 35 StubCodeDesc* StubCodeDesc::desc_for(address pc) { 36 StubCodeDesc* p = _list; 37 while (p != NULL && !p->contains(pc)) p = p->_next; 38 // p == NULL || p->contains(pc) 39 return p; 40 } 41 42 43 StubCodeDesc* StubCodeDesc::desc_for_index(int index) { 44 StubCodeDesc* p = _list; 45 while (p != NULL && p->index() != index) p = p->_next; 46 return p; | 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 "compiler/disassembler.hpp" 27 #include "oops/oop.inline.hpp" 28 #include "prims/forte.hpp" 29 #include "runtime/stubCodeGenerator.hpp" 30 #ifdef TARGET_ARCH_x86 31 # include "assembler_x86.inline.hpp" 32 #endif 33 #ifdef TARGET_ARCH_sparc 34 # include "assembler_sparc.inline.hpp" 35 #endif 36 #ifdef TARGET_ARCH_zero 37 # include "assembler_zero.inline.hpp" 38 #endif 39 40 41 // Implementation of StubCodeDesc 42 43 StubCodeDesc* StubCodeDesc::_list = NULL; 44 int StubCodeDesc::_count = 0; 45 46 47 StubCodeDesc* StubCodeDesc::desc_for(address pc) { 48 StubCodeDesc* p = _list; 49 while (p != NULL && !p->contains(pc)) p = p->_next; 50 // p == NULL || p->contains(pc) 51 return p; 52 } 53 54 55 StubCodeDesc* StubCodeDesc::desc_for_index(int index) { 56 StubCodeDesc* p = _list; 57 while (p != NULL && p->index() != index) p = p->_next; 58 return p; |