blob: f6bc063d865a2ba71322e73e84890c4785bb1606 [file] [log] [blame]
Alexandre Ramesc2c52a12016-08-02 13:45:28 +01001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17public class Main {
18
19 public static int array_int[] = { 0 };
20 public static long array_long[] = { 0 };
21 public static float array_float[] = { 0.0f };
22 public static double array_double[] = { 0.0 };
23
24 // The code used to print constant locations in parallel moves is architecture
25 // independent. We only test for ARM and ARM64 as it is easy: 'store'
26 // instructions only take registers as a source.
27
28 /// CHECK-START-ARM: void Main.store_to_arrays() register (after)
29 /// CHECK: ParallelMove {{.*#1->.*#2->.*#3\.3->.*#4\.4->.*}}
30
31 /// CHECK-START-ARM64: void Main.store_to_arrays() register (after)
32 /// CHECK: ParallelMove {{.*#1->.*#2->.*#3\.3->.*#4\.4->.*}}
33
34 public void store_to_arrays() {
35 array_int[0] = 1;
36 array_long[0] = 2;
37 array_float[0] = 3.3f;
38 array_double[0] = 4.4;
39 }
40
41 public static void main(String args[]) {}
42}