diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2011-11-16 18:30:09 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2011-11-16 18:30:09 +0000 |
commit | 7dfa3c3e7c9b162f146df8082fa6281eb33d3c84 (patch) | |
tree | 7295b3ca4380f571e8a2fbac918a5e6880298aef /gdb/spu-tdep.c | |
parent | 6326db22e3851acf0e60d279ef889d8d77111267 (diff) | |
download | gdb-7dfa3c3e7c9b162f146df8082fa6281eb33d3c84.tar.gz |
* spu-tdep.c (spu_return_value): Fix handling of
TYPE_CALLING_CONVENTION annotation.
Diffstat (limited to 'gdb/spu-tdep.c')
-rw-r--r-- | gdb/spu-tdep.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index d42d94b1e9c..080bed0cf3b 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -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; |