Skip to content

Commit

Permalink
8295396: RISC-V: Cleanup useless CompressibleRegions
Browse files Browse the repository at this point in the history
Reviewed-by: fyang
  • Loading branch information
zhengxiaolinX authored and RealFYang committed Oct 18, 2022
1 parent 692cdab commit 529cc48
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 68 deletions.
12 changes: 0 additions & 12 deletions src/hotspot/cpu/riscv/macroAssembler_riscv.cpp
Expand Up @@ -1203,8 +1203,6 @@ int MacroAssembler::bitset_to_regs(unsigned int bitset, unsigned char* regs) {
// Return the number of words pushed
int MacroAssembler::push_reg(unsigned int bitset, Register stack) {
DEBUG_ONLY(int words_pushed = 0;)
CompressibleRegion cr(this);

unsigned char regs[32];
int count = bitset_to_regs(bitset, regs);
// reserve one slot to align for odd count
Expand All @@ -1225,8 +1223,6 @@ int MacroAssembler::push_reg(unsigned int bitset, Register stack) {

int MacroAssembler::pop_reg(unsigned int bitset, Register stack) {
DEBUG_ONLY(int words_popped = 0;)
CompressibleRegion cr(this);

unsigned char regs[32];
int count = bitset_to_regs(bitset, regs);
// reserve one slot to align for odd count
Expand All @@ -1248,7 +1244,6 @@ int MacroAssembler::pop_reg(unsigned int bitset, Register stack) {
// Push floating-point registers in the bitset supplied.
// Return the number of words pushed
int MacroAssembler::push_fp(unsigned int bitset, Register stack) {
CompressibleRegion cr(this);
DEBUG_ONLY(int words_pushed = 0;)
unsigned char regs[32];
int count = bitset_to_regs(bitset, regs);
Expand All @@ -1269,7 +1264,6 @@ int MacroAssembler::push_fp(unsigned int bitset, Register stack) {
}

int MacroAssembler::pop_fp(unsigned int bitset, Register stack) {
CompressibleRegion cr(this);
DEBUG_ONLY(int words_popped = 0;)
unsigned char regs[32];
int count = bitset_to_regs(bitset, regs);
Expand All @@ -1293,7 +1287,6 @@ int MacroAssembler::pop_fp(unsigned int bitset, Register stack) {
// Push vector registers in the bitset supplied.
// Return the number of words pushed
int MacroAssembler::push_v(unsigned int bitset, Register stack) {
CompressibleRegion cr(this);
int vector_size_in_bytes = Matcher::scalable_vector_reg_size(T_BYTE);

// Scan bitset to accumulate register pairs
Expand All @@ -1309,7 +1302,6 @@ int MacroAssembler::push_v(unsigned int bitset, Register stack) {
}

int MacroAssembler::pop_v(unsigned int bitset, Register stack) {
CompressibleRegion cr(this);
int vector_size_in_bytes = Matcher::scalable_vector_reg_size(T_BYTE);

// Scan bitset to accumulate register pairs
Expand All @@ -1326,7 +1318,6 @@ int MacroAssembler::pop_v(unsigned int bitset, Register stack) {
#endif // COMPILER2

void MacroAssembler::push_call_clobbered_registers_except(RegSet exclude) {
CompressibleRegion cr(this);
// Push integer registers x7, x10-x17, x28-x31.
push_reg(RegSet::of(x7) + RegSet::range(x10, x17) + RegSet::range(x28, x31) - exclude, sp);

Expand All @@ -1341,7 +1332,6 @@ void MacroAssembler::push_call_clobbered_registers_except(RegSet exclude) {
}

void MacroAssembler::pop_call_clobbered_registers_except(RegSet exclude) {
CompressibleRegion cr(this);
int offset = 0;
for (int i = 0; i < 32; i++) {
if (i <= f7->encoding() || i >= f28->encoding() || (i >= f10->encoding() && i <= f17->encoding())) {
Expand All @@ -1354,7 +1344,6 @@ void MacroAssembler::pop_call_clobbered_registers_except(RegSet exclude) {
}

void MacroAssembler::push_CPU_state(bool save_vectors, int vector_size_in_bytes) {
CompressibleRegion cr(this);
// integer registers, except zr(x0) & ra(x1) & sp(x2) & gp(x3) & tp(x4)
push_reg(RegSet::range(x5, x31), sp);

Expand All @@ -1376,7 +1365,6 @@ void MacroAssembler::push_CPU_state(bool save_vectors, int vector_size_in_bytes)
}

void MacroAssembler::pop_CPU_state(bool restore_vectors, int vector_size_in_bytes) {
CompressibleRegion cr(this);
// vector registers
if (restore_vectors) {
vsetvli(t0, x0, Assembler::e64, Assembler::m8);
Expand Down

1 comment on commit 529cc48

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.