1 /* 2 * Copyright (c) 1998, 2009, 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 "incls/_precompiled.incl" 26 # include "incls/_relocInfo_sparc.cpp.incl" 27 28 void Relocation::pd_set_data_value(address x, intptr_t o) { 29 NativeInstruction* ip = nativeInstruction_at(addr()); 30 jint inst = ip->long_at(0); 31 assert(inst != NativeInstruction::illegal_instruction(), "no breakpoint"); 32 switch (Assembler::inv_op(inst)) { 33 34 case Assembler::ldst_op: 35 #ifdef ASSERT 36 switch (Assembler::inv_op3(inst)) { 37 case Assembler::lduw_op3: 38 case Assembler::ldub_op3: 39 case Assembler::lduh_op3: 40 case Assembler::ldd_op3: 41 case Assembler::ldsw_op3: 42 case Assembler::ldsb_op3: 43 case Assembler::ldsh_op3: 44 case Assembler::ldx_op3: 45 case Assembler::ldf_op3: 46 case Assembler::lddf_op3: | 1 /* 2 * Copyright (c) 1998, 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 "asm/assembler.inline.hpp" 27 #include "assembler_sparc.inline.hpp" 28 #include "code/relocInfo.hpp" 29 #include "nativeInst_sparc.hpp" 30 #include "oops/oop.inline.hpp" 31 #include "runtime/safepoint.hpp" 32 33 void Relocation::pd_set_data_value(address x, intptr_t o) { 34 NativeInstruction* ip = nativeInstruction_at(addr()); 35 jint inst = ip->long_at(0); 36 assert(inst != NativeInstruction::illegal_instruction(), "no breakpoint"); 37 switch (Assembler::inv_op(inst)) { 38 39 case Assembler::ldst_op: 40 #ifdef ASSERT 41 switch (Assembler::inv_op3(inst)) { 42 case Assembler::lduw_op3: 43 case Assembler::ldub_op3: 44 case Assembler::lduh_op3: 45 case Assembler::ldd_op3: 46 case Assembler::ldsw_op3: 47 case Assembler::ldsb_op3: 48 case Assembler::ldsh_op3: 49 case Assembler::ldx_op3: 50 case Assembler::ldf_op3: 51 case Assembler::lddf_op3: |