* spu-tdep.c (spu_return_value): Fix handling of

TYPE_CALLING_CONVENTION annotation.
This commit is contained in:
Ulrich Weigand 2011-11-16 18:30:09 +00:00
parent caf4328c57
commit 598cfb7174
2 changed files with 18 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2011-11-16 Ulrich Weigand <uweigand@de.ibm.com>
* spu-tdep.c (spu_return_value): Fix handling of
TYPE_CALLING_CONVENTION annotation.
2011-11-16 Ulrich Weigand <uweigand@de.ibm.com>
* skip.c (skip_function_command): Work around uninitialized

View File

@ -1458,11 +1458,19 @@ spu_return_value (struct gdbarch *gdbarch, struct type *func_type,
enum return_value_convention rvc;
int opencl_vector = 0;
if (func_type
&& TYPE_CALLING_CONVENTION (func_type) == DW_CC_GDB_IBM_OpenCL
&& TYPE_CODE (type) == TYPE_CODE_ARRAY
&& TYPE_VECTOR (type))
opencl_vector = 1;
if (func_type)
{
func_type = check_typedef (func_type);
if (TYPE_CODE (func_type) == TYPE_CODE_PTR)
func_type = check_typedef (TYPE_TARGET_TYPE (func_type));
if (TYPE_CODE (func_type) == TYPE_CODE_FUNC
&& TYPE_CALLING_CONVENTION (func_type) == DW_CC_GDB_IBM_OpenCL
&& TYPE_CODE (type) == TYPE_CODE_ARRAY
&& TYPE_VECTOR (type))
opencl_vector = 1;
}
if (TYPE_LENGTH (type) <= (SPU_ARGN_REGNUM - SPU_ARG1_REGNUM + 1) * 16)
rvc = RETURN_VALUE_REGISTER_CONVENTION;