Mercurial > hg > graal-jvmci-8
diff src/gpu/hsail/vm/hsailKernelArguments.hpp @ 12783:89fbf495e589
HSAIL: fix some assert logic in the argument-gathering code that shows up in non-product builds
Contributed-by: Tom Deneau <tom.deneau@amd.com>
Summary:
* computes parameter_count based on signature and uses that and parameter_index (set by the SignatureIterator) to tell if we are on the last parameter, which requires special handling whether it is an int or an object.
* if signature says last parameter is an Object, checks that the real passed in parameter is an Object Array, but for non last-parameters, lets objects go thru.
* if signature says last parameter is an int, nothing is pushed (no change to this logic)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 20 Nov 2013 01:11:10 +0100 |
parents | f1a55428a8d7 |
children | 51584f76462d |
line wrap: on
line diff
--- a/src/gpu/hsail/vm/hsailKernelArguments.hpp Tue Nov 19 17:44:26 2013 +0100 +++ b/src/gpu/hsail/vm/hsailKernelArguments.hpp Wed Nov 20 01:11:10 2013 +0100 @@ -42,6 +42,8 @@ int _index; // Kernel to push into address _kernel; + // number of parameters in the signature + int _parameter_count; bool _is_static; @@ -55,8 +57,10 @@ _args = args; _kernel = kernel; _is_static = is_static; - + _length = args->length(); + _parameter_count = ArgumentCount(signature).size(); + if (TraceGPUInteraction) { tty->print_cr("[HSAIL] sig:%s args length=%d", signature->as_C_string(), _length); }