Mercurial > hg > graal-compiler
annotate graal/com.oracle.graal.compiler.hsail.test/src/com/oracle/graal/compiler/hsail/test/ArgsObjStatIITest.java @ 18327:13273385abb5
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 10 Nov 2014 18:18:42 +0100 |
parents | d9aad522d355 |
children |
rev | line source |
---|---|
13900
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
1 /* |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 * |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 * |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
14 * |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 * |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
21 * questions. |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
22 */ |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
23 |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 package com.oracle.graal.compiler.hsail.test; |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
25 |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
26 import org.junit.*; |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
27 |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
28 /** |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
29 * Tests codegen for an II signature Object stream static function. |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
30 */ |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
31 public class ArgsObjStatIITest extends ArgsObjBase { |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
32 |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
33 public static void run(int arg1, int arg2, MyObj myobj) { |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
34 myobj.d = myobj.id + arg1 + arg2; |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
35 } |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
36 |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
37 @Override |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
38 public void runTest() { |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
39 setupArrays(); |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
40 dispatchMethodKernel(outArray, 7, 6); |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
41 } |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
42 |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
43 @Test |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
44 public void test() { |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
45 testGeneratedHsail(); |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
46 } |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
47 |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
48 } |