diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1670683f9e8..c00a9553d0b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,29 @@ +2014-01-23 James Greenhalgh + + * config/aarch64/aarch64-simd.md + (aarch64_dup_lane): Correct lane number on big-endian. + (aarch64_dup_lane_): Likewise. + (*aarch64_mul3_elt): Likewise. + (*aarch64_mul3_elt): Likewise. + (*aarch64_mul3_elt_to_64v2df): Likewise. + (*aarch64_mla_elt): Likewise. + (*aarch64_mla_elt_): Likewise. + (*aarch64_mls_elt): Likewise. + (*aarch64_mls_elt_): Likewise. + (*aarch64_fma4_elt): Likewise. + (*aarch64_fma4_elt_): Likewise. + (*aarch64_fma4_elt_to_64v2df): Likewise. + (*aarch64_fnma4_elt): Likewise. + (*aarch64_fnma4_elt_): Likewise. + (*aarch64_fnma4_elt_to_64v2df): Likewise. + (aarch64_sqdmulh_lane): Likewise. + (aarch64_sqdmulh_laneq): Likewise. + (aarch64_sqdmll_lane_internal): Likewise. + (aarch64_sqdmll_lane_internal): Likewise. + (aarch64_sqdmll2_lane_internal): Likewise. + (aarch64_sqdmull_lane_internal): Likewise. + (aarch64_sqdmull2_lane_internal): Likewise. + 2013-01-23 Alex Velenko * config/aarch64/aarch64-simd.md diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index 14eb7d08d15..680b9434140 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -67,7 +67,10 @@ (parallel [(match_operand:SI 2 "immediate_operand" "i")]) )))] "TARGET_SIMD" - "dup\\t%0., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[2]))); + return "dup\\t%0., %1.[%2]"; + } [(set_attr "type" "neon_dup")] ) @@ -79,7 +82,11 @@ (parallel [(match_operand:SI 2 "immediate_operand" "i")]) )))] "TARGET_SIMD" - "dup\\t%0., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, + INTVAL (operands[2]))); + return "dup\\t%0., %1.[%2]"; + } [(set_attr "type" "neon_dup")] ) @@ -288,7 +295,10 @@ (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VMUL 3 "register_operand" "w")))] "TARGET_SIMD" - "mul\\t%0., %3., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[2]))); + return "mul\\t%0., %3., %1.[%2]"; + } [(set_attr "type" "neon_mul__scalar")] ) @@ -301,7 +311,11 @@ (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VMUL_CHANGE_NLANES 3 "register_operand" "w")))] "TARGET_SIMD" - "mul\\t%0., %3., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, + INTVAL (operands[2]))); + return "mul\\t%0., %3., %1.[%2]"; + } [(set_attr "type" "neon_mul__scalar")] ) @@ -324,7 +338,10 @@ (parallel [(match_operand:SI 2 "immediate_operand")])) (match_operand:DF 3 "register_operand" "w")))] "TARGET_SIMD" - "fmul\\t%0.2d, %3.2d, %1.d[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (V2DFmode, INTVAL (operands[2]))); + return "fmul\\t%0.2d, %3.2d, %1.d[%2]"; + } [(set_attr "type" "neon_fp_mul_d_scalar_q")] ) @@ -783,7 +800,10 @@ (match_operand:VDQHS 3 "register_operand" "w")) (match_operand:VDQHS 4 "register_operand" "0")))] "TARGET_SIMD" - "mla\t%0., %3., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[2]))); + return "mla\t%0., %3., %1.[%2]"; + } [(set_attr "type" "neon_mla__scalar")] ) @@ -798,7 +818,11 @@ (match_operand:VDQHS 3 "register_operand" "w")) (match_operand:VDQHS 4 "register_operand" "0")))] "TARGET_SIMD" - "mla\t%0., %3., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, + INTVAL (operands[2]))); + return "mla\t%0., %3., %1.[%2]"; + } [(set_attr "type" "neon_mla__scalar")] ) @@ -823,7 +847,10 @@ (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQHS 3 "register_operand" "w"))))] "TARGET_SIMD" - "mls\t%0., %3., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[2]))); + return "mls\t%0., %3., %1.[%2]"; + } [(set_attr "type" "neon_mla__scalar")] ) @@ -838,7 +865,11 @@ (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQHS 3 "register_operand" "w"))))] "TARGET_SIMD" - "mls\t%0., %3., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, + INTVAL (operands[2]))); + return "mls\t%0., %3., %1.[%2]"; + } [(set_attr "type" "neon_mla__scalar")] ) @@ -1237,7 +1268,10 @@ (match_operand:VDQF 3 "register_operand" "w") (match_operand:VDQF 4 "register_operand" "0")))] "TARGET_SIMD" - "fmla\\t%0., %3., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[2]))); + return "fmla\\t%0., %3., %1.[%2]"; + } [(set_attr "type" "neon_fp_mla__scalar")] ) @@ -1251,7 +1285,11 @@ (match_operand:VDQSF 3 "register_operand" "w") (match_operand:VDQSF 4 "register_operand" "0")))] "TARGET_SIMD" - "fmla\\t%0., %3., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, + INTVAL (operands[2]))); + return "fmla\\t%0., %3., %1.[%2]"; + } [(set_attr "type" "neon_fp_mla__scalar")] ) @@ -1276,7 +1314,10 @@ (match_operand:DF 3 "register_operand" "w") (match_operand:DF 4 "register_operand" "0")))] "TARGET_SIMD" - "fmla\\t%0.2d, %3.2d, %1.2d[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (V2DFmode, INTVAL (operands[2]))); + return "fmla\\t%0.2d, %3.2d, %1.2d[%2]"; + } [(set_attr "type" "neon_fp_mla_d_scalar_q")] ) @@ -1303,7 +1344,10 @@ (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQF 4 "register_operand" "0")))] "TARGET_SIMD" - "fmls\\t%0., %3., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[2]))); + return "fmls\\t%0., %3., %1.[%2]"; + } [(set_attr "type" "neon_fp_mla__scalar")] ) @@ -1318,7 +1362,11 @@ (parallel [(match_operand:SI 2 "immediate_operand")]))) (match_operand:VDQSF 4 "register_operand" "0")))] "TARGET_SIMD" - "fmls\\t%0., %3., %1.[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (mode, + INTVAL (operands[2]))); + return "fmls\\t%0., %3., %1.[%2]"; + } [(set_attr "type" "neon_fp_mla__scalar")] ) @@ -1345,7 +1393,10 @@ (match_operand:DF 3 "register_operand" "w")) (match_operand:DF 4 "register_operand" "0")))] "TARGET_SIMD" - "fmls\\t%0.2d, %3.2d, %1.2d[%2]" + { + operands[2] = GEN_INT (ENDIAN_LANE_N (V2DFmode, INTVAL (operands[2]))); + return "fmls\\t%0.2d, %3.2d, %1.2d[%2]"; + } [(set_attr "type" "neon_fp_mla_d_scalar_q")] ) @@ -2542,6 +2593,7 @@ "TARGET_SIMD" "* aarch64_simd_lane_bounds (operands[3], 0, GET_MODE_NUNITS (mode)); + operands[3] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[3]))); return \"sqdmulh\\t%0., %1., %2.[%3]\";" [(set_attr "type" "neon_sat_mul__scalar")] ) @@ -2557,6 +2609,7 @@ "TARGET_SIMD" "* aarch64_simd_lane_bounds (operands[3], 0, GET_MODE_NUNITS (mode)); + operands[3] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[3]))); return \"sqdmulh\\t%0., %1., %2.[%3]\";" [(set_attr "type" "neon_sat_mul__scalar")] ) @@ -2572,6 +2625,7 @@ "TARGET_SIMD" "* aarch64_simd_lane_bounds (operands[3], 0, GET_MODE_NUNITS (mode)); + operands[3] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[3]))); return \"sqdmulh\\t%0, %1, %2.[%3]\";" [(set_attr "type" "neon_sat_mul__scalar")] ) @@ -2612,7 +2666,11 @@ )) (const_int 1))))] "TARGET_SIMD" - "sqdmll\\t%0, %2, %3.[%4]" + { + operands[4] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[4]))); + return + "sqdmll\\t%0, %2, %3.[%4]"; + } [(set_attr "type" "neon_sat_mla__scalar_long")] ) @@ -2631,7 +2689,11 @@ ) (const_int 1))))] "TARGET_SIMD" - "sqdmll\\t%0, %2, %3.[%4]" + { + operands[4] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[4]))); + return + "sqdmll\\t%0, %2, %3.[%4]"; + } [(set_attr "type" "neon_sat_mla__scalar_long")] ) @@ -2782,7 +2844,11 @@ )))) (const_int 1))))] "TARGET_SIMD" - "sqdmll2\\t%0, %2, %3.[%4]" + { + operands[4] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[4]))); + return + "sqdmll2\\t%0, %2, %3.[%4]"; + } [(set_attr "type" "neon_sat_mla__scalar_long")] ) @@ -2929,7 +2995,10 @@ )) (const_int 1)))] "TARGET_SIMD" - "sqdmull\\t%0, %1, %2.[%3]" + { + operands[3] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[3]))); + return "sqdmull\\t%0, %1, %2.[%3]"; + } [(set_attr "type" "neon_sat_mul__scalar_long")] ) @@ -2946,7 +3015,10 @@ )) (const_int 1)))] "TARGET_SIMD" - "sqdmull\\t%0, %1, %2.[%3]" + { + operands[3] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[3]))); + return "sqdmull\\t%0, %1, %2.[%3]"; + } [(set_attr "type" "neon_sat_mul__scalar_long")] ) @@ -3047,7 +3119,10 @@ )) (const_int 1)))] "TARGET_SIMD" - "sqdmull2\\t%0, %1, %2.[%3]" + { + operands[3] = GEN_INT (ENDIAN_LANE_N (mode, INTVAL (operands[3]))); + return "sqdmull2\\t%0, %1, %2.[%3]"; + } [(set_attr "type" "neon_sat_mul__scalar_long")] )