Mercurial > hg > graal-compiler
annotate graal/com.oracle.graal.compiler.hsail.test/src/com/oracle/graal/compiler/hsail/test/ArgsIntInstIJTest.java @ 15217:ec7d8b646b9f
Truffle: Fixed display of installed code size.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 17 Apr 2014 23:25:42 +0200 |
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 IJ signature {@code IntStream} instance 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 ArgsIntInstIJTest extends ArgsIntBase { |
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 void run(int arg1, long arg2, int gid) { |
d9aad522d355
HSAIL: fixed bug in kernel argument logic
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
34 outArray[gid] = gid + 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(NUM, 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 } |