author | adinn |
Thu, 28 Jun 2018 10:09:58 +0000 | |
changeset 50874 | 551c340ca01a |
child 52409 | 87bc444ca642 |
permissions | -rw-r--r-- |
50874
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
1 |
/* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
2 |
* Copyright (c) 2018, Red Hat, Inc. All rights reserved. |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
4 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
8 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
13 |
* accompanied this code). |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
14 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
18 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
21 |
* questions. |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
22 |
*/ |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
23 |
|
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
24 |
/* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
25 |
* @test |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
26 |
* @summary C2 should use ldar, stlr and ldaxr+stlxr insns for volatile operations |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
27 |
* @library /test/lib / |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
28 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
29 |
* @modules java.base/jdk.internal.misc |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
30 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
31 |
* @requires os.arch=="aarch64" & vm.debug == true & |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
32 |
* vm.flavor == "server" & !vm.graal.enabled & |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
33 |
* vm.gc.ConcMarkSweep |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
34 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
35 |
* @build compiler.c2.aarch64.TestVolatiles |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
36 |
* compiler.c2.aarch64.TestVolatileLoad |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
37 |
* compiler.c2.aarch64.TestUnsafeVolatileLoad |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
38 |
* compiler.c2.aarch64.TestVolatileStore |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
39 |
* compiler.c2.aarch64.TestUnsafeVolatileStore |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
40 |
* compiler.c2.aarch64.TestUnsafeVolatileCAS |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
41 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
42 |
* @run driver compiler.c2.aarch64.TestVolatilesCMS |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
43 |
* TestVolatileLoad CMS |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
44 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
45 |
* @run driver compiler.c2.aarch64.TestVolatilesCMS |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
46 |
* TestVolatileStore CMS |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
47 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
48 |
* @run driver compiler.c2.aarch64.TestVolatilesCMS |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
49 |
* TestUnsafeVolatileLoad CMS |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
50 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
51 |
* @run driver compiler.c2.aarch64.TestVolatilesCMS |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
52 |
* TestUnsafeVolatileStore CMS |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
53 |
* |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
54 |
* @run driver compiler.c2.aarch64.TestVolatilesCMS |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
55 |
* TestUnsafeVolatileCAS CMS |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
56 |
*/ |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
57 |
|
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
58 |
package compiler.c2.aarch64; |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
59 |
|
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
60 |
public class TestVolatilesCMS { |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
61 |
public static void main(String args[]) throws Throwable |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
62 |
{ |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
63 |
// delegate work to shared code |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
64 |
new TestVolatiles().runtest(args[0], args[1]); |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
65 |
} |
551c340ca01a
8205694: AArch64: Add test to validate volatile load, store and CAS code generation
adinn
parents:
diff
changeset
|
66 |
} |