Mercurial > hg > truffle
annotate src/gpu/hsail/vm/hsailArgumentsBase.cpp @ 18429:79268cfc256a
StackSlot is no longer a VirtualStackSlot (rename ForwardingFrameMapBuilder to DelayedFrameMapBuilder).
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 05 Nov 2014 19:18:35 +0100 |
parents | f55f2d400797 |
children |
rev | line source |
---|---|
14768
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
1 /* |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 * |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 * |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
14 * |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 * |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
21 * questions. |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
22 * |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
23 */ |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
25 #include "precompiled.hpp" |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
26 #include "hsailArgumentsBase.hpp" |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
27 #include "runtime/javaCalls.hpp" |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
28 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
29 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
30 // Get next java argument |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
31 oop HSAILArgumentsBase::next_arg(BasicType expectedType) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
32 assert(_index < _args->length(), "out of bounds"); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
33 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
34 oop arg = ((objArrayOop) (_args))->obj_at(_index++); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
35 assert(expectedType == T_OBJECT || |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
36 java_lang_boxing_object::is_instance(arg, expectedType), "arg type mismatch"); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
37 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
38 return arg; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
39 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
40 |
16119
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
41 void HSAILArgumentsBase::collectArgs() { |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
42 if (TraceGPUInteraction) { |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
43 tty->print_cr("[HSAIL] %s::collectArgs, sig:%s args length=%d", argsBuilderName(), _signature->as_C_string(), _length); |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
44 } |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
45 if (!_is_static) { |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
46 // First object in args should be 'this' |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
47 oop arg = _args->obj_at(_index++); |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
48 assert(arg->is_instance() && (!arg->is_array()), "First arg should be 'this'"); |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
49 if (TraceGPUInteraction) { |
18043
f55f2d400797
Fix some format strings
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16119
diff
changeset
|
50 tty->print_cr("[HSAIL] %s, instance method, this " INTPTR_FORMAT ", is a %s", argsBuilderName(), p2i(arg), arg->klass()->external_name()); |
16119
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
51 } |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
52 pushObject(arg); |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
53 } else { |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
54 if (TraceGPUInteraction) { |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
55 tty->print_cr("[HSAIL] %s, static method", argsBuilderName()); |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
56 } |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
57 } |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
58 // Iterate over the entire signature |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
59 iterate(); |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
60 |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
61 pushTrailingArgs(); |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
62 } |
310994c667a7
HSAIL: support offloading some IntStream.reduce() operations to HSA
Doug Simon <doug.simon@oracle.com>
parents:
14768
diff
changeset
|
63 |
14768
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
64 void HSAILArgumentsBase::do_bool() { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
65 // Get the boxed value |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
66 oop arg = _args->obj_at(_index++); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
67 assert(java_lang_boxing_object::is_instance(arg, T_BOOLEAN), "arg type mismatch"); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
68 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
69 jvalue jValue; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
70 java_lang_boxing_object::get_value(arg, &jValue); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
71 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
72 pushBool(jValue.z); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
73 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
74 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
75 void HSAILArgumentsBase::do_byte() { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
76 // Get the boxed value |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
77 oop arg = _args->obj_at(_index++); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
78 assert(java_lang_boxing_object::is_instance(arg, T_BYTE), "arg type mismatch"); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
79 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
80 jvalue jValue; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
81 java_lang_boxing_object::get_value(arg, &jValue); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
82 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
83 pushByte(jValue.b); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
84 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
85 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
86 void HSAILArgumentsBase::do_double() { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
87 // Get the boxed value |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
88 oop arg = _args->obj_at(_index++); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
89 assert(java_lang_boxing_object::is_instance(arg, T_DOUBLE), "arg type mismatch"); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
90 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
91 jvalue jValue; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
92 java_lang_boxing_object::get_value(arg, &jValue); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
93 if (TraceGPUInteraction) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
94 tty->print_cr("[HSAIL] %s::do_double, _index=%d, value = %e", argsBuilderName(), _index - 1, jValue.d); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
95 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
96 pushDouble(jValue.d); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
97 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
98 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
99 void HSAILArgumentsBase::do_float() { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
100 // Get the boxed value |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
101 oop arg = _args->obj_at(_index++); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
102 assert(java_lang_boxing_object::is_instance(arg, T_FLOAT), "arg type mismatch"); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
103 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
104 jvalue jValue; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
105 java_lang_boxing_object::get_value(arg, &jValue); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
106 if (TraceGPUInteraction) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
107 tty->print_cr("[HSAIL] %s::do_float, _index=%d, value = %f", argsBuilderName(), _index - 1, jValue.f); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
108 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
109 pushFloat(jValue.f); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
110 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
111 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
112 void HSAILArgumentsBase::do_int() { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
113 // If the last parameter is an int, it is handled in a special way |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
114 // For kernel arguments we don't pass it since we use the HSAIL workitemid in place of that int value |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
115 // For javaCall arguments we pass the actual workitemid |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
116 if (isLastParameter()) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
117 handleFinalIntParameter(); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
118 return; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
119 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
120 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
121 // not the final int parameter, Get the boxed int |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
122 oop arg = _args->obj_at(_index++); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
123 assert(java_lang_boxing_object::is_instance(arg, T_INT), "arg type mismatch"); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
124 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
125 jvalue jValue; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
126 java_lang_boxing_object::get_value(arg, &jValue); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
127 if (TraceGPUInteraction) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
128 tty->print_cr("[HSAIL] %s::do_int, _index=%d, value = %d", argsBuilderName(), _index - 1, jValue.i); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
129 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
130 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
131 pushInt(jValue.i); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
132 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
133 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
134 void HSAILArgumentsBase::do_long() { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
135 // Get the boxed value |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
136 oop arg = _args->obj_at(_index++); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
137 assert(java_lang_boxing_object::is_instance(arg, T_LONG), "arg type mismatch"); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
138 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
139 jvalue jValue; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
140 java_lang_boxing_object::get_value(arg, &jValue); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
141 if (TraceGPUInteraction) { |
18043
f55f2d400797
Fix some format strings
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16119
diff
changeset
|
142 tty->print_cr("[HSAIL] %s::do_long, _index=%d, value = " JLONG_FORMAT, argsBuilderName(), _index - 1, jValue.j); |
14768
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
143 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
144 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
145 pushLong(jValue.j); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
146 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
147 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
148 void HSAILArgumentsBase::do_array(int begin, int end) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
149 oop arg = _args->obj_at(_index++); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
150 if (arg == NULL) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
151 recordNullObjectParameter(); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
152 } else { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
153 assert(arg->is_array(), "arg type mismatch"); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
154 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
155 if (TraceGPUInteraction) { |
18043
f55f2d400797
Fix some format strings
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16119
diff
changeset
|
156 tty->print_cr("[HSAIL] %s::do_array, _index=%d, 0x" INTPTR_FORMAT ", is a %s", argsBuilderName(), _index - 1, p2i(arg), |
14768
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
157 arg == NULL ? "null" : arg->klass()->external_name()); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
158 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
159 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
160 pushObject(arg); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
161 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
162 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
163 void HSAILArgumentsBase::do_object() { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
164 bool isLastParam = isLastParameter(); // determine this before incrementing _index |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
165 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
166 oop arg = _args->obj_at(_index++); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
167 if (TraceGPUInteraction) { |
18043
f55f2d400797
Fix some format strings
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16119
diff
changeset
|
168 tty->print_cr("[HSAIL] %s::do_object, _index=%d, 0x" INTPTR_FORMAT " is a %s", argsBuilderName(), _index - 1, p2i(arg), |
14768
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
169 arg == NULL ? "null" : arg->klass()->external_name()); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
170 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
171 if (arg == NULL) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
172 recordNullObjectParameter(); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
173 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
174 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
175 // check if this is last arg in signature |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
176 // an object as last parameter requires special handling |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
177 if (isLastParam) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
178 if (TraceGPUInteraction) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
179 tty->print_cr("[HSAIL] %s, trailing object ref should be object source array ref", argsBuilderName()); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
180 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
181 assert(arg->is_objArray(), "arg type mismatch"); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
182 handleFinalObjParameter(arg); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
183 } else { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
184 // not the final parameter, just push |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
185 pushObject(arg); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
186 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
187 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
188 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
189 void HSAILArgumentsBase::do_object(int begin, int end) { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
190 do_object(); |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
191 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
192 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
193 void HSAILArgumentsBase::do_void() { |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
194 return; |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
195 } |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
196 |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
197 // TODO implement other do_* |
3e9a960f0da1
HSAIL: preliminary deopt support
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
198 |