Skip to content

Commit 69014cd

Browse files
dlunderobcasloz
authored andcommitted
8320682: [AArch64] C1 compilation fails with "Field too big for insn"
Reviewed-by: thartmann, aph, dlong
1 parent 5a97dbf commit 69014cd

File tree

2 files changed

+13
-33
lines changed

2 files changed

+13
-33
lines changed

src/hotspot/share/c1/c1_globals.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -275,9 +275,11 @@
275275
develop(bool, InstallMethods, true, \
276276
"Install methods at the end of successful compilations") \
277277
\
278+
/* The compiler assumes, in many places, that methods are at most 1MB. */ \
279+
/* Therefore, we restrict this flag to at most 1MB. */ \
278280
develop(intx, NMethodSizeLimit, (64*K)*wordSize, \
279281
"Maximum size of a compiled method.") \
280-
range(0, max_jint) \
282+
range(0, 1*M) \
281283
\
282284
develop(bool, TraceFPUStack, false, \
283285
"Trace emulation of the FPU stack (intel only)") \

test/hotspot/jtreg/compiler/arguments/TestC1Globals.java

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,13 @@
2121
* questions.
2222
*/
2323

24-
/**
25-
* @test
26-
* @bug 8318817
27-
* @requires vm.debug
28-
* @summary Test flag with large value
29-
*
30-
* @run main/othervm -XX:NMethodSizeLimit=351658240
31-
* compiler.arguments.TestC1Globals
32-
*/
33-
34-
/**
35-
* @test
36-
* @bug 8318817
37-
* @requires vm.debug
38-
* @summary Test flag with large value
39-
*
40-
* @run main/othervm -XX:NMethodSizeLimit=224001703
41-
* compiler.arguments.TestC1Globals
42-
*/
43-
4424
/**
4525
* @test
4626
* @bug 8316653
4727
* @requires vm.debug
48-
* @summary Test flag with max value
28+
* @summary Test flag with max value.
4929
*
50-
* @run main/othervm -XX:NMethodSizeLimit=2147483647
30+
* @run main/othervm -XX:NMethodSizeLimit=1M
5131
* compiler.arguments.TestC1Globals
5232
*/
5333

@@ -56,25 +36,23 @@
5636
* @bug 8318817
5737
* @requires vm.debug
5838
* @requires os.family == "linux"
59-
* @summary Test flag with large value combined with transparent huge pages on
39+
* @summary Test flag with max value combined with transparent huge pages on
6040
* Linux.
6141
*
62-
* @run main/othervm -XX:NMethodSizeLimit=351658240
42+
* @run main/othervm -XX:NMethodSizeLimit=1M
6343
* -XX:+UseTransparentHugePages
6444
* compiler.arguments.TestC1Globals
65-
*
6645
*/
6746

6847
/**
6948
* @test
70-
* @bug 8318817
49+
* @bug 8320682
7150
* @requires vm.debug
72-
* @requires os.family == "linux"
73-
* @summary Test flag with large value combined with transparent huge pages on
74-
* Linux.
51+
* @summary Test flag with max value and specific compilation.
7552
*
76-
* @run main/othervm -XX:NMethodSizeLimit=224001703
77-
* -XX:+UseTransparentHugePages
53+
* @run main/othervm -XX:NMethodSizeLimit=1M
54+
* -XX:CompileOnly=java.util.HashMap::putMapEntries
55+
* -Xcomp
7856
* compiler.arguments.TestC1Globals
7957
*
8058
*/

0 commit comments

Comments
 (0)