diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 34 |
2 files changed, 37 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7c3c582..8789fe8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-08-19 Yao Qi <yao@codesourcery.com> + + * arm-tdep.c (arm_vfp_cprc_sub_candidate): Handle _Complex + types. + 2014-08-19 Alan Modra <amodra@gmail.com> * acinclude.m4 (GDB_AC_CHECK_BFD): Don't add -ldl. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index b746eee..db97fed 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -3562,8 +3562,8 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc_base_type b) classified from *BASE_TYPE, or two types differently classified from each other, return -1, otherwise return the total number of base-type elements found (possibly 0 in an empty structure or - array). Vectors and complex types are not currently supported, - matching the generic AAPCS support. */ + array). Vector types are not currently supported, matching the + generic AAPCS support. */ static int arm_vfp_cprc_sub_candidate (struct type *t, @@ -3594,6 +3594,36 @@ arm_vfp_cprc_sub_candidate (struct type *t, } break; + case TYPE_CODE_COMPLEX: + /* Arguments of complex T where T is one of the types float or + double get treated as if they are implemented as: + + struct complexT + { + T real; + T imag; + }; */ + switch (TYPE_LENGTH (t)) + { + case 8: + if (*base_type == VFP_CPRC_UNKNOWN) + *base_type = VFP_CPRC_SINGLE; + else if (*base_type != VFP_CPRC_SINGLE) + return -1; + return 2; + + case 16: + if (*base_type == VFP_CPRC_UNKNOWN) + *base_type = VFP_CPRC_DOUBLE; + else if (*base_type != VFP_CPRC_DOUBLE) + return -1; + return 2; + + default: + return -1; + } + break; + case TYPE_CODE_ARRAY: { int count; |