8343115: SkipIfEqual class is not used after JDK-8335946
Reviewed-by: coleenp
This commit is contained in:
parent
90bd544512
commit
f0075d593d
@ -4782,23 +4782,6 @@ void MacroAssembler::kernel_crc32_common_fold_using_crypto_pmull(Register crc, R
|
||||
mov(tmp1, v0, D, 1);
|
||||
}
|
||||
|
||||
SkipIfEqual::SkipIfEqual(
|
||||
MacroAssembler* masm, const bool* flag_addr, bool value) {
|
||||
_masm = masm;
|
||||
uint64_t offset;
|
||||
_masm->adrp(rscratch1, ExternalAddress((address)flag_addr), offset);
|
||||
_masm->ldrb(rscratch1, Address(rscratch1, offset));
|
||||
if (value) {
|
||||
_masm->cbnzw(rscratch1, _label);
|
||||
} else {
|
||||
_masm->cbzw(rscratch1, _label);
|
||||
}
|
||||
}
|
||||
|
||||
SkipIfEqual::~SkipIfEqual() {
|
||||
_masm->bind(_label);
|
||||
}
|
||||
|
||||
void MacroAssembler::addptr(const Address &dst, int32_t src) {
|
||||
Address adr;
|
||||
switch(dst.getMode()) {
|
||||
|
@ -1652,24 +1652,6 @@ private:
|
||||
inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* class SkipIfEqual:
|
||||
*
|
||||
* Instantiating this class will result in assembly code being output that will
|
||||
* jump around any code emitted between the creation of the instance and it's
|
||||
* automatic destruction at the end of a scope block, depending on the value of
|
||||
* the flag passed to the constructor, which will be checked at run-time.
|
||||
*/
|
||||
class SkipIfEqual {
|
||||
private:
|
||||
MacroAssembler* _masm;
|
||||
Label _label;
|
||||
|
||||
public:
|
||||
SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value);
|
||||
~SkipIfEqual();
|
||||
};
|
||||
|
||||
struct tableswitch {
|
||||
Register _reg;
|
||||
int _insn_index; jint _first_key; jint _last_key;
|
||||
|
@ -4619,23 +4619,6 @@ void MacroAssembler::zap_from_to(Register low, int before, Register high, int af
|
||||
|
||||
#endif // !PRODUCT
|
||||
|
||||
void SkipIfEqualZero::skip_to_label_if_equal_zero(MacroAssembler* masm, Register temp,
|
||||
const bool* flag_addr, Label& label) {
|
||||
int simm16_offset = masm->load_const_optimized(temp, (address)flag_addr, R0, true);
|
||||
assert(sizeof(bool) == 1, "PowerPC ABI");
|
||||
masm->lbz(temp, simm16_offset, temp);
|
||||
masm->cmpwi(CCR0, temp, 0);
|
||||
masm->beq(CCR0, label);
|
||||
}
|
||||
|
||||
SkipIfEqualZero::SkipIfEqualZero(MacroAssembler* masm, Register temp, const bool* flag_addr) : _masm(masm), _label() {
|
||||
skip_to_label_if_equal_zero(masm, temp, flag_addr, _label);
|
||||
}
|
||||
|
||||
SkipIfEqualZero::~SkipIfEqualZero() {
|
||||
_masm->bind(_label);
|
||||
}
|
||||
|
||||
void MacroAssembler::cache_wb(Address line) {
|
||||
assert(line.index() == noreg, "index should be noreg");
|
||||
assert(line.disp() == 0, "displacement should be 0");
|
||||
|
@ -960,23 +960,4 @@ class MacroAssembler: public Assembler {
|
||||
void zap_from_to(Register low, int before, Register high, int after, Register val, Register addr) PRODUCT_RETURN;
|
||||
};
|
||||
|
||||
// class SkipIfEqualZero:
|
||||
//
|
||||
// Instantiating this class will result in assembly code being output that will
|
||||
// jump around any code emitted between the creation of the instance and it's
|
||||
// automatic destruction at the end of a scope block, depending on the value of
|
||||
// the flag passed to the constructor, which will be checked at run-time.
|
||||
class SkipIfEqualZero : public StackObj {
|
||||
private:
|
||||
MacroAssembler* _masm;
|
||||
Label _label;
|
||||
|
||||
public:
|
||||
// 'Temp' is a temp register that this object can use (and trash).
|
||||
explicit SkipIfEqualZero(MacroAssembler*, Register temp, const bool* flag_addr);
|
||||
static void skip_to_label_if_equal_zero(MacroAssembler*, Register temp,
|
||||
const bool* flag_addr, Label& label);
|
||||
~SkipIfEqualZero();
|
||||
};
|
||||
|
||||
#endif // CPU_PPC_MACROASSEMBLER_PPC_HPP
|
||||
|
@ -2569,27 +2569,6 @@ void MacroAssembler::bang_stack_size(Register size, Register tmp) {
|
||||
}
|
||||
}
|
||||
|
||||
SkipIfEqual::SkipIfEqual(MacroAssembler* masm, const bool* flag_addr, bool value) {
|
||||
_masm = masm;
|
||||
ExternalAddress target((address)flag_addr);
|
||||
_masm->relocate(target.rspec(), [&] {
|
||||
int32_t offset;
|
||||
_masm->la(t0, target.target(), offset);
|
||||
_masm->lbu(t0, Address(t0, offset));
|
||||
});
|
||||
|
||||
if (value) {
|
||||
_masm->bnez(t0, _label);
|
||||
} else {
|
||||
_masm->beqz(t0, _label);
|
||||
}
|
||||
}
|
||||
|
||||
SkipIfEqual::~SkipIfEqual() {
|
||||
_masm->bind(_label);
|
||||
_masm = nullptr;
|
||||
}
|
||||
|
||||
void MacroAssembler::load_mirror(Register dst, Register method, Register tmp1, Register tmp2) {
|
||||
const int mirror_offset = in_bytes(Klass::java_mirror_offset());
|
||||
ld(dst, Address(xmethod, Method::const_offset()));
|
||||
|
@ -1794,22 +1794,4 @@ public:
|
||||
inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* class SkipIfEqual:
|
||||
*
|
||||
* Instantiating this class will result in assembly code being output that will
|
||||
* jump around any code emitted between the creation of the instance and it's
|
||||
* automatic destruction at the end of a scope block, depending on the value of
|
||||
* the flag passed to the constructor, which will be checked at run-time.
|
||||
*/
|
||||
class SkipIfEqual {
|
||||
private:
|
||||
MacroAssembler* _masm;
|
||||
Label _label;
|
||||
|
||||
public:
|
||||
SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value);
|
||||
~SkipIfEqual();
|
||||
};
|
||||
|
||||
#endif // CPU_RISCV_MACROASSEMBLER_RISCV_HPP
|
||||
|
@ -2131,18 +2131,6 @@ void InterpreterMacroAssembler::notify_method_exit(bool native_method,
|
||||
if (!native_method) pop(state);
|
||||
bind(jvmti_post_done);
|
||||
}
|
||||
|
||||
#if 0
|
||||
// Dtrace currently not supported on z/Architecture.
|
||||
{
|
||||
SkipIfEqual skip(this, &DTraceMethodProbes, false);
|
||||
push(state);
|
||||
get_method(c_rarg1);
|
||||
call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit),
|
||||
r15_thread, c_rarg1);
|
||||
pop(state);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::skip_if_jvmti_mode(Label &Lskip, Register Rscratch) {
|
||||
|
@ -6016,21 +6016,6 @@ void MacroAssembler::zap_from_to(Register low, Register high, Register val, Regi
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
|
||||
SkipIfEqual::SkipIfEqual(MacroAssembler* masm, const bool* flag_addr, bool value, Register _rscratch) {
|
||||
_masm = masm;
|
||||
_masm->load_absolute_address(_rscratch, (address)flag_addr);
|
||||
_masm->load_and_test_int(_rscratch, Address(_rscratch));
|
||||
if (value) {
|
||||
_masm->z_brne(_label); // Skip if true, i.e. != 0.
|
||||
} else {
|
||||
_masm->z_bre(_label); // Skip if false, i.e. == 0.
|
||||
}
|
||||
}
|
||||
|
||||
SkipIfEqual::~SkipIfEqual() {
|
||||
_masm->bind(_label);
|
||||
}
|
||||
|
||||
// Implements lightweight-locking.
|
||||
// - obj: the object to be locked, contents preserved.
|
||||
// - temp1, temp2: temporary registers, contents destroyed.
|
||||
|
@ -1064,24 +1064,6 @@ class MacroAssembler: public Assembler {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* class SkipIfEqual:
|
||||
*
|
||||
* Instantiating this class will result in assembly code being output that will
|
||||
* jump around any code emitted between the creation of the instance and it's
|
||||
* automatic destruction at the end of a scope block, depending on the value of
|
||||
* the flag passed to the constructor, which will be checked at run-time.
|
||||
*/
|
||||
class SkipIfEqual {
|
||||
private:
|
||||
MacroAssembler* _masm;
|
||||
Label _label;
|
||||
|
||||
public:
|
||||
SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value, Register _rscratch);
|
||||
~SkipIfEqual();
|
||||
};
|
||||
|
||||
#ifdef ASSERT
|
||||
// Return false (e.g. important for our impl. of virtual calls).
|
||||
inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
|
||||
|
@ -10297,17 +10297,6 @@ Assembler::Condition MacroAssembler::negate_condition(Assembler::Condition cond)
|
||||
ShouldNotReachHere(); return Assembler::overflow;
|
||||
}
|
||||
|
||||
SkipIfEqual::SkipIfEqual(
|
||||
MacroAssembler* masm, const bool* flag_addr, bool value, Register rscratch) {
|
||||
_masm = masm;
|
||||
_masm->cmp8(ExternalAddress((address)flag_addr), value, rscratch);
|
||||
_masm->jcc(Assembler::equal, _label);
|
||||
}
|
||||
|
||||
SkipIfEqual::~SkipIfEqual() {
|
||||
_masm->bind(_label);
|
||||
}
|
||||
|
||||
// 32-bit Windows has its own fast-path implementation
|
||||
// of get_thread
|
||||
#if !defined(WIN32) || defined(_LP64)
|
||||
|
@ -2168,22 +2168,4 @@ public:
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* class SkipIfEqual:
|
||||
*
|
||||
* Instantiating this class will result in assembly code being output that will
|
||||
* jump around any code emitted between the creation of the instance and it's
|
||||
* automatic destruction at the end of a scope block, depending on the value of
|
||||
* the flag passed to the constructor, which will be checked at run-time.
|
||||
*/
|
||||
class SkipIfEqual {
|
||||
private:
|
||||
MacroAssembler* _masm;
|
||||
Label _label;
|
||||
|
||||
public:
|
||||
SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value, Register rscratch);
|
||||
~SkipIfEqual();
|
||||
};
|
||||
|
||||
#endif // CPU_X86_MACROASSEMBLER_X86_HPP
|
||||
|
Loading…
x
Reference in New Issue
Block a user