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