8359166: C2 asserts in Assembler::addr_nop_5 with -XX:-UseAddressNop

Reviewed-by: aseoane, qamai
This commit is contained in:
Andrew Haley 2026-04-21 15:22:16 +00:00
parent 1ba7825d70
commit dac06a329a
2 changed files with 40 additions and 1 deletions

View File

@ -4568,7 +4568,7 @@ encode %{
} else if (_method->intrinsic_id() == vmIntrinsicID::_ensureMaterializedForStackWalk) {
// The NOP here is purely to ensure that eliding a call to
// JVM_EnsureMaterializedForStackWalk doesn't change the code size.
__ addr_nop_5();
__ nop(5);
__ block_comment("call JVM_EnsureMaterializedForStackWalk (elided)");
} else {
int method_index = resolved_method_index(masm);

View File

@ -0,0 +1,39 @@
/*
* Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2026, IBM Corp.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8359166
* @requires os.arch=="amd64" | os.arch=="x86_64"
* @requires vm.debug
*
* @run main/othervm
* -XX:-UseAddressNop -Xcomp -Xbatch -XX:-TieredCompilation Test
*/
public class Test {
public static void main(String[] args) {
}
}