Mercurial > hg > graal-jvmci-8
annotate test/compiler/native/libTestDirtyInt.c @ 23993:7b65bd0ebeb7
removed duplicate registration of StubRoutines::_multiplyToLen in vmstructs
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 31 Jan 2017 22:59:16 +0100 |
parents | 16aa1f621ec6 |
children |
rev | line source |
---|---|
23646
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
1 /* |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
2 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
4 * |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
8 * |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
13 * accompanied this code). |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
14 * |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
18 * |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
21 * questions. |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
22 */ |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
23 |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
24 #include "jni.h" |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
25 #include <stdio.h> |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
26 |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
27 static int array = 0x42; |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
28 |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
29 JNIEXPORT jint JNICALL Java_TestDirtyInt_test(JNIEnv* env, jclass jclazz, jint v) |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
30 { |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
31 int* ptr = &array + v + 4; |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
32 return *ptr; |
16aa1f621ec6
8148353: [linux-sparc] Crash in libawt.so on Linux SPARC
roland
parents:
diff
changeset
|
33 } |