Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalRuntime.cpp @ 19009:9c2396ef02db
removed leftover GPU support code
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 28 Jan 2015 15:01:21 +0100 |
parents | afa70d3e8159 |
children | 7366593c0610 |
comparison
equal
deleted
inserted
replaced
19008:f1b9a421ebd8 | 19009:9c2396ef02db |
---|---|
36 #include "runtime/interfaceSupport.hpp" | 36 #include "runtime/interfaceSupport.hpp" |
37 #include "runtime/arguments.hpp" | 37 #include "runtime/arguments.hpp" |
38 #include "runtime/reflection.hpp" | 38 #include "runtime/reflection.hpp" |
39 #include "utilities/debug.hpp" | 39 #include "utilities/debug.hpp" |
40 | 40 |
41 address GraalRuntime::_external_deopt_i2c_entry = NULL; | |
42 jobject GraalRuntime::_HotSpotGraalRuntime_instance = NULL; | 41 jobject GraalRuntime::_HotSpotGraalRuntime_instance = NULL; |
43 bool GraalRuntime::_HotSpotGraalRuntime_initialized = false; | 42 bool GraalRuntime::_HotSpotGraalRuntime_initialized = false; |
44 bool GraalRuntime::_shutdown_called = false; | 43 bool GraalRuntime::_shutdown_called = false; |
45 | 44 |
46 void GraalRuntime::initialize_natives(JNIEnv *env, jclass c2vmClass) { | 45 void GraalRuntime::initialize_natives(JNIEnv *env, jclass c2vmClass) { |
57 | 56 |
58 ResourceMark rm; | 57 ResourceMark rm; |
59 HandleMark hm; | 58 HandleMark hm; |
60 | 59 |
61 graal_compute_offsets(); | 60 graal_compute_offsets(); |
62 | |
63 #ifdef TARGET_ARCH_x86 | |
64 #ifdef _LP64 | |
65 // Only supported on x86_64 for now | |
66 _external_deopt_i2c_entry = create_external_deopt_i2c(); | |
67 #endif | |
68 #endif | |
69 | 61 |
70 // Ensure _non_oop_bits is initialized | 62 // Ensure _non_oop_bits is initialized |
71 Universe::non_oop_word(); | 63 Universe::non_oop_word(); |
72 | 64 |
73 env->RegisterNatives(c2vmClass, CompilerToVM_methods, CompilerToVM_methods_count()); | 65 env->RegisterNatives(c2vmClass, CompilerToVM_methods, CompilerToVM_methods_count()); |
85 if (buffer_blob != NULL) { | 77 if (buffer_blob != NULL) { |
86 THREAD->set_buffer_blob(buffer_blob); | 78 THREAD->set_buffer_blob(buffer_blob); |
87 } | 79 } |
88 } | 80 } |
89 return buffer_blob; | 81 return buffer_blob; |
90 } | |
91 | |
92 address GraalRuntime::create_external_deopt_i2c() { | |
93 ResourceMark rm; | |
94 BufferBlob* buffer = BufferBlob::create("externalDeopt", 1*K); | |
95 CodeBuffer cb(buffer); | |
96 short buffer_locs[20]; | |
97 cb.insts()->initialize_shared_locs((relocInfo*)buffer_locs, sizeof(buffer_locs)/sizeof(relocInfo)); | |
98 MacroAssembler masm(&cb); | |
99 | |
100 int total_args_passed = 6; | |
101 | |
102 BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, total_args_passed); | |
103 VMRegPair* regs = NEW_RESOURCE_ARRAY(VMRegPair, total_args_passed); | |
104 int i = 0; | |
105 sig_bt[i++] = T_INT; | |
106 sig_bt[i++] = T_LONG; | |
107 sig_bt[i++] = T_VOID; // long stakes 2 slots | |
108 sig_bt[i++] = T_INT; | |
109 sig_bt[i++] = T_OBJECT; | |
110 sig_bt[i++] = T_INT; // The number of actual arguments passed to the method. | |
111 | |
112 int comp_args_on_stack = SharedRuntime::java_calling_convention(sig_bt, regs, total_args_passed, false); | |
113 | |
114 SharedRuntime::gen_i2c_adapter(&masm, total_args_passed, comp_args_on_stack, sig_bt, regs, total_args_passed - 1); | |
115 masm.flush(); | |
116 | |
117 AdapterBlob* adapter = AdapterBlob::create(&cb); | |
118 if (PrintAdapterHandlers) { | |
119 tty->print_cr("Decoding external_deopt_i2c"); | |
120 Disassembler::decode(adapter->code_begin(), adapter->code_end()); | |
121 } | |
122 return adapter->code_begin(); | |
123 } | 82 } |
124 | 83 |
125 BasicType GraalRuntime::kindToBasicType(jchar ch) { | 84 BasicType GraalRuntime::kindToBasicType(jchar ch) { |
126 switch(ch) { | 85 switch(ch) { |
127 case 'z': return T_BOOLEAN; | 86 case 'z': return T_BOOLEAN; |