Skip to content

Commit

Permalink
8296349: [aarch64] Avoid slicing Address::extend
Browse files Browse the repository at this point in the history
Reviewed-by: aph, thartmann
  • Loading branch information
Kim Barrett committed Nov 11, 2022
1 parent 7244eac commit 12e76cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
21 changes: 5 additions & 16 deletions src/hotspot/cpu/aarch64/assembler_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,22 +351,11 @@ class Address {
int shift() const { return _shift; }
ext::operation op() const { return _op; }
};
class uxtw : public extend {
public:
uxtw(int shift = -1): extend(shift, 0b010, ext::uxtw) { }
};
class lsl : public extend {
public:
lsl(int shift = -1): extend(shift, 0b011, ext::uxtx) { }
};
class sxtw : public extend {
public:
sxtw(int shift = -1): extend(shift, 0b110, ext::sxtw) { }
};
class sxtx : public extend {
public:
sxtx(int shift = -1): extend(shift, 0b111, ext::sxtx) { }
};

static extend uxtw(int shift = -1) { return extend(shift, 0b010, ext::uxtw); }
static extend lsl(int shift = -1) { return extend(shift, 0b011, ext::uxtx); }
static extend sxtw(int shift = -1) { return extend(shift, 0b110, ext::sxtw); }
static extend sxtx(int shift = -1) { return extend(shift, 0b111, ext::sxtx); }

private:
Register _base;
Expand Down
5 changes: 1 addition & 4 deletions src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@

#undef __
#define __ _masm->
#define TIMES_OOP Address::sxtw(exact_log2(UseCompressedOops ? 4 : 8))

#ifdef PRODUCT
#define BLOCK_COMMENT(str) /* nothing */
Expand Down Expand Up @@ -619,8 +618,6 @@ class StubGenerator: public StubCodeGenerator {
return start;
}

void array_overlap_test(Label& L_no_overlap, Address::sxtw sf) { __ b(L_no_overlap); }

// Generate indices for iota vector.
address generate_iota_indices(const char *stub_name) {
__ align(CodeEntryAlignment);
Expand Down Expand Up @@ -1808,7 +1805,7 @@ class StubGenerator: public StubCodeGenerator {
// caller guarantees that the arrays really are different
// otherwise, we would have to make conjoint checks
{ Label L;
array_overlap_test(L, TIMES_OOP);
__ b(L); // conjoint check not yet implemented
__ stop("checkcast_copy within a single array");
__ bind(L);
}
Expand Down

1 comment on commit 12e76cb

@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.