From: Kyrylo Tkachov Date: Tue, 9 Sep 2014 11:29:21 +0000 (+0000) Subject: [ARM][7/7] Convert FP mnemonics to UAL | f{ld,st}m -> v{ld,st}m X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b27832edcf1a344c9e2ba94c68b0ceef2d141f7b;p=gcc.git [ARM][7/7] Convert FP mnemonics to UAL | f{ld,st}m -> v{ld,st}m * config/arm/arm.md (vfp_pop_multiple_with_writeback): Use vldm mnemonic instead of fldmfdd. * config/arm/arm.c (vfp_output_fstmd): Rename to... (vfp_output_vstmd): ... This. Convert output to UAL syntax. Output vpush when address register is SP. * config/arm/arm-protos.h (vfp_output_fstmd): Rename to... (vfp_output_vstmd): ... This. * config/arm/vfp.md (push_multi_vfp): Update call to vfp_output_vstmd. From-SVN: r215056 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 75c1dd3973f..be964cbcfce 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2014-09-09 Kyrylo Tkachov + + * config/arm/arm.md (vfp_pop_multiple_with_writeback): Use vldm + mnemonic instead of fldmfdd. + * config/arm/arm.c (vfp_output_fstmd): Rename to... + (vfp_output_vstmd): ... This. Convert output to UAL syntax. + Output vpush when address register is SP. + * config/arm/arm-protos.h (vfp_output_fstmd): Rename to... + (vfp_output_vstmd): ... This. + * config/arm/vfp.md (push_multi_vfp): Update call to + vfp_output_vstmd. + 2014-09-09 Kyrylo Tkachov * config/arm/vfp.md (*movcc_vfp): Use UAL syntax. diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h index 0878ab40e6d..61d7f9d2372 100644 --- a/gcc/config/arm/arm-protos.h +++ b/gcc/config/arm/arm-protos.h @@ -149,7 +149,7 @@ extern bool arm_is_long_call_p (tree); extern int arm_emit_vector_const (FILE *, rtx); extern void arm_emit_fp16_const (rtx c); extern const char * arm_output_load_gr (rtx *); -extern const char *vfp_output_fstmd (rtx *); +extern const char *vfp_output_vstmd (rtx *); extern void arm_output_multireg_pop (rtx *, bool, rtx, bool, bool); extern void arm_set_return_address (rtx, rtx); extern int arm_eliminable_register (rtx); diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 06b1b6f39b4..d75ca4293ed 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -17630,14 +17630,22 @@ arm_output_multireg_pop (rtx *operands, bool return_pc, rtx cond, bool reverse, /* Output the assembly for a store multiple. */ const char * -vfp_output_fstmd (rtx * operands) +vfp_output_vstmd (rtx * operands) { char pattern[100]; int p; int base; int i; + rtx addr_reg = REG_P (XEXP (operands[0], 0)) + ? XEXP (operands[0], 0) + : XEXP (XEXP (operands[0], 0), 0); + bool push_p = REGNO (addr_reg) == SP_REGNUM; + + if (push_p) + strcpy (pattern, "vpush%?.64\t{%P1"); + else + strcpy (pattern, "vstmdb%?.64\t%m0!, {%P1"); - strcpy (pattern, "fstmfdd%?\t%m0!, {%P1"); p = strlen (pattern); gcc_assert (REG_P (operands[1])); diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 0e43dd21bff..53235749098 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -10528,7 +10528,7 @@ int num_regs = XVECLEN (operands[0], 0); char pattern[100]; rtx op_list[2]; - strcpy (pattern, \"fldmfdd\\t\"); + strcpy (pattern, \"vldm\\t\"); strcat (pattern, reg_names[REGNO (SET_DEST (XVECEXP (operands[0], 0, 0)))]); strcat (pattern, \"!, {\"); op_list[0] = XEXP (XVECEXP (operands[0], 0, 1), 0); diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md index 06c057fdfc0..a2034498518 100644 --- a/gcc/config/arm/vfp.md +++ b/gcc/config/arm/vfp.md @@ -1285,7 +1285,7 @@ (unspec:BLK [(match_operand:DF 1 "vfp_register_operand" "")] UNSPEC_PUSH_MULT))])] "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP" - "* return vfp_output_fstmd (operands);" + "* return vfp_output_vstmd (operands);" [(set_attr "type" "f_stored")] )