2 # This patch can be found at http://www.uclinux.org/pub/uClinux/m68k-elf-tools/
4 diff -Naur gcc-2.95.3.org/gcc/config/m68k/m68k.md gcc-2.95.3/gcc/config/m68k/m68k.md
5 --- gcc-2.95.3.org/gcc/config/m68k/m68k.md Thu Aug 5 16:22:05 1999
6 +++ gcc-2.95.3/gcc/config/m68k/m68k.md Mon Dec 16 10:37:47 2002
7 @@ -1486,10 +1486,40 @@
10 ;; this is the canonical form for (lshiftrt:DI x 32)
11 -(define_insn "zero_extendsidi2"
12 +(define_expand "zero_extendsidi2"
13 + [(set (match_operand:DI 0 "nonimmediate_operand" "")
14 + (zero_extend:DI (match_operand:SI 1 "general_operand" "")))]
18 +(define_insn "*zero_extendsidi2_cf"
19 + [(set (match_operand:DI 0 "nonimmediate_operand" "=r,m")
20 + (zero_extend:DI (match_operand:SI 1 "general_operand" "rm,r")))]
25 + if (GET_CODE (operands[0]) == REG)
26 + operands[2] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
27 + else if (GET_CODE (XEXP (operands[0], 0)) == PRE_DEC)
28 + return \"move%.l %1,%0\;clr%.l %0\";
29 + else if (GET_CODE (XEXP (operands[0], 0)) == POST_INC)
30 + return \"clr%.l %0\;move%.l %1,%0\";
32 + operands[2] = adj_offsettable_operand (operands[0], 4);
33 + if (GET_CODE (operands[1]) != REG || GET_CODE (operands[2]) != REG
34 + || REGNO (operands[1]) != REGNO (operands[2]))
35 + output_asm_insn (\"move%.l %1,%2\", operands);
36 + if (ADDRESS_REG_P (operands[0]))
37 + return \"sub%.l %0,%0\";
39 + return \"clr%.l %0\";
42 +(define_insn "*zero_extendsidi2"
43 [(set (match_operand:DI 0 "general_operand" "rm")
44 (zero_extend:DI (match_operand:SI 1 "general_operand" "rm")))]