]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/40977 (problem with code like this: res = ((uint64_t)resh << 32) | resl;)
authorJeff Law <law@redhat.com>
Fri, 7 Feb 2014 22:35:49 +0000 (15:35 -0700)
committerJeff Law <law@gcc.gnu.org>
Fri, 7 Feb 2014 22:35:49 +0000 (15:35 -0700)
PR target/40977
* config/m68k/m68k.md (ashldi_extsi): Turn into a
define_insn_and_split.

From-SVN: r207615

gcc/ChangeLog
gcc/config/m68k/m68k.md

index ce9c066a2a1b4c6d0e87f7132b02793c3d424c5a..12379040b365aefc145c12fcb6f312645578b812 100644 (file)
@@ -1,5 +1,9 @@
 2014-02-07  Jeff Law  <law@redhat.com>
 
+       PR target/40977
+       * config/m68k/m68k.md (ashldi_extsi): Turn into a
+       define_insn_and_split.
+
        * ipa-inline.c (inline_small_functions): Fix typos.
 
 2014-02-07  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
index 7bf9abddd843be4d342268e84139e7e93eeb0728..e61048b4d0b6c32b24264975e966e20af664d76c 100644 (file)
 \f
 ;; arithmetic shift instructions
 ;; We don't need the shift memory by 1 bit instruction
-
-(define_insn "ashldi_extsi"
+(define_insn_and_split "ashldi_extsi"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=ro")
     (ashift:DI
       (match_operator:DI 2 "extend_operator"
         [(match_operand:SI 1 "general_operand" "rm")])
       (const_int 32)))]
   ""
-{
-  CC_STATUS_INIT;
-  if (GET_CODE (operands[0]) == REG)
-    operands[2] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
-  else
-    operands[2] = adjust_address (operands[0], SImode, 4);
-  if (ADDRESS_REG_P (operands[0]))
-    return "move%.l %1,%0\;sub%.l %2,%2";
-  else
-    return "move%.l %1,%0\;clr%.l %2";
-})
+  "#"
+  "&& reload_completed"
+  [(set (match_dup 3) (match_dup 1))
+   (set (match_dup 2) (const_int 0))]
+  "split_di(operands, 1, operands + 2, operands + 3);")
 
 (define_insn "ashldi_sexthi"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=m,a*d")