diff options
author | Paul Brook <paul@codesourcery.com> | 2004-01-09 11:53:16 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2004-01-09 11:53:16 +0000 |
commit | e45d06306f80add6fd1b118833c03a46ee004872 (patch) | |
tree | f67d21e3d7f855eab77ce631893a6b80907253da /gas/config | |
parent | 041ab88cf047ecfa2c5c7421ab3976c9dcb6646a (diff) | |
download | gdb-e45d06306f80add6fd1b118833c03a46ee004872.zip gdb-e45d06306f80add6fd1b118833c03a46ee004872.tar.gz gdb-e45d06306f80add6fd1b118833c03a46ee004872.tar.bz2 |
* gas/config/tc-arm.c (do_vfp_reg2_from_sp2): Rename from
do_vfp_sp_reg2.
(do_vfp_sp2_from_reg2): New function.
(insns): Use them.
(do_vfp_dp_from_reg2): Check return values properly.
* opcodes/arm-opc.h (arm_opcodes): Move generic mcrr after known
specific opcodes.
* gas/testsuite/gas/arm/vfp2.s, gas/arm/vfp2.d: New test.
* gas/testsuite/gas/arm/arm.exp: Add them.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-arm.c | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 74e1537..c290a92 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -929,7 +929,8 @@ static void do_vfp_sp_dyadic PARAMS ((char *)); static void do_vfp_dp_dyadic PARAMS ((char *)); static void do_vfp_reg_from_sp PARAMS ((char *)); static void do_vfp_sp_from_reg PARAMS ((char *)); -static void do_vfp_sp_reg2 PARAMS ((char *)); +static void do_vfp_reg2_from_sp2 PARAMS ((char *)); +static void do_vfp_sp2_from_reg2 PARAMS ((char *)); static void do_vfp_reg_from_dp PARAMS ((char *)); static void do_vfp_reg2_from_dp PARAMS ((char *)); static void do_vfp_dp_from_reg PARAMS ((char *)); @@ -1976,8 +1977,8 @@ static const struct asm_opcode insns[] = {"fcmpezd", 0xeeb50bc0, 7, FPU_VFP_EXT_V1, do_vfp_dp_compare_z}, /* VFP V2. */ - {"fmsrr", 0xec400a10, 5, FPU_VFP_EXT_V2, do_vfp_sp_reg2}, - {"fmrrs", 0xec500a10, 5, FPU_VFP_EXT_V2, do_vfp_sp_reg2}, + {"fmsrr", 0xec400a10, 5, FPU_VFP_EXT_V2, do_vfp_sp2_from_reg2}, + {"fmrrs", 0xec500a10, 5, FPU_VFP_EXT_V2, do_vfp_reg2_from_sp2}, {"fmdrr", 0xec400b10, 5, FPU_VFP_EXT_V2, do_vfp_dp_from_reg2}, {"fmrrd", 0xec500b10, 5, FPU_VFP_EXT_V2, do_vfp_reg2_from_dp}, @@ -8954,15 +8955,13 @@ do_vfp_reg_from_sp (str) } static void -do_vfp_sp_reg2 (str) +do_vfp_reg2_from_sp2 (str) char *str; { skip_whitespace (str); - if (reg_required_here (&str, 12) == FAIL) - return; - - if (skip_past_comma (&str) == FAIL + if (reg_required_here (&str, 12) == FAIL + || skip_past_comma (&str) == FAIL || reg_required_here (&str, 16) == FAIL || skip_past_comma (&str) == FAIL) { @@ -9002,6 +9001,32 @@ do_vfp_sp_from_reg (str) } static void +do_vfp_sp2_from_reg2 (str) + char *str; +{ + skip_whitespace (str); + + /* We require exactly two consecutive SP registers. */ + if (vfp_sp_reg_list (&str, VFP_REG_Sm) != 2) + { + if (! inst.error) + inst.error = _("only two consecutive VFP SP registers allowed here"); + } + + if (skip_past_comma (&str) == FAIL + || reg_required_here (&str, 12) == FAIL + || skip_past_comma (&str) == FAIL + || reg_required_here (&str, 16) == FAIL) + { + if (! inst.error) + inst.error = BAD_ARGS; + return; + } + + end_of_line (str); +} + +static void do_vfp_reg_from_dp (str) char *str; { @@ -9075,7 +9100,7 @@ do_vfp_dp_from_reg2 (str) if (skip_past_comma (&str) == FAIL || reg_required_here (&str, 12) == FAIL || skip_past_comma (&str) == FAIL - || reg_required_here (&str, 16)) + || reg_required_here (&str, 16) == FAIL) { if (! inst.error) inst.error = BAD_ARGS; |