Skip to content

Commit f0075d5

Browse files
committed
8343115: SkipIfEqual class is not used after JDK-8335946
Reviewed-by: coleenp
1 parent 90bd544 commit f0075d5

11 files changed

+0
-184
lines changed

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4782,23 +4782,6 @@ void MacroAssembler::kernel_crc32_common_fold_using_crypto_pmull(Register crc, R
47824782
mov(tmp1, v0, D, 1);
47834783
}
47844784

4785-
SkipIfEqual::SkipIfEqual(
4786-
MacroAssembler* masm, const bool* flag_addr, bool value) {
4787-
_masm = masm;
4788-
uint64_t offset;
4789-
_masm->adrp(rscratch1, ExternalAddress((address)flag_addr), offset);
4790-
_masm->ldrb(rscratch1, Address(rscratch1, offset));
4791-
if (value) {
4792-
_masm->cbnzw(rscratch1, _label);
4793-
} else {
4794-
_masm->cbzw(rscratch1, _label);
4795-
}
4796-
}
4797-
4798-
SkipIfEqual::~SkipIfEqual() {
4799-
_masm->bind(_label);
4800-
}
4801-
48024785
void MacroAssembler::addptr(const Address &dst, int32_t src) {
48034786
Address adr;
48044787
switch(dst.getMode()) {

src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,24 +1652,6 @@ class MacroAssembler: public Assembler {
16521652
inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
16531653
#endif
16541654

1655-
/**
1656-
* class SkipIfEqual:
1657-
*
1658-
* Instantiating this class will result in assembly code being output that will
1659-
* jump around any code emitted between the creation of the instance and it's
1660-
* automatic destruction at the end of a scope block, depending on the value of
1661-
* the flag passed to the constructor, which will be checked at run-time.
1662-
*/
1663-
class SkipIfEqual {
1664-
private:
1665-
MacroAssembler* _masm;
1666-
Label _label;
1667-
1668-
public:
1669-
SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value);
1670-
~SkipIfEqual();
1671-
};
1672-
16731655
struct tableswitch {
16741656
Register _reg;
16751657
int _insn_index; jint _first_key; jint _last_key;

src/hotspot/cpu/ppc/macroAssembler_ppc.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4619,23 +4619,6 @@ void MacroAssembler::zap_from_to(Register low, int before, Register high, int af
46194619

46204620
#endif // !PRODUCT
46214621

4622-
void SkipIfEqualZero::skip_to_label_if_equal_zero(MacroAssembler* masm, Register temp,
4623-
const bool* flag_addr, Label& label) {
4624-
int simm16_offset = masm->load_const_optimized(temp, (address)flag_addr, R0, true);
4625-
assert(sizeof(bool) == 1, "PowerPC ABI");
4626-
masm->lbz(temp, simm16_offset, temp);
4627-
masm->cmpwi(CCR0, temp, 0);
4628-
masm->beq(CCR0, label);
4629-
}
4630-
4631-
SkipIfEqualZero::SkipIfEqualZero(MacroAssembler* masm, Register temp, const bool* flag_addr) : _masm(masm), _label() {
4632-
skip_to_label_if_equal_zero(masm, temp, flag_addr, _label);
4633-
}
4634-
4635-
SkipIfEqualZero::~SkipIfEqualZero() {
4636-
_masm->bind(_label);
4637-
}
4638-
46394622
void MacroAssembler::cache_wb(Address line) {
46404623
assert(line.index() == noreg, "index should be noreg");
46414624
assert(line.disp() == 0, "displacement should be 0");

src/hotspot/cpu/ppc/macroAssembler_ppc.hpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -960,23 +960,4 @@ class MacroAssembler: public Assembler {
960960
void zap_from_to(Register low, int before, Register high, int after, Register val, Register addr) PRODUCT_RETURN;
961961
};
962962

963-
// class SkipIfEqualZero:
964-
//
965-
// Instantiating this class will result in assembly code being output that will
966-
// jump around any code emitted between the creation of the instance and it's
967-
// automatic destruction at the end of a scope block, depending on the value of
968-
// the flag passed to the constructor, which will be checked at run-time.
969-
class SkipIfEqualZero : public StackObj {
970-
private:
971-
MacroAssembler* _masm;
972-
Label _label;
973-
974-
public:
975-
// 'Temp' is a temp register that this object can use (and trash).
976-
explicit SkipIfEqualZero(MacroAssembler*, Register temp, const bool* flag_addr);
977-
static void skip_to_label_if_equal_zero(MacroAssembler*, Register temp,
978-
const bool* flag_addr, Label& label);
979-
~SkipIfEqualZero();
980-
};
981-
982963
#endif // CPU_PPC_MACROASSEMBLER_PPC_HPP

src/hotspot/cpu/riscv/macroAssembler_riscv.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,27 +2569,6 @@ void MacroAssembler::bang_stack_size(Register size, Register tmp) {
25692569
}
25702570
}
25712571

2572-
SkipIfEqual::SkipIfEqual(MacroAssembler* masm, const bool* flag_addr, bool value) {
2573-
_masm = masm;
2574-
ExternalAddress target((address)flag_addr);
2575-
_masm->relocate(target.rspec(), [&] {
2576-
int32_t offset;
2577-
_masm->la(t0, target.target(), offset);
2578-
_masm->lbu(t0, Address(t0, offset));
2579-
});
2580-
2581-
if (value) {
2582-
_masm->bnez(t0, _label);
2583-
} else {
2584-
_masm->beqz(t0, _label);
2585-
}
2586-
}
2587-
2588-
SkipIfEqual::~SkipIfEqual() {
2589-
_masm->bind(_label);
2590-
_masm = nullptr;
2591-
}
2592-
25932572
void MacroAssembler::load_mirror(Register dst, Register method, Register tmp1, Register tmp2) {
25942573
const int mirror_offset = in_bytes(Klass::java_mirror_offset());
25952574
ld(dst, Address(xmethod, Method::const_offset()));

src/hotspot/cpu/riscv/macroAssembler_riscv.hpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,22 +1794,4 @@ class MacroAssembler: public Assembler {
17941794
inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
17951795
#endif
17961796

1797-
/**
1798-
* class SkipIfEqual:
1799-
*
1800-
* Instantiating this class will result in assembly code being output that will
1801-
* jump around any code emitted between the creation of the instance and it's
1802-
* automatic destruction at the end of a scope block, depending on the value of
1803-
* the flag passed to the constructor, which will be checked at run-time.
1804-
*/
1805-
class SkipIfEqual {
1806-
private:
1807-
MacroAssembler* _masm;
1808-
Label _label;
1809-
1810-
public:
1811-
SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value);
1812-
~SkipIfEqual();
1813-
};
1814-
18151797
#endif // CPU_RISCV_MACROASSEMBLER_RISCV_HPP

src/hotspot/cpu/s390/interp_masm_s390.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,18 +2131,6 @@ void InterpreterMacroAssembler::notify_method_exit(bool native_method,
21312131
if (!native_method) pop(state);
21322132
bind(jvmti_post_done);
21332133
}
2134-
2135-
#if 0
2136-
// Dtrace currently not supported on z/Architecture.
2137-
{
2138-
SkipIfEqual skip(this, &DTraceMethodProbes, false);
2139-
push(state);
2140-
get_method(c_rarg1);
2141-
call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit),
2142-
r15_thread, c_rarg1);
2143-
pop(state);
2144-
}
2145-
#endif
21462134
}
21472135

21482136
void InterpreterMacroAssembler::skip_if_jvmti_mode(Label &Lskip, Register Rscratch) {

src/hotspot/cpu/s390/macroAssembler_s390.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6016,21 +6016,6 @@ void MacroAssembler::zap_from_to(Register low, Register high, Register val, Regi
60166016
}
60176017
#endif // !PRODUCT
60186018

6019-
SkipIfEqual::SkipIfEqual(MacroAssembler* masm, const bool* flag_addr, bool value, Register _rscratch) {
6020-
_masm = masm;
6021-
_masm->load_absolute_address(_rscratch, (address)flag_addr);
6022-
_masm->load_and_test_int(_rscratch, Address(_rscratch));
6023-
if (value) {
6024-
_masm->z_brne(_label); // Skip if true, i.e. != 0.
6025-
} else {
6026-
_masm->z_bre(_label); // Skip if false, i.e. == 0.
6027-
}
6028-
}
6029-
6030-
SkipIfEqual::~SkipIfEqual() {
6031-
_masm->bind(_label);
6032-
}
6033-
60346019
// Implements lightweight-locking.
60356020
// - obj: the object to be locked, contents preserved.
60366021
// - temp1, temp2: temporary registers, contents destroyed.

src/hotspot/cpu/s390/macroAssembler_s390.hpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,24 +1064,6 @@ class MacroAssembler: public Assembler {
10641064

10651065
};
10661066

1067-
/**
1068-
* class SkipIfEqual:
1069-
*
1070-
* Instantiating this class will result in assembly code being output that will
1071-
* jump around any code emitted between the creation of the instance and it's
1072-
* automatic destruction at the end of a scope block, depending on the value of
1073-
* the flag passed to the constructor, which will be checked at run-time.
1074-
*/
1075-
class SkipIfEqual {
1076-
private:
1077-
MacroAssembler* _masm;
1078-
Label _label;
1079-
1080-
public:
1081-
SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value, Register _rscratch);
1082-
~SkipIfEqual();
1083-
};
1084-
10851067
#ifdef ASSERT
10861068
// Return false (e.g. important for our impl. of virtual calls).
10871069
inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }

src/hotspot/cpu/x86/macroAssembler_x86.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10297,17 +10297,6 @@ Assembler::Condition MacroAssembler::negate_condition(Assembler::Condition cond)
1029710297
ShouldNotReachHere(); return Assembler::overflow;
1029810298
}
1029910299

10300-
SkipIfEqual::SkipIfEqual(
10301-
MacroAssembler* masm, const bool* flag_addr, bool value, Register rscratch) {
10302-
_masm = masm;
10303-
_masm->cmp8(ExternalAddress((address)flag_addr), value, rscratch);
10304-
_masm->jcc(Assembler::equal, _label);
10305-
}
10306-
10307-
SkipIfEqual::~SkipIfEqual() {
10308-
_masm->bind(_label);
10309-
}
10310-
1031110300
// 32-bit Windows has its own fast-path implementation
1031210301
// of get_thread
1031310302
#if !defined(WIN32) || defined(_LP64)

0 commit comments

Comments
 (0)