public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14053] New: second stage build errors (--with-cpu=601)
@ 2004-02-06 23:02 stefaan dot simoens at tiscali dot be
  2004-02-07  2:31 ` [Bug c/14053] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-02-06 23:02 UTC (permalink / raw)
  To: gcc-bugs

I edited gcc/config/rs6000/sysv4.h to
#define ASM_DEFAULT_SPEC "=m601" (PR 14037)

The make bootstrap fails in stage2 ... 

./xgcc -B./ -B/usr/local/powerpc-unknown-linux-gnu/bin/ -
isystem /usr/local/powerpc-unknown-linux-gnu/include -
isystem /usr/local/powerpc-unknown-linux-gnu/sys-include -O2  -DIN_GCC    -W -
Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -
isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -
D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -
I../../gcc/../include -fPIC -mstrict-align -DL_fixunsdfsi -
c ../../gcc/libgcc2.c -o libgcc/./_fixunsdfsi.o
../../gcc/libgcc2.c: In function \x1f_fixunsdfsi':
../../gcc/libgcc2.c:1161: error: insn does not satisfy its constraints:
(jump_insn 84 83 85 (nil) (parallel [
            (return)
            (use (reg:SI 0 r0 [65]))
        ]) 549 {*return_internal_si} (insn_list 82 (insn_list:REG_DEP_ANTI 44 
(insn_list 83 (insn_list 80 (insn_list 81 (nil))))))
    (expr_list:REG_DEAD (reg:SI 0 r0 [65])
        (nil)))
../../gcc/libgcc2.c:1161: internal compiler error: in final_scan_insn, at 
final.c:2722
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [libgcc/./_fixunsdfsi.o] Error 1
make[3]: Leaving directory /mnt/.disk2/rpm-rebuilder/RPM/BUILD/gcc-3.3.3-
20040131/objdir/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory /mnt/.disk2/rpm-rebuilder/RPM/BUILD/gcc-3.3.3-
20040131/objdir/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory /mnt/.disk2/rpm-rebuilder/RPM/BUILD/gcc-3.3.3-
20040131/objdir/gcc'
make: *** [bootstrap] Error 2

I actually began investigating the 3.3.3-prerelease because I found errors in 
binaries built/optimized with -mcpu=601. (For example: latest binutils gives 
errors in 'make check' for the ld tests when I build with -mcpu=601; everything 
runs fine if I don't add the -mcpu=601). Any ideas? I'd be glad to be of any 
help (but i'm not a programmer...)

-- 
           Summary: second stage build errors (--with-cpu=601)
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stefaan dot simoens at tiscali dot be
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: powerpc-*-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
@ 2004-02-07  2:31 ` pinskia at gcc dot gnu dot org
  2004-02-10  1:36 ` [Bug optimization/14053] " pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-07  2:31 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code, wrong-
                   |                            |code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
  2004-02-07  2:31 ` [Bug c/14053] " pinskia at gcc dot gnu dot org
@ 2004-02-10  1:36 ` pinskia at gcc dot gnu dot org
  2004-02-13 17:30 ` stefaan dot simoens at tiscali dot be
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-10  1:36 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |optimization


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
  2004-02-07  2:31 ` [Bug c/14053] " pinskia at gcc dot gnu dot org
  2004-02-10  1:36 ` [Bug optimization/14053] " pinskia at gcc dot gnu dot org
@ 2004-02-13 17:30 ` stefaan dot simoens at tiscali dot be
  2004-02-13 17:31 ` stefaan dot simoens at tiscali dot be
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-02-13 17:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-02-13 17:30 -------
Created an attachment (id=5749)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5749&action=view)
gcc -v -save-temps output


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
                   ` (2 preceding siblings ...)
  2004-02-13 17:30 ` stefaan dot simoens at tiscali dot be
@ 2004-02-13 17:31 ` stefaan dot simoens at tiscali dot be
  2004-02-13 17:32 ` stefaan dot simoens at tiscali dot be
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-02-13 17:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-02-13 17:31 -------
Created an attachment (id=5750)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5750&action=view)
gcc -v -save-temps -> arith-math-ll.s


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
                   ` (3 preceding siblings ...)
  2004-02-13 17:31 ` stefaan dot simoens at tiscali dot be
@ 2004-02-13 17:32 ` stefaan dot simoens at tiscali dot be
  2004-02-13 17:33 ` stefaan dot simoens at tiscali dot be
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-02-13 17:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-02-13 17:32 -------
Created an attachment (id=5751)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5751&action=view)
gcc -v -save-temps -mcpu=601 output


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
                   ` (4 preceding siblings ...)
  2004-02-13 17:32 ` stefaan dot simoens at tiscali dot be
@ 2004-02-13 17:33 ` stefaan dot simoens at tiscali dot be
  2004-02-13 17:49 ` stefaan dot simoens at tiscali dot be
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-02-13 17:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-02-13 17:33 -------
Created an attachment (id=5752)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5752&action=view)
gcc -v -save-temps -mcpu=601 -> arith-math-ll.s


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
                   ` (5 preceding siblings ...)
  2004-02-13 17:33 ` stefaan dot simoens at tiscali dot be
@ 2004-02-13 17:49 ` stefaan dot simoens at tiscali dot be
  2004-02-20 21:12 ` stefaan dot simoens at tiscali dot be
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-02-13 17:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-02-13 17:49 -------
I did a "make check-gcc" both with and without -mcpu=601 in the RUNTESTFLAGS 
(the testsuite from the latest gcc-3.3.3-20040210 snapshot; I haven't compiled 
gcc-3.3.3 yet but the problem with -mcpu=601 exists in my current 3.3.1 
compiler als well)
The test with arith-math-ll.c was the only one who failed with the -mcpu=601 
optimization, it passes without -mcpu=601.

I think it's easier to look where the error comes is right now? (I'm not sure 
it's a math problem though; apparently arith-math-ll.c is the only test which 
triggers the problem on execution...

(I'll compile gcc-3.3.3-20040210 (without -mcpu=601) and re-run the tests so 
you have an up-to-date view on the facts -- but i'm not sure "-mcpu=601" 
changed much between 3.3.1 and 3.3.3?)

Good luck...

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
                   ` (6 preceding siblings ...)
  2004-02-13 17:49 ` stefaan dot simoens at tiscali dot be
@ 2004-02-20 21:12 ` stefaan dot simoens at tiscali dot be
  2004-02-20 21:51 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-02-20 21:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-02-20 21:12 -------
some investigation (very basic: replacing part by part portions of the working 
assembler code with the non-working assembler-code) showed that the error 
occurs when calculating the remainder

PowerPC code calculates a remainder with
divw
mullw
subf

(f.e.
divw 9,11,0
mullw 0,9,0
subf 0,0,11
)

601 calculates a reminder with
divs
mfmq

(f.e.
divs 0,9,0
mfmq 0
)

I think the latter implementation doesn't always give the same results as the 
former implementation. Maybe it's a difference in exception handling?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
                   ` (7 preceding siblings ...)
  2004-02-20 21:12 ` stefaan dot simoens at tiscali dot be
@ 2004-02-20 21:51 ` pinskia at gcc dot gnu dot org
  2004-02-20 22:03 ` geoffk at geoffk dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-20 21:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-20 21:51 -------
The real issue here is that the PPC 601 has instructions from the POWER (aka RS6000) ISA (mainly the 
ones which set the mq special register which does not exist in PPC ISA) but that difference should not 
make a difference if you are running on a true 601 unless the Linux kernel disables the POWER 
compatiablity instructions.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
                   ` (8 preceding siblings ...)
  2004-02-20 21:51 ` pinskia at gcc dot gnu dot org
@ 2004-02-20 22:03 ` geoffk at geoffk dot org
  2004-02-21  2:00 ` stefaan dot simoens at tiscali dot be
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: geoffk at geoffk dot org @ 2004-02-20 22:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From geoffk at geoffk dot org  2004-02-20 22:03 -------
Subject: Re:  second stage build errors (--with-cpu=601)


Are you really running on a 601?

Does your linux kernel really *support* running on a 601?  In
particular, does it save and restore the MQ register on context
switch?  Which exact kernel are you running?



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
                   ` (9 preceding siblings ...)
  2004-02-20 22:03 ` geoffk at geoffk dot org
@ 2004-02-21  2:00 ` stefaan dot simoens at tiscali dot be
  2004-02-25 11:05 ` stefaan dot simoens at tiscali dot be
  2004-05-12 12:00 ` stefaan dot simoens at tiscali dot be
  12 siblings, 0 replies; 14+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-02-21  2:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-02-21 02:00 -------
I've got an Apple PowerMacintosh 7200/75; this has the 601 chip.
I don't know if my kernel (2.4.25-rc1 for the moment) is the best kernel to run 
on a 601; I know my kernel works just fine right now (I compiled the kernel 
myself; the rest of my system is Mandrake 9.1). The kernel is NOT compiled with 
the "601 Bug Workaround" (I had previous versions compiled with and without the 
workaround (which inserts sync and isyncs in before and after some 
instructions) and my system runs fine with or without the workarounds -- I 
chose to run without).

I learned the 601 has PowerPC and POWER instructions; I'm quite sure my 601 
does both. (I think all Mandrake PPC binaries are compiled for PowerPC; but 
when I compile something myself with --mcpu=601 it runs and executes POWER 
instructions (like nabs, cfr my other post). So, I don't think the kernel 
disables the "POWER" instructions.

However, I think there are a few problems with -mcpu=601 [I was using this 
switch to gain the most performance as possible...].

I started my optimization-quest compiling the latest binutils -mcpu=601; the 
build succeeded; all but 5 (ld) tests succeeded (all tests succeeded without 
the -mcpu=601). (The binutils I use right now are the binutils without the -
mcpu=601).

I can't tell for sure the kernel saves and restores the MQ register on "context 
switch" correctly (how can I tell?).
Starting from the "good" assembler code (without -mcpu=601) the 'error' in 
arith-rand-ll.c enters when I replace the divw/mullw/subf with divs/mfmq.
The error doesn't always occur (as far as I can read the code, it uses 
calculations with random numbers...?) -- I ran the compiled 'bad' code for 20 
times and I got 10 times 'Aborted' and the other times the program didn't 
complain at all -- which makes me conclude that it is an error that only 
sometimes happens, an exception?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
                   ` (10 preceding siblings ...)
  2004-02-21  2:00 ` stefaan dot simoens at tiscali dot be
@ 2004-02-25 11:05 ` stefaan dot simoens at tiscali dot be
  2004-05-12 12:00 ` stefaan dot simoens at tiscali dot be
  12 siblings, 0 replies; 14+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-02-25 11:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-02-25 11:04 -------
You were right; Linux doesn't save the MQ register till now... I guess this was 
a no-bug. I didn't know, it wasn't clear to pin-point the actual problem.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug optimization/14053] second stage build errors (--with-cpu=601)
  2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
                   ` (11 preceding siblings ...)
  2004-02-25 11:05 ` stefaan dot simoens at tiscali dot be
@ 2004-05-12 12:00 ` stefaan dot simoens at tiscali dot be
  12 siblings, 0 replies; 14+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-05-12 12:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-05-11 16:07 -------
I created a patch to the linux kernel to enable the MQ register 
saving/restoring ... gcc compiles just fine right now.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14053


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-05-11 16:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-06 23:02 [Bug c/14053] New: second stage build errors (--with-cpu=601) stefaan dot simoens at tiscali dot be
2004-02-07  2:31 ` [Bug c/14053] " pinskia at gcc dot gnu dot org
2004-02-10  1:36 ` [Bug optimization/14053] " pinskia at gcc dot gnu dot org
2004-02-13 17:30 ` stefaan dot simoens at tiscali dot be
2004-02-13 17:31 ` stefaan dot simoens at tiscali dot be
2004-02-13 17:32 ` stefaan dot simoens at tiscali dot be
2004-02-13 17:33 ` stefaan dot simoens at tiscali dot be
2004-02-13 17:49 ` stefaan dot simoens at tiscali dot be
2004-02-20 21:12 ` stefaan dot simoens at tiscali dot be
2004-02-20 21:51 ` pinskia at gcc dot gnu dot org
2004-02-20 22:03 ` geoffk at geoffk dot org
2004-02-21  2:00 ` stefaan dot simoens at tiscali dot be
2004-02-25 11:05 ` stefaan dot simoens at tiscali dot be
2004-05-12 12:00 ` stefaan dot simoens at tiscali dot be

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).