]> git.pld-linux.org Git - packages/crossm68k-gcc.git/blob - crossm68k-gcc-zext.patch
ea45875b34f4b031a96879382357984c7218807a
[packages/crossm68k-gcc.git] / crossm68k-gcc-zext.patch
1 #
2 # This patch can be found at http://www.uclinux.org/pub/uClinux/m68k-elf-tools/
3 #
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 @@
8  }")
9  
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" "")))]
15 +  ""
16 +  "")
17 +
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")))]
21 +  "TARGET_5200"
22 +  "*
23 +{
24 +  CC_STATUS_INIT;
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\";
31 +  else
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\";
38 +  else
39 +    return \"clr%.l %0\";
40 +}")
41 +
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")))]
45 -  ""
46 +  "!TARGET_5200"
47    "*
48  {
49    CC_STATUS_INIT;
This page took 0.048104 seconds and 3 git commands to generate.