--- a/hotspot/src/cpu/sparc/vm/nativeInst_sparc.hpp Wed Apr 12 08:02:29 2017 -0400
+++ b/hotspot/src/cpu/sparc/vm/nativeInst_sparc.hpp Wed Apr 12 17:52:04 2017 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -121,11 +121,7 @@
bool is_safepoint_poll() {
int x = long_at(0);
-#ifdef _LP64
return is_op3(x, Assembler::ldx_op3, Assembler::ldst_op) &&
-#else
- return is_op3(x, Assembler::lduw_op3, Assembler::ldst_op) &&
-#endif
(inv_rd(x) == G0) && (inv_immed(x) ? Assembler::inv_simm13(x) == 0 : inv_rs2(x) == G0);
}
@@ -432,22 +428,6 @@
// instructions in the sparcv9 vm. Used to call native methods which may be loaded
// anywhere in the address space, possibly out of reach of a call instruction.
-#ifndef _LP64
-
-// On 32-bit systems, a far call is the same as a near one.
-class NativeFarCall;
-inline NativeFarCall* nativeFarCall_at(address instr);
-class NativeFarCall : public NativeCall {
-public:
- friend inline NativeFarCall* nativeFarCall_at(address instr) { return (NativeFarCall*)nativeCall_at(instr); }
- friend NativeFarCall* nativeFarCall_overwriting_at(address instr, address destination = NULL)
- { return (NativeFarCall*)nativeCall_overwriting_at(instr, destination); }
- friend NativeFarCall* nativeFarCall_before(address return_address)
- { return (NativeFarCall*)nativeCall_before(return_address); }
-};
-
-#else
-
// The format of this extended-range call is:
// jumpl_to addr, lreg
// == sethi %hi54(addr), O7 ; jumpl O7, %lo10(addr), O7 ; <delay>
@@ -515,7 +495,6 @@
static void replace_mt_safe(address instr_addr, address code_buffer);
};
-#endif // _LP64
// An interface for accessing/manipulating 32 bit native set_metadata imm, reg instructions
// (used to manipulate inlined data references, etc.)
@@ -567,13 +546,8 @@
public:
enum Sparc_specific_constants {
sethi_offset = 0,
-#ifdef _LP64
add_offset = 7 * BytesPerInstWord,
instruction_size = 8 * BytesPerInstWord
-#else
- add_offset = 4,
- instruction_size = 8
-#endif
};
address instruction_address() const { return addr_at(0); }
@@ -626,11 +600,7 @@
public:
enum Sparc_specific_constants {
sethi_offset = 0,
-#ifdef _LP64
nop_offset = 7 * BytesPerInstWord,
-#else
- nop_offset = sethi_offset + BytesPerInstWord,
-#endif
add_offset = nop_offset + BytesPerInstWord,
instruction_size = add_offset + BytesPerInstWord
};
@@ -705,11 +675,7 @@
offset_width = 13,
sethi_offset = 0,
-#ifdef _LP64
add_offset = 7 * BytesPerInstWord,
-#else
- add_offset = 4,
-#endif
ldst_offset = add_offset + BytesPerInstWord
};
bool is_immediate() const {
@@ -720,11 +686,7 @@
address instruction_address() const { return addr_at(0); }
address next_instruction_address() const {
-#ifdef _LP64
return addr_at(is_immediate() ? 4 : (7 * BytesPerInstWord));
-#else
- return addr_at(is_immediate() ? 4 : 12);
-#endif
}
intptr_t offset() const {
return is_immediate()? inv_simm(long_at(0), offset_width) :
@@ -777,19 +739,13 @@
public:
enum Sparc_specific_constants {
sethi_offset = 0,
-#ifdef _LP64
jmpl_offset = 7 * BytesPerInstWord,
instruction_size = 9 * BytesPerInstWord // includes delay slot
-#else
- jmpl_offset = 1 * BytesPerInstWord,
- instruction_size = 3 * BytesPerInstWord // includes delay slot
-#endif
};
address instruction_address() const { return addr_at(0); }
address next_instruction_address() const { return addr_at(instruction_size); }
-#ifdef _LP64
address jump_destination() const {
return (address) data64(instruction_address(), long_at(jmpl_offset));
}
@@ -797,15 +753,6 @@
set_data64_sethi( instruction_address(), (intptr_t)dest);
set_long_at(jmpl_offset, set_data32_simm13( long_at(jmpl_offset), (intptr_t)dest));
}
-#else
- address jump_destination() const {
- return (address) data32(long_at(sethi_offset), long_at(jmpl_offset));
- }
- void set_jump_destination(address dest) {
- set_long_at(sethi_offset, set_data32_sethi( long_at(sethi_offset), (intptr_t)dest));
- set_long_at(jmpl_offset, set_data32_simm13( long_at(jmpl_offset), (intptr_t)dest));
- }
-#endif
// Creation
friend inline NativeJump* nativeJump_at(address address) {