Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport JDK-8280476 fix #191

Open
wants to merge 1 commit into
base: jbr17.469
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/hotspot/cpu/aarch64/immediate_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ static inline uint32_t uimm(uint32_t val, int hi, int lo)

uint64_t replicate(uint64_t bits, int nbits, int count)
{
assert(count > 0, "must be");
assert(nbits > 0, "must be");
assert(count * nbits <= 64, "must be");

// Special case nbits == 64 since the shift below with that nbits value
// would result in undefined behavior.
if (nbits == 64) {
return bits;
}

uint64_t result = 0;
// nbits may be 64 in which case we want mask to be -1
uint64_t mask = ones(nbits);
Expand Down Expand Up @@ -363,4 +373,3 @@ uint32_t encoding_for_fp_immediate(float immediate)
res = (s << 7) | (r << 4) | f;
return res;
}