From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: law@cygnus.com Cc: egcs@egcs.cygnus.com, john@feith.com Subject: Re: egcs-1.2 stuff Date: Fri, 30 Apr 1999 23:15:00 -0000 Message-ID: References: <3562.923200896@upchuck> X-SW-Source: 1999-04n/msg00086.html Message-ID: <19990430231500.NTH0BnIvjn8D5FmAtjQVx-CvtjRD_f70wxpS9ELbFs0@z> > > > In message you write: > > > > > > > > > > > > In message you write: > > > > I enabled all TARGET_CMOVE and CC_FCOMI. I also optimized the fp > > > > cmove. > > > > > > > > What do you mean by that? I sent in patches months ago and you said > > > > you would take a look. What happened? > > > The FCOMI stuff I explicitly left with you and John to sort out. Last I > > > heard there were still technical problems with that patch. If you and Jo > > hn > > > think the patch is done, then send the final patch. > > > > > > > This is the latest patch I have been using. It seems ok. > > > > > > H.J. > > ---- > > Mon Jan 11 20:02:56 1999 H.J. Lu (hjl@gnu.org) > > > > * i386.c (output_fp_cc0_set): Don't check the JUMP_INSN code for > > conditional move. > > > > * config/i386/i386.c (notice_update_cc, output_float_compare): > > Enable TARGET_CMOVE support. > > > > * config/i386/i386.c (output_float_compare): Fix the FLOAT > > comparison for IEEE math and CC_FCOMI. > Here's a nice simple example from the gcc testsuite that breaks with this > patch installed. > > Compile & run on a PPro/PII with -O1 -march=pentiumpro > > The program will abort instead of exiting with zero status: > f (double *ty) > { > *ty = -1.0; > } > > main () > { > double foo[6]; > double tx = 0.0, ty, d; > > f (&ty); > > if (ty < 0) > ty = -ty; > d = (tx > ty) ? tx : ty; > if (ty != d) > abort (); > exit (0); > } > > > When you resubmit this patch, can you please test it with the gcc testsuite > first? > I am quite confused here: 1. I have verified that there are no regressions with egcs 1.1.2. 2. The testcase works fine with egcs in CVS at 10:15am on Apr. 3 plus my CC_FCOMI patch. Could you please check my asm ouput against yours to see why yours doesn't work? I am enclosing the failures I got with egcs in CVS at 10:15am on Apr. 3 plus my CC_FCOMI patch using -march=pentiumpro -mcpu=pentiumpro. How does it compare with your results? If you use Linux/x86 or any x86 OSes for that matter, you should use binutils 2.9.1.0.23. There are a few x86 gas bugs fixed. I know one of them causes the problem you have seen. I haven't check the gas snapshot yet. I assume it is ok. BTW, one more benefit of binutils 2.9.1.0.23 on x86 is you can use P/III instructions if you have P/III. binutils 2.9.1.0.23 is available from ftp://ftp.varesearch.com/pub/support/hjl/binutils Thanks. -- H.J. Lu (hjl@gnu.org) --- .file "x.c" .version "01.01" gcc2_compiled.: .section .rodata .align 8 .LC0: .long 0x0,0xbff00000 .text .align 4 .globl f .type f,@function f: pushl %ebp movl %esp,%ebp subl $8,%esp movl 8(%ebp),%eax fldl .LC0 fstpl (%eax) movl %ebp,%esp popl %ebp ret .Lfe1: .size f,.Lfe1-f .align 4 .globl main .type main,@function main: pushl %ebp movl %esp,%ebp subl $88,%esp addl $-12,%esp leal -72(%ebp),%eax pushl %eax call f addl $16,%esp fldl -72(%ebp) fldz fcomip %st(1),%st jbe .L8 fchs fstpl -72(%ebp) jmp .L4 .L8: fstp %st(0) .L4: fldz fcoml -72(%ebp) fnstsw %ax andb $69,%ah je .L6 fstp %st(0) fldl -72(%ebp) .L6: fldl -72(%ebp) fucomip %st(1),%st fstp %st(0) setne %al setp %ah orb %al,%ah je .L7 call abort .p2align 4,,7 .L7: addl $-12,%esp pushl $0 call exit .Lfe2: .size main,.Lfe2-main .ident "GCC: (GNU) egcs-2.93.14 19990403 (gcc2 ss-980929 experimental)" --- FAIL: g++.dg/special/conpr-1.C execution test FAIL: objc/execute/bf-1.m compilation, -O FAIL: g++.dg/special/conpr-2.C execution test FAIL: objc/execute/bf-10.m compilation, -O FAIL: g++.dg/special/conpr-3.C execution test FAIL: g++.dg/special/conpr-3.C execution test FAIL: objc/execute/bf-11.m compilation, -O FAIL: objc/execute/bf-12.m compilation, -O FAIL: objc/execute/bf-13.m compilation, -O FAIL: objc/execute/bf-14.m compilation, -O FAIL: objc/execute/bf-15.m compilation, -O FAIL: objc/execute/bf-16.m compilation, -O FAIL: objc/execute/bf-17.m compilation, -O FAIL: objc/execute/bf-18.m compilation, -O FAIL: objc/execute/bf-19.m compilation, -O FAIL: objc/execute/bf-2.m compilation, -O FAIL: objc/execute/bf-3.m compilation, -O FAIL: objc/execute/bf-4.m compilation, -O FAIL: objc/execute/bf-5.m compilation, -O FAIL: objc/execute/bf-6.m compilation, -O FAIL: objc/execute/bf-7.m compilation, -O FAIL: objc/execute/bf-8.m compilation, -O FAIL: objc/execute/bf-9.m compilation, -O FAIL: g77.f-torture/execute/19990325-1.f execution, -O0 FAIL: g77.f-torture/execute/19990325-1.f execution, -O1 FAIL: g77.f-torture/execute/19990325-1.f execution, -O2 FAIL: g77.f-torture/execute/19990325-1.f execution, -O2 -fomit-frame-pointer -finline-functions FAIL: g77.f-torture/execute/19990325-1.f execution, -Os FAIL: g77.f-torture/execute/970625-2.f compilation, -O1 FAIL: gcc.c-torture/execute/990130-1.c compilation, -O0 FAIL: gcc.c-torture/execute/990130-1.c compilation, -O1 FAIL: gcc.c-torture/execute/990130-1.c compilation, -O2 FAIL: gcc.c-torture/execute/990130-1.c compilation, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/execute/990130-1.c compilation, -O3 -g FAIL: gcc.c-torture/execute/990130-1.c compilation, -Os FAIL: gcc.c-torture/execute/loop-2b.c execution, -O2 FAIL: gcc.c-torture/execute/loop-2b.c execution, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/execute/loop-2b.c execution, -O3 -fomit-frame-pointer -funroll-loops FAIL: gcc.c-torture/execute/loop-2b.c execution, -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions FAIL: gcc.c-torture/execute/loop-2b.c execution, -O3 -g FAIL: gcc.dg/990119-1.c execution test FAIL: gcc.dg/special/weak-1.c execution test