/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "assembler_sparc.inline.hpp"
#include "code/relocInfo.hpp"
#include "nativeInst_sparc.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/safepoint.hpp"
#ifdef ASSERT
break;
default:
}
goto do_non_sethi;
#endif
#ifdef ASSERT
break;
default:
}
#endif
{
if (verify_only) {
} else {
}
}
break;
{
#ifdef _LP64
if (format() != 0) {
if (verify_only) {
} else {
}
if (verify_only) {
assert(ip->long_at(NativeInstruction::nop_instruction_size) == NativeInstruction::set_data32_simm13( inst2, (intptr_t)np),
"instructions must match");
} else {
ip->set_long_at(NativeInstruction::nop_instruction_size, NativeInstruction::set_data32_simm13( inst2, (intptr_t)np));
}
break;
}
if (verify_only) {
} else {
}
#else
// (ignore offset; it doesn't play into the sethi)
if (verify_only) {
} else {
}
#endif
}
break;
default:
guarantee(false, "instruction must perform arithmetic or memory access");
}
}
// We just moved this call instruction from orig_addr to addr().
// This means its target will appear to have grown by addr() - orig_addr.
}
}
}
// Special case: Patchable branch local to the code cache.
// This will break badly if the code cache grows larger than a few Mb.
}
call->set_destination(x);
return;
}
call->set_destination(x);
return;
}
// Special case: Patchable branch local to the code cache.
// This will break badly if the code cache grows larger than a few Mb.
br->set_jump_destination(x);
}
// SPARC never embeds addresses in code, at present.
//assert(type() == relocInfo::oop_type, "only oops are inlined at present");
}
// SPARC never embeds addresses in code, at present.
//assert(type() == relocInfo::oop_type, "only oops are inlined at present");
}
// minimum breakpoint size, in short words
return NativeIllegalInstruction::instruction_size / sizeof(short);
}
Untested("pd_swap_in_breakpoint");
// %%% probably do not need a general instrlen; just use the trap size
assert(instrlen * sizeof(short) == NativeIllegalInstruction::instruction_size, "enough instrlen in reloc. data");
for (int i = 0; i < instrlen; i++) {
instrs[i] = ((short*)x)[i];
}
}
}
Untested("pd_swap_out_breakpoint");
union { int l; short s[1]; } u;
for (int i = 0; i < instrlen; i++) {
u.s[i] = instrs[i];
}
ni->set_long_at(0, u.l);
}
}
}