From: Nick Clifton Date: Mon, 17 Mar 2014 16:30:30 +0000 (+0000) Subject: Add support for parsing VFP register names in .cfi_offset directives. X-Git-Tag: gdb-7.8-release~806 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f5afe1cc03bb2cd50b75a21d491a349d7011ea1;p=external%2Fbinutils.git Add support for parsing VFP register names in .cfi_offset directives. PR gas/16694 * config/tc-arm.c (tc_arm_regname_to_dw2regnum): Parse VFP registers as well. * gas/cfi/cfi-arm-1.s: Add checks of VFP registers. * gas/cfi/cfi-arm-1.d: Update expected output. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index d3d92ac..1d27b7e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2014-03-17 Nick Clifton + + PR gas/16694 + * config/tc-arm.c (tc_arm_regname_to_dw2regnum): Parse VFP + registers as well. + 2014-03-13 Richard Earnshaw Jiong Wang diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index b3c974b..bdcfb5c 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -4134,15 +4134,24 @@ s_arm_unwind_save (int arch_v6) s_arm_unwind_save_fpa (reg->number); return; - case REG_TYPE_RN: s_arm_unwind_save_core (); return; + case REG_TYPE_RN: + s_arm_unwind_save_core (); + return; + case REG_TYPE_VFD: if (arch_v6) s_arm_unwind_save_vfp_armv6 (); else s_arm_unwind_save_vfp (); return; - case REG_TYPE_MMXWR: s_arm_unwind_save_mmxwr (); return; - case REG_TYPE_MMXWCG: s_arm_unwind_save_mmxwcg (); return; + + case REG_TYPE_MMXWR: + s_arm_unwind_save_mmxwr (); + return; + + case REG_TYPE_MMXWCG: + s_arm_unwind_save_mmxwcg (); + return; default: as_bad (_(".unwind_save does not support this kind of register")); @@ -21019,11 +21028,19 @@ int tc_arm_regname_to_dw2regnum (char *regname) { int reg = arm_reg_parse (®name, REG_TYPE_RN); + if (reg != FAIL) + return reg; - if (reg == FAIL) - return -1; + /* PR 16694: Allow VFP registers as well. */ + reg = arm_reg_parse (®name, REG_TYPE_VFS); + if (reg != FAIL) + return 64 + reg; - return reg; + reg = arm_reg_parse (®name, REG_TYPE_VFD); + if (reg != FAIL) + return reg + 256; + + return -1; } #ifdef TE_PE diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 293628b..4863e61 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-03-17 Nick Clifton + + PR gas/16694 + * gas/cfi/cfi-arm-1.s: Add checks of VFP registers. + * gas/cfi/cfi-arm-1.d: Update expected output. + 2014-03-13 Nick Clifton * gas/aarch64/litpool.s: Make the test endian agnostic. diff --git a/gas/testsuite/gas/cfi/cfi-arm-1.d b/gas/testsuite/gas/cfi/cfi-arm-1.d index 8987a7c..0d831e0 100644 --- a/gas/testsuite/gas/cfi/cfi-arm-1.d +++ b/gas/testsuite/gas/cfi/cfi-arm-1.d @@ -13,7 +13,7 @@ Contents of the .eh_frame section: DW_CFA_def_cfa: r13 ofs 0 -00000014 0+0020 0+0018 FDE cie=0+0000 pc=0+0000..0+0018 +00000014 0+002c 0+0018 FDE cie=0+0000 pc=0+0000..0+0018 DW_CFA_advance_loc: 4 to 00000004 DW_CFA_def_cfa: r12 ofs 0 DW_CFA_advance_loc: 4 to 00000008 @@ -24,4 +24,9 @@ Contents of the .eh_frame section: DW_CFA_offset: r14 at cfa-24 DW_CFA_advance_loc: 4 to 00000010 DW_CFA_def_cfa: r11 ofs 16 - + DW_CFA_advance_loc: 4 to 00000014 + DW_CFA_offset: r1 at cfa-16 + DW_CFA_offset_extended: r65 at cfa-20 + DW_CFA_offset_extended: r267 at cfa-48 + DW_CFA_nop + DW_CFA_nop diff --git a/gas/testsuite/gas/cfi/cfi-arm-1.s b/gas/testsuite/gas/cfi/cfi-arm-1.s index 8c9d917..d962442 100644 --- a/gas/testsuite/gas/cfi/cfi-arm-1.s +++ b/gas/testsuite/gas/cfi/cfi-arm-1.s @@ -18,6 +18,12 @@ foo: sub fp, ip, #20 .cfi_def_cfa fp, 16 nop + + # Test fix for PR 16694 - the use of VFP registers in .cfi_offset directives. + .cfi_offset r1, -16 + .cfi_offset s1, -20 + .cfi_offset d11, -48 + ldmea fp, {fp, sp, pc} .cfi_endproc .size foo, .-foo