[Bug target/48690] New: gcc-4.3.5 fails for target m68k

2011-04-19 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

   Summary: gcc-4.3.5 fails for target m68k
   Product: gcc
   Version: 4.3.5
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: diggskevi...@gmail.com


Created attachment 24043
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24043
standalone version of fixunsxfdi() from libgcc2.c

Hi,

The 4.3.5 release fails to successfully compile libgcc. In particular the
fixunsxfdi() routine fails with an internal compiler error for -O1 & -O2. The
popcountdi2() routine fails with an internal compiler error for -Os.

This was tested using an x86 -> m68k cross compiler configured as such:

#!/bin/bash

set -x

optlevel="O1"
export CFLAGS="-${optlevel} -g -fomit-frame-pointer"

#--enable-secureplt \
#--enable-version-specific-runtime-libs \
#--with-gxx-include-dir= \
#--enable-languages=all,obj-c++ \
#--disable-debug \
BOOT_CFLAGS="$CFLAGS" \
CFLAGS_FOR_TARGET="$CFLAGS" \
LIBCFLAGS="$CFLAGS" \
LIBCXXFLAGS="${CFLAGS} -fno-implicit-templates" \
CXXFLAGS="$CFLAGS" \
FCFLAGS="$CFLAGS" \
CXXFLAGS_FOR_TARGET="$CFLAGS" \
GCJFLAGS="$CFLAGS" \
JCFLAGS="$CFLAGS" \
GNATLIBCFLAGS="$CFLAGS" \
ADA_CFLAGS="$CFLAGS" \
ADAFLAGS="$CFLAGS" \
`dirname ${0}`/configure \
--prefix=/opt/cross/q700/gcc-4.3.5-${optlevel}-c,c++ \
--target=m68k-netbsdelf1.6.1 \
--with-sysroot=/opt/cross/q700 \
--with-build-time-tools=/opt/cross/q700/binutils-2.16.1/bin \
--enable-languages=c,c++ \
--enable-__cxa_atexit \
--enable-gather-detailed-mem-stats \
--disable-libgomp \
--with-system-zlib \
--with-gmp=/opt/GMP-4.3.2 \
--with-mpfr=/opt/MPFR-2.4.2 \
--with-gnu-ld \
--with-gnu-as

set +x

gcc-4.2.4 seems ok.

For fixunsxfdi():

kevdig@Satellite2775XDVD:~/projects/GCC/OBJ/gcc-4.3.5-m68k/gcc$ ./xgcc -B. -S
-fverbose-asm -Q -dAr -O1 -m68040 -fomit-frame-pointer ../../../fixunsxfdi.c
 fixunsxfDI
Analyzing compilation unit
Performing interprocedural optimizations

Assembling functions:
 fixunsxfDI
../../../fixunsxfdi.c: In function ‘fixunsxfDI’:
../../../fixunsxfdi.c:21: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

For popcountdi2():

kevdig@Satellite2775XDVD:~/projects/GCC/OBJ/gcc-4.3.5-m68k/gcc$ ./xgcc -B. -S
-fverbose-asm -Q -dAr -Os -m68040 -fomit-frame-pointer ../../../popcountdi2.c
 popcountDI2
Analyzing compilation unit
Performing interprocedural optimizations

Assembling functions:
 popcountDI2
../../../popcountdi2.c: In function ‘popcountDI2’:
../../../popcountdi2.c:24: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-19 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #1 from diggskevin38 at gmail dot com 2011-04-19 18:49:00 UTC ---
Created attachment 24044
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24044
standalone version of popcountdi2() from libgcc2.c


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-19 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #2 from diggskevin38 at gmail dot com 2011-04-19 18:54:30 UTC ---
The result of -dr for fixunsxfdi() for 4.2.4 is 648 lines. Only 80 are produced
by 4.3.5. It appears to die on the left shift.


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-19 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #3 from diggskevin38 at gmail dot com 2011-04-19 18:57:00 UTC ---
Created attachment 24045
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24045
partial -dr RTL dump

This is what -dr produce before it died.


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-19 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #4 from diggskevin38 at gmail dot com 2011-04-19 18:59:20 UTC ---
If I understand correctly (disclosure - I might as well be trying to read
Klingon), both of these failures involve 64-bit.


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-19 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #5 from diggskevin38 at gmail dot com 2011-04-19 19:24:08 UTC ---
kevdig@Satellite2775XDVD:~/projects/GCC/OBJ/gcc-4.3.5-m68k/m68k-netbsdelf1.6.1/libgcc$
gdb --args ../..//gcc/cc1 ../../../../fixunsxfdi.c -m68020 -auxbase-strip
_fixunsxfdi.o -g -O1 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -version -fomit-frame-pointer
-fvisibility=hidden -o libgcc2.s
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program: /home/kevdig/projects/GCC/OBJ/gcc-4.3.5-m68k/gcc/cc1
../../../../fixunsxfdi.c -m68020 -auxbase-strip _fixunsxfdi.o -g -O1 -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-version -fomit-frame-pointer -fvisibility=hidden -o libgcc2.s
GNU C (GCC) version 4.3.5 (m68k-netbsdelf1.6.1)
compiled by GNU C version 4.3.2, GMP version 4.3.2, MPFR version 2.4.2.
warning: GMP header version 4.3.2 differs from library version 4.2.2.
warning: MPFR header version 2.4.2 differs from library version 2.3.1.
GGC heuristics: --param ggc-min-expand=42 --param ggc-min-heapsize=23783
options passed:  ../../../../fixunsxfdi.c -m68020 -auxbase-strip
 _fixunsxfdi.o -g -O1 -W -Wall -Wwrite-strings -Wstrict-prototypes
 -Wmissing-prototypes -Wold-style-definition -fomit-frame-pointer
 -fvisibility=hidden
options enabled:  -falign-loops -fargument-alias -fauto-inc-dec
 -fbranch-count-reg -fcommon -fcprop-registers -fdefer-pop -fearly-inlining
 -feliminate-unused-debug-types -ffunction-cse -fgcse-lm
 -fguess-branch-probability -fident -fif-conversion -fif-conversion2
 -finline-functions-called-once -fipa-pure-const -fipa-reference -fivopts
 -fkeep-static-consts -fleading-underscore -fmath-errno -fmerge-constants
 -fmerge-debug-strings -fmove-loop-invariants -fomit-frame-pointer
 -fpcc-struct-return -fpeephole -fsched-interblock -fsched-spec
 -fsched-stalled-insns-dep -fsigned-zeros -fsplit-ivs-in-unroller
 -fsplit-wide-types -ftoplevel-reorder -ftrapping-math -ftree-ccp -ftree-ch
 -ftree-copy-prop -ftree-copyrename -ftree-cselim -ftree-dce
 -ftree-dominator-opts -ftree-dse -ftree-fre -ftree-loop-im
 -ftree-loop-ivcanon -ftree-loop-optimize -ftree-parallelize-loops=
 -ftree-reassoc -ftree-salias -ftree-scev-cprop -ftree-sink -ftree-sra
 -ftree-ter -ftree-vect-loop-version -funit-at-a-time -fvar-tracking
 -fzero-initialized-in-bss -mbitfield -mstrict-align
Compiler executable checksum: b730eeddd3600159c403844a0d20566f
 fixunsxfDI
../../../../fixunsxfdi.c:9: warning: no previous prototype for ‘fixunsxfDI’

Analyzing compilation unit
Performing interprocedural optimizations

Assembling functions:
 fixunsxfDI
Program received signal SIGSEGV, Segmentation fault.
assign_temp (type_or_decl=0x0, keep=0, memory_required=1, dont_promote=1)
at ../../../SRC/gcc-4.3.5/gcc/function.c:807
807  if (DECL_P (type_or_decl))
(gdb) where
#0  assign_temp (type_or_decl=0x0, keep=0, memory_required=1, dont_promote=1)
at ../../../SRC/gcc-4.3.5/gcc/function.c:807
#1  0x08143d0c in emit_push_insn (x=0xb72e3ef0, mode=DImode, type=0x0, 
size=0xb72e1240, align=32, partial=0, reg=0x0, extra=0, args_addr=0x0, 
args_so_far=0xb72e1200, reg_parm_stack_space=0, alignment_pad=0xb72e1200)
at ../../../SRC/gcc-4.3.5/gcc/expr.c:3731
#2  0x080c5906 in emit_library_call_value_1 (retval=1, orgfun=0xb735a090, 
value=0x0, fn_type=LCT_CONST, outmode=XFmode, nargs=1, 
p=0xbfaf0b64 "�>.�\a") at ../../../SRC/gcc-4.3.5/gcc/calls.c:3760
#3  0x080c610a in emit_library_call_value (orgfun=0xb735a090, value=0x0, 
fn_type=LCT_CONST, outmode=XFmode, nargs=1)
at ../../../SRC/gcc-4.3.5/gcc/calls.c:4085
#4  0x081bf21a in expand_float (to=0xb735a080, from=0xb72e3ef0, unsignedp=1)
at ../../../SRC/gcc-4.3.5/gcc/optabs.c:5266
#5  0x0813b58b in expand_expr_real_1 (exp=0xb734e260, target=0xb735a080, 
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
at ../../../SRC/gcc-4.3.5/gcc/expr.c:8737
#6  0x0813d40b in expand_expr_real (exp=0xb734e260, target=0x0, 
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
at ../../../SRC/gcc-4.3.5/gcc/expr.c:7115
#7  0x0813d7bc in expand_operands (exp0=0xb7356050, exp1=0xb734e260, 
target=0x0, op0=0xbfaf0e0c, op1=0xbfaf0e08, modifier=EXPAND_NORMAL)
at ../../../SRC/gcc-4.3.5/gcc/expr.h:514
---Type  to continue, or q  to quit---
#8  0x0813d168 in expand_expr_real_1 (exp=0xb734a144, target=0xb72e3e80, 
tmode=XFmode, modifier=EXPAND_NORMAL, alt_rtl=0xbfaf0ebc)
at ../../../SRC/gcc-4.3.5/gcc/expr.c:9403
#9  0x0813d40b in expand_expr_real (exp=0xb734a14

[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-19 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #6 from diggskevin38 at gmail dot com 2011-04-19 19:38:36 UTC ---
Created attachment 24046
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24046
4.3.5 build log

ya know:  yadda-yadda make blah blah|tee 

It has been lzma'ed.


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-20 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #7 from diggskevin38 at gmail dot com 2011-04-20 17:42:51 UTC ---
This is also busted in all of 4.3 (0, 1, 2, 3, & 4) and 4.5.1.


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-20 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #8 from diggskevin38 at gmail dot com 2011-04-20 17:46:09 UTC ---
Would a diff of the 4.2.4 and 4.3.0 m68k.md file be a useful attachment?


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-20 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #10 from diggskevin38 at gmail dot com 2011-04-20 21:22:12 UTC ---
If I were a bettin' man I would double down that the problem is in here
somewhere:

-(define_insn "ashldi_const32"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=rm")
-   (ashift:DI (match_operand:DI 1 "general_operand" "ro")
-(const_int 32)))]
-  ""
-{
-  CC_STATUS_INIT;
-  if (GET_CODE (operands[1]) == REG)
-operands[3] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1);
-  else
-operands[3] = adjust_address (operands[1], SImode, 4);
-  if (GET_CODE (operands[0]) == REG)
-operands[2] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
-  else if (GET_CODE (XEXP (operands[0], 0)) == PRE_DEC)
-return "clr%.l %0\;move%.l %3,%0";
-  else if (GET_CODE (XEXP (operands[0], 0)) == POST_INC)
-return "move%.l %3,%0\;clr%.l %0";
-  else
-operands[2] = adjust_address (operands[0], SImode, 4);
-  if (ADDRESS_REG_P (operands[2]))
-return "move%.l %3,%0\;sub%.l %2,%2";
-  else
-return "move%.l %3,%0\;clr%.l %2";
-})
+(define_insn "*ashldi3_const1"
+  [(set (match_operand:DI 0 "register_operand" "=d")
+   (ashift:DI (match_operand:DI 1 "register_operand" "0")
+  (const_int 1)))]
+  "!TARGET_COLDFIRE"
+  "add%.l %R0,%R0\;addx%.l %0,%0")

-;; The predicate below must be general_operand, because ashldi3 allows that
-(define_insn "ashldi_const"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=d")
-   (ashift:DI (match_operand:DI 1 "general_operand" "0")
-(match_operand 2 "const_int_operand" "n")))]
-  "(!TARGET_COLDFIRE
-&& ((INTVAL (operands[2]) >= 1 && INTVAL (operands[2]) <= 3)
-   || INTVAL (operands[2]) == 8 || INTVAL (operands[2]) == 16
-   || (INTVAL (operands[2]) > 32 && INTVAL (operands[2]) <= 63)))"
+(define_split
-   || (INTVAL (operands[2]) > 32 && INTVAL (operands[2]) <= 63)))"
+(define_split
+  [(set (match_operand:DI 0 "register_operand" "")
+   (ashift:DI (match_operand:DI 1 "register_operand" "")
+  (const_int 2)))]
+  "reload_completed && !TARGET_COLDFIRE"
+  [(set (match_dup 0)
+   (ashift:DI (match_dup 1) (const_int 1)))
+   (set (match_dup 0)
+   (ashift:DI (match_dup 0) (const_int 1)))]
+  "")
+
+(define_split
+  [(set (match_operand:DI 0 "register_operand" "")
+   (ashift:DI (match_operand:DI 1 "register_operand" "")
+  (const_int 3)))]
+  "reload_completed && !TARGET_COLDFIRE"
+  [(set (match_dup 0)
+   (ashift:DI (match_dup 1) (const_int 2)))
+   (set (match_dup 0)
+   (ashift:DI (match_dup 0) (const_int 1)))]
+  "")
+
+  "")
+
+(define_split
+  [(set (match_operand:DI 0 "register_operand" "")
+   (ashift:DI (match_operand:DI 1 "register_operand" "")
+  (const_int 8)))]
+  "reload_completed && !TARGET_COLDFIRE"
+  [(set (match_dup 2)
+   (rotate:SI (match_dup 2) (const_int 8)))
+   (set (match_dup 3)
+   (rotate:SI (match_dup 3) (const_int 8)))
+   (set (strict_low_part (subreg:QI (match_dup 0) 3))
+   (subreg:QI (match_dup 0) 7))
+   (set (strict_low_part (subreg:QI (match_dup 0) 7))
+   (const_int 0))]
 {
-  operands[1] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
-  if (INTVAL (operands[2]) == 1)
-return "add%.l %1,%1\;addx%.l %0,%0";
-  else if (INTVAL (operands[2]) == 8)
-return "rol%.l #8,%1\;rol%.l #8,%0\;move%.b %1,%0\;clr%.b %1";
-  else if (INTVAL (operands[2]) == 16)
-return "swap %1\;swap %0\;move%.w %1,%0\;clr%.w %1";
-  else if (INTVAL (operands[2]) == 16)
-return "swap %1\;swap %0\;move%.w %1,%0\;clr%.w %1";
-  else if (INTVAL (operands[2]) == 48)
-return "mov%.l %1,%0\;swap %0\;clr%.l %1\;clr%.w %0";
-  else if (INTVAL (operands[2]) == 2)
-return "add%.l %1,%1\;addx%.l %0,%0\;add%.l %1,%1\;addx%.l %0,%0";
-  else if (INTVAL (operands[2]) == 3)
-return "add%.l %1,%1\;addx%.l %0,%0\;add%.l %1,%1\;addx%.l %0,%0\;add%.l
%1,%1\;addx%.l %0,%0";
-  else /* 32 < INTVAL (operands[2]) <= 63 */
-{
-  operands[2] = GEN_INT (INTVAL (operands[2]) - 32);
-  output_asm_insn (INTVAL (operands[2]) <= 8 ? "asl%.l %2,%1" :
-   "moveq %2,%0\;asl%.l %0,%1", operands);
-  return "mov%.l %1,%0\;moveq #0,%1";
-}
+  operands[2] = gen_highpart (SImode, operands[0]);
+  operands[3] = gen

[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-20 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #11 from diggskevin38 at gmail dot com 2011-04-20 21:24:31 UTC ---
I don't know what '122895' means???

I'll do the 'svn thing'. But I am not an experienced svn user so it may take
some time.


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-20 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #12 from diggskevin38 at gmail dot com 2011-04-20 21:49:36 UTC ---
Then again I suppose it could be in here:

 (define_insn "extendsidi2"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=d")
-   (sign_extend:DI
-(match_operand:SI 1 "general_operand" "rm")))]
+  [(set (match_operand:DI 0 "register_operand" "=d")
+   (sign_extend:DI (match_operand:SI 1 "nonimmediate_src_operand" "rm")))]
   ""
 {
   CC_STATUS_INIT;
-  operands[2] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
   if (TARGET_68020 || TARGET_COLDFIRE)
-return "move%.l %1,%2\;smi %0\;extb%.l %0";
+return "move%.l %1,%R0\;smi %0\;extb%.l %0";
+  else
+return "move%.l %1,%R0\;smi %0\;ext%.w %0\;ext%.l %0";
+})
+
+(define_insn "*extendsidi2_mem"
+  [(set (match_operand:DI 0 "memory_operand" "=o,<")
+   (sign_extend:DI (match_operand:SI 1 "nonimmediate_src_operand"
"rm,rm")))
+   (clobber (match_scratch:SI 2 "=d,d"))]
+   ""
+{
+  CC_STATUS_INIT;
+  operands[3] = adjust_address (operands[0], SImode,
+   which_alternative == 0 ? 4 : 0);
+  operands[0] = adjust_address (operands[0], SImode, 0);
+  if (TARGET_68020 || TARGET_COLDFIRE)
+return "move%.l %1,%3\;smi %2\;extb%.l %2\;move%.l %2,%0";
   else
-return "move%.l %1,%2\;smi %0\;ext%.w %0\;ext%.l %0";
+return "move%.l %1,%3\;smi %2\;ext%.w %2\;ext%.l %2\;move%.l %2,%0";
 })


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-20 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #13 from diggskevin38 at gmail dot com 2011-04-20 22:05:34 UTC ---
This time without the cut and paste overlap errors (Sorry):

-(define_insn "ashldi_const32"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=rm")
-(ashift:DI (match_operand:DI 1 "general_operand" "ro")
- (const_int 32)))]
-  ""
-{
-  CC_STATUS_INIT;
-  if (GET_CODE (operands[1]) == REG)
-operands[3] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1);
-  else
-operands[3] = adjust_address (operands[1], SImode, 4);
-  if (GET_CODE (operands[0]) == REG)
-operands[2] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
-  else if (GET_CODE (XEXP (operands[0], 0)) == PRE_DEC)
-return "clr%.l %0\;move%.l %3,%0";
-  else if (GET_CODE (XEXP (operands[0], 0)) == POST_INC)
-return "move%.l %3,%0\;clr%.l %0";
-  else
-operands[2] = adjust_address (operands[0], SImode, 4);
-  if (ADDRESS_REG_P (operands[2]))
-return "move%.l %3,%0\;sub%.l %2,%2";
-  else
-return "move%.l %3,%0\;clr%.l %2";
-})
+(define_insn "*ashldi3_const1"
+  [(set (match_operand:DI 0 "register_operand" "=d")
+(ashift:DI (match_operand:DI 1 "register_operand" "0")
+   (const_int 1)))]
+  "!TARGET_COLDFIRE"
+  "add%.l %R0,%R0\;addx%.l %0,%0")

-;; The predicate below must be general_operand, because ashldi3 allows that
-(define_insn "ashldi_const"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=d")
-(ashift:DI (match_operand:DI 1 "general_operand" "0")
- (match_operand 2 "const_int_operand" "n")))]
-  "(!TARGET_COLDFIRE
-&& ((INTVAL (operands[2]) >= 1 && INTVAL (operands[2]) <= 3)
-|| INTVAL (operands[2]) == 8 || INTVAL (operands[2]) == 16
-|| (INTVAL (operands[2]) > 32 && INTVAL (operands[2]) <= 63)))"
+(define_split
+  [(set (match_operand:DI 0 "register_operand" "")
+(ashift:DI (match_operand:DI 1 "register_operand" "")
+   (const_int 2)))]
+  "reload_completed && !TARGET_COLDFIRE"
+  [(set (match_dup 0)
+(ashift:DI (match_dup 1) (const_int 1)))
+   (set (match_dup 0)
+(ashift:DI (match_dup 0) (const_int 1)))]
+  "")
+
+(define_split
+  [(set (match_operand:DI 0 "register_operand" "")
+(ashift:DI (match_operand:DI 1 "register_operand" "")
+   (const_int 3)))]
+  "reload_completed && !TARGET_COLDFIRE"
+  [(set (match_dup 0)
+(ashift:DI (match_dup 1) (const_int 2)))
+   (set (match_dup 0)
+(ashift:DI (match_dup 0) (const_int 1)))]
+  "")
+
+(define_split
+  [(set (match_operand:DI 0 "register_operand" "")
+(ashift:DI (match_operand:DI 1 "register_operand" "")
+   (const_int 8)))]
+  "reload_completed && !TARGET_COLDFIRE"
+  [(set (match_dup 2)
+(rotate:SI (match_dup 2) (const_int 8)))
+   (set (match_dup 3)
+(rotate:SI (match_dup 3) (const_int 8)))
+   (set (strict_low_part (subreg:QI (match_dup 0) 3))
+(subreg:QI (match_dup 0) 7))
+   (set (strict_low_part (subreg:QI (match_dup 0) 7))
+(const_int 0))]
 {
-  operands[1] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
-  if (INTVAL (operands[2]) == 1)
-return "add%.l %1,%1\;addx%.l %0,%0";
-  else if (INTVAL (operands[2]) == 8)
-return "rol%.l #8,%1\;rol%.l #8,%0\;move%.b %1,%0\;clr%.b %1";
-  else if (INTVAL (operands[2]) == 16)
-return "swap %1\;swap %0\;move%.w %1,%0\;clr%.w %1";
-  else if (INTVAL (operands[2]) == 48)
-return "mov%.l %1,%0\;swap %0\;clr%.l %1\;clr%.w %0";
-  else if (INTVAL (operands[2]) == 2)
-return "add%.l %1,%1\;addx%.l %0,%0\;add%.l %1,%1\;addx%.l %0,%0";
-  else if (INTVAL (operands[2]) == 3)
-return "add%.l %1,%1\;addx%.l %0,%0\;add%.l %1,%1\;addx%.l %0,%0\;add%.l
%1,%1\;addx%.l %0,%0";
-  else /* 32 < INTVAL (operands[2]) <= 63 */
-{
-  operands[2] = GEN_INT (INTVAL (operands[2]) - 32);
-  output_asm_insn (INTVAL (operands[2]) <= 8 ? "asl%.l %2,%1" :
-"moveq %2,%0\;asl%.l %0,%1", operands);
-  return "mov%.l %1,%0\;moveq #0,%1";
-}
+  operands[2] = gen_highpart (SImode, operands[0]);
+  operands[3] = gen_lowpart (SImode, operands[0]);
+})
+
+(define_split
+  [(set (match_operand:DI 0 "register_operand" "")
+(ashift:DI (match_operand:DI 1 "register_operand" "")
+   (const_int 16)))]
+  "reload_completed && !TARGET_COLDFIRE"
+  [(set (match_dup 2)
+(rotate:SI (match_dup 2) (co

[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-20 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #14 from diggskevin38 at gmail dot com 2011-04-21 05:11:43 UTC ---
I did:

svn co svn://gcc.gnu.org/svn/gcc/tags/gcc_4_3_0_release gcc_4_3-svn

blah blah blah ...

Checked out revision 172810.

then:

svn up -r 122895

Skipped '.'

I don't think that is what you were expecting???


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-21 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #16 from diggskevin38 at gmail dot com 2011-04-21 15:30:29 UTC ---
If someone wants to post svn commands to see the difference between the m68k.md
file between 122895 & 122896 ... that would be cool (ya know ... so I don't
have to beat my head against svn docs ...)


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-21 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #19 from diggskevin38 at gmail dot com 2011-04-22 00:07:00 UTC ---
!@$#%^%^

I tried to do a build with svn release and it failed for me. Same problem.

xgcc says it is 4.3.0.

What did I do wrong???


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-21 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #20 from diggskevin38 at gmail dot com 2011-04-22 00:28:55 UTC ---
(In reply to comment #19)
> !@$#%^%^
> 
> I tried to do a build with svn release and it failed for me. Same problem.
> 
> xgcc says it is 4.3.0.
> 
> What did I do wrong???

-r122895 is the omitted version ...


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-21 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #21 from diggskevin38 at gmail dot com 2011-04-22 00:30:24 UTC ---
(In reply to comment #20)
> (In reply to comment #19)
> > !@$#%^%^
> > 
> > I tried to do a build with svn release and it failed for me. Same problem.
> > 
> > xgcc says it is 4.3.0.
> > 
> > What did I do wrong???
> 
> -r122895 is the omitted version ...

This is the build command:

CFLAGS="-O2 -fomit-frame-pointer" CXXFLAGS="-O2 -fomit-frame-pointer"
LIBCFLAGS="-O2 -m68040 -fomit-frame-pointer" LIBCXXFLAGS="-O2 -m68040
-fomit-frame-pointer" time nice -16 make|tee
../gcc-svn-r122895-O2-c,c++-m68k.out

Is there something wrong here!?!???


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-22 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #24 from diggskevin38 at gmail dot com 2011-04-22 17:21:42 UTC ---
(In reply to comment #23)
> Ok. The breaking revision is 121736.
> 
> If you add this to m68k/netbsd-elf.h it compiles.
> 
> #undef STRICT_ALIGNMENT
> #define STRICT_ALIGNMENT 0
> 
> I had to disable libgomp too since this netbsd target does not have pthreads.
> 
> I'll update to current and see where we are.

Cool! So ... I'm not crazy, right?


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-22 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #27 from diggskevin38 at gmail dot com 2011-04-22 20:29:55 UTC ---
Thanks!!!

This worked. I never thought to try a Linux build. Live and learn.

I guess it is a good thing I'm not a gamblin' man.

kevin


[Bug target/48690] gcc-4.3.5 fails for target m68k

2011-04-22 Thread diggskevin38 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48690

--- Comment #28 from diggskevin38 at gmail dot com 2011-04-22 20:31:41 UTC ---
If there are any bug'etiquette steps I am supposed to perform, please tell me
(i.e. I have to close/resolve it since I opened it).

kevin