From: Ian Bolton Date: Tue, 19 Mar 2013 16:18:46 +0000 (+0000) Subject: AArch64 backend support for ROR instruction. X-Git-Tag: upstream/12.2.0~70799 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5977a10d4a600792417e439d7bc67a514226a125;p=platform%2Fupstream%2Fgcc.git AArch64 backend support for ROR instruction. From-SVN: r196796 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b2d216..d55999e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2013-03-19 Ian Bolton + * config/aarch64/aarch64.md (*ror3_insn): New pattern. + (*rorsi3_insn_uxtw): Likewise. + +2013-03-19 Ian Bolton + * config/aarch64/aarch64.md (*extr5_insn): New pattern. (*extrsi5_insn_uxtw): Likewise. diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 8fc86d4..4358b44 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -2731,6 +2731,34 @@ (set_attr "mode" "SI")] ) +(define_insn "*ror3_insn" + [(set (match_operand:GPI 0 "register_operand" "=r") + (rotate:GPI (match_operand:GPI 1 "register_operand" "r") + (match_operand 2 "const_int_operand" "n")))] + "UINTVAL (operands[2]) < GET_MODE_BITSIZE (mode)" +{ + operands[3] = GEN_INT ( - UINTVAL (operands[2])); + return "ror\\t%0, %1, %3"; +} + [(set_attr "v8type" "shift") + (set_attr "mode" "")] +) + +;; zero_extend version of the above +(define_insn "*rorsi3_insn_uxtw" + [(set (match_operand:DI 0 "register_operand" "=r") + (zero_extend:DI + (rotate:SI (match_operand:SI 1 "register_operand" "r") + (match_operand 2 "const_int_operand" "n"))))] + "UINTVAL (operands[2]) < 32" +{ + operands[3] = GEN_INT (32 - UINTVAL (operands[2])); + return "ror\\t%w0, %w1, %3"; +} + [(set_attr "v8type" "shift") + (set_attr "mode" "SI")] +) + (define_insn "*_ashl" [(set (match_operand:GPI 0 "register_operand" "=r") (ANY_EXTEND:GPI diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fa69025..e198a6e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2013-03-19 Ian Bolton + * gcc.target/aarch64/ror.c: New test. + +2013-03-19 Ian Bolton + * gcc.target/aarch64/extr.c: New test. 2013-03-19 Richard Biener