8299733: AArch64: "unexpected literal addressing mode" assertion failure with -XX:+PrintC1Statistics

Co-authored-by: Ningsheng Jian <njian@openjdk.org>
Reviewed-by: chagedorn, fyang, aph
This commit is contained in:
Nick Gasson 2023-01-10 13:29:55 +00:00
parent 5826a077f9
commit 21d468e575
2 changed files with 16 additions and 5 deletions
src/hotspot/cpu/aarch64
test/hotspot/jtreg

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -505,7 +505,20 @@ class Address {
}
bool uses(Register reg) const {
return base() == reg || index() == reg;
switch (_mode) {
case literal:
case no_mode:
return false;
case base_plus_offset:
case base_plus_offset_reg:
case pre:
case post:
case post_reg:
return base() == reg || index() == reg;
default:
ShouldNotReachHere();
return false;
}
}
address target() const {

@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -38,5 +38,3 @@ serviceability/sa/TestJhsdbJstackMixed.java 8248675 linux-aarch64
serviceability/jvmti/VMObjectAlloc/VMObjectAllocTest.java 8288430 generic-all
gc/cslocker/TestCSLocker.java 8293289 generic-x64
compiler/c1/TestPrintC1Statistics.java 8298053 linux-aarch64