Skip to content

Commit

Permalink
8293826: Closed test fails after JDK-8276108 on aarch64
Browse files Browse the repository at this point in the history
17u backport of JDK-8278417

Reviewed-by: goetz
  • Loading branch information
martinuy committed Oct 10, 2022
1 parent eea78cf commit 62eb5ae
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp
Expand Up @@ -148,7 +148,7 @@ LIR_Address* LIRGenerator::generate_address(LIR_Opr base, LIR_Opr index,
if (index->is_constant()) {
LIR_Const *constant = index->as_constant_ptr();
if (constant->type() == T_INT) {
large_disp += index->as_jint() << shift;
large_disp += ((intx)index->as_jint()) << shift;
} else {
assert(constant->type() == T_LONG, "should be");
jlong c = index->as_jlong() << shift;
Expand Down Expand Up @@ -194,7 +194,7 @@ LIR_Address* LIRGenerator::generate_address(LIR_Opr base, LIR_Opr index,
if (large_disp == 0 && index->is_register()) {
return new LIR_Address(base, index, type);
} else {
assert(Address::offset_ok_for_immed(large_disp, 0), "must be");
assert(Address::offset_ok_for_immed(large_disp, shift), "failed for large_disp: " INTPTR_FORMAT " and shift %d", large_disp, shift);
return new LIR_Address(base, large_disp, type);
}
}
Expand All @@ -204,24 +204,7 @@ LIR_Address* LIRGenerator::emit_array_address(LIR_Opr array_opr, LIR_Opr index_o
int offset_in_bytes = arrayOopDesc::base_offset_in_bytes(type);
int elem_size = type2aelembytes(type);
int shift = exact_log2(elem_size);

LIR_Address* addr;
if (index_opr->is_constant()) {
addr = new LIR_Address(array_opr,
offset_in_bytes + (intx)(index_opr->as_jint()) * elem_size, type);
} else {
if (offset_in_bytes) {
LIR_Opr tmp = new_pointer_register();
__ add(array_opr, LIR_OprFact::intConst(offset_in_bytes), tmp);
array_opr = tmp;
offset_in_bytes = 0;
}
addr = new LIR_Address(array_opr,
index_opr,
LIR_Address::scale(type),
offset_in_bytes, type);
}
return addr;
return generate_address(array_opr, index_opr, shift, offset_in_bytes, type);
}

LIR_Opr LIRGenerator::load_immediate(int x, BasicType type) {
Expand Down

3 comments on commit 62eb5ae

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 62eb5ae Nov 4, 2022

Choose a reason for hiding this comment

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

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 62eb5ae Nov 4, 2022

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch GoeLin-backport-62eb5ae2 in my personal fork of openjdk/jdk11u-dev. To create a pull request with this backport targeting openjdk/jdk11u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 62eb5ae2 from the openjdk/jdk17u-dev repository.

The commit being backported was authored by Martin Balao on 10 Oct 2022 and was reviewed by Goetz Lindenmaier.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk11u-dev:

$ git fetch https://github.com/openjdk-bots/jdk11u-dev GoeLin-backport-62eb5ae2:GoeLin-backport-62eb5ae2
$ git checkout GoeLin-backport-62eb5ae2
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk11u-dev GoeLin-backport-62eb5ae2

Please sign in to comment.