Mercurial > hg > graal-compiler
annotate src/share/vm/c1x/c1x_VMEntries.cpp @ 1412:9195b99c841b
Added first VM entry method.
TODO: Check why initialization method of compiler is not called. Register native methods only once.
author | Thomas Wuerthinger <thomas.wuerthinger@gmail.com> |
---|---|
date | Mon, 17 May 2010 16:37:23 +0200 |
parents | b30a2cd5e3a2 |
children | 1ecc8f0aad00 |
rev | line source |
---|---|
1410
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
1 /* |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
2 * Copyright 2000-2010 Sun Microsystems, Inc. All Rights Reserved. |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
4 * |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
7 * published by the Free Software Foundation. |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
8 * |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
13 * accompanied this code). |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
14 * |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
18 * |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
20 * CA 95054 USA or visit www.sun.com if you need additional information or |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
21 * have any questions. |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
22 * |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
23 */ |
b30a2cd5e3a2
Added methods to c1x_VMExits.cpp
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1406
diff
changeset
|
24 |
1406
35069ca331f2
Hooked C1XCompiler class into the system.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
25 |
35069ca331f2
Hooked C1XCompiler class into the system.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
diff
changeset
|
26 # include "incls/_precompiled.incl" |
1412
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
27 # include "incls/_c1x_VMEntries.cpp.incl" |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
28 |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
29 JNIEXPORT jbyteArray JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1code |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
30 (JNIEnv *, jclass, jobject) { |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
31 tty->print_cr("hello world"); |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
32 return NULL; |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
33 } |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
34 |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
35 |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
36 JNINativeMethod VMEntries_methods[] = { |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
37 {CC"RiMethod_code", CC"(Ljava/lang/Object;)[B", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1code)} |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
38 }; |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
39 |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
40 int VMEntries_methods_count() { |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
41 return sizeof(VMEntries_methods) / sizeof(JNINativeMethod); |
9195b99c841b
Added first VM entry method.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
1410
diff
changeset
|
42 } |